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] [Publish]

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

[Skip to Readme]


Change log None available
Dependencies base (>=4.7 && <5), bytestring [details]
License MIT
Author Alexandr M.
Maintainer disfenoid@gmail.com
Category cryptography
Home page https://github.com/disfenoid/elliptics#readme
Bug tracker https://github.com/disfenoid/elliptics/issues
Source repo head: git clone https://github.com/disfenoid/elliptics
Uploaded by disfenoid at 2018-08-27T20:05:27Z



Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Readme for elliptics-

[back to package description]


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!"