elliptics: Bindings to trevp/ref10_extract

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

Please see the README on GitHub at https://github.com/githubuser/elliptics#readme


[Skip to ReadMe]

Properties

Version0.1.0.0
Change logNone available
Dependenciesbase (>=4.7 && <5), bytestring [details]
LicenseMIT
AuthorAlexandr M.
Maintainerdisfenoid@gmail.com
Categorycryptography
Home pagehttps://github.com/disfenoid/elliptics#readme
Bug trackerhttps://github.com/disfenoid/elliptics/issues
Source repositoryhead: git clone https://github.com/disfenoid/elliptics
UploadedMon Aug 27 20:05:27 UTC 2018 by disfenoid

Modules

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for elliptics-0.1.0.0

[back to package description]

Elliptics

Bindings for trevp/ref10_extract.

{-# LANGUAGE OverloadedStrings #-}

module Main where

import qualified Crypto.Elliptics.Curve25519 as C
import           Data.ByteString
import           Data.ByteString.Random      (random)
import           Data.Maybe

main :: IO ()
main = do
  seed <- random 32
  rnd <- random 64
  let (C.KeyPair xpub xprv) = C.keyPairgen seed
      signature = C.сurve25519Sign xprv msg rnd
  print $ C.curve25519Verify xpub signature msg

msg :: ByteString
msg = "Hello, world!"