Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data PrivateKey
- data PublicKey
- newtype Signature = Sig ByteString
- generatePrivate :: CryptoRandomGen g => g -> (PrivateKey, g)
- generatePublic :: PrivateKey -> PublicKey
- generateKeyPair :: CryptoRandomGen g => g -> (PrivateKey, PublicKey, g)
- sign :: ByteString -> PrivateKey -> PublicKey -> Signature
- valid :: ByteString -> PublicKey -> Signature -> Bool
- importPublic :: ByteString -> Maybe PublicKey
- importPrivate :: ByteString -> Maybe PrivateKey
- exportPublic :: PublicKey -> ByteString
- exportPrivate :: PrivateKey -> ByteString
Documentation
generatePrivate :: CryptoRandomGen g => g -> (PrivateKey, g) Source
Randomly generate an Ed25519 private key.
generatePublic :: PrivateKey -> PublicKey Source
Randomly generate a curve25519 public key.
generateKeyPair :: CryptoRandomGen g => g -> (PrivateKey, PublicKey, g) Source
sign :: ByteString -> PrivateKey -> PublicKey -> Signature Source