eccrypto-0.1.0: Elliptic Curve Cryptography for Haskell

Copyright(c) Marcel Fourné 20[14..]
LicenseBSD3
MaintainerMarcel Fourné (haskell@marcelfourne.de)
Stabilityalpha
PortabilityBad
Safe HaskellSafe
LanguageHaskell98

Crypto.ECC.Ed25519.Internal

Description

safe re-exports

Synopsis

Documentation

data Point Source #

twisted Edwards curve point, extended point format (x,y,z,t), neutral element (0,1,1,0), c=1, a=-1 https://hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html, after "Twisted Edwards curves revisited" eprint 2008/522

Instances
Eq Point Source # 
Instance details

Defined in Crypto.ECC.Ed25519.Internal.Ed25519

Methods

(==) :: Point -> Point -> Bool #

(/=) :: Point -> Point -> Bool #

Show Point Source # 
Instance details

Defined in Crypto.ECC.Ed25519.Internal.Ed25519

Methods

showsPrec :: Int -> Point -> ShowS #

show :: Point -> String #

showList :: [Point] -> ShowS #

type Message = ByteString Source #

just a newtype for the message

type PubKey = ByteString Source #

just a newtype for the public key (string of 32 bytes, b=256 bit)

data SecKey Source #

just a wrapper for the secret key (string of 32 bytes, b=256 bit)

type Signature = ByteString Source #

just a newtype for the signature (string of 2*32 bytes, b=256 bit)

type SignedMessage = ByteString Source #

just a newtype for the signature with appended message

data SigOK Source #

clear signal that everything is ok

Constructors

SigOK 
Instances
Eq SigOK Source # 
Instance details

Defined in Crypto.ECC.Ed25519.Internal.Ed25519

Methods

(==) :: SigOK -> SigOK -> Bool #

(/=) :: SigOK -> SigOK -> Bool #

Show SigOK Source # 
Instance details

Defined in Crypto.ECC.Ed25519.Internal.Ed25519

Methods

showsPrec :: Int -> SigOK -> ShowS #

show :: SigOK -> String #

showList :: [SigOK] -> ShowS #

type VerifyResult = Either String SigOK Source #

Result of verifying a signature should only yield if it's good or bad, not more, but contains an error string if underlying primitives failed

getFPrime32 :: ByteString -> Either String FPrime Source #

converts 32 little endian bytes into one FPrime