cardano-crypto-1.1.1: Cryptography primitives for cardano
Safe Haskell None
Language Haskell2010

Crypto.ECC.Ed25519BIP32

Synopsis

Documentation

type MasterSecret = FBits 256 Source #

A Master secret is a 256 bits random quantity

type ChildKey (didxs :: DerivationHier ) = Key Source #

A child key is similar to the key in structure except it has an additional annotation representing the indexes for the hierarchy derivation indexes from a base Key (usually the root key)

type Key = ( FBits 256, FBits 256, ChainCode ) Source #

A key is a 512 bit random value and a chaincode

Left half need to have: * Lowest 3 bits clear * Highest bit clear * Second highest bit set * Third highest bit clear

Right half doesn't have any particular structure.

type Public = ( PointCompressed , ChainCode ) Source #

A public part of a key

type PointCompressed = FBits 256 Source #

A point is 1 bit of x sign and 255 bit of y coordinate (y's 256th bit is always 0)

newtype Hash n Source #

A n bits Digest

Constructors

Hash

Fields

Instances

Instances details
Eq ( Hash n) Source #
Instance details

Defined in Crypto.ECC.Ed25519BIP32

type Tag = Bytes 1 Source #

A Serialized tag used during HMAC

leftHalfValid :: FBits 256 -> Bool Source #

Check if the left half is valid

type ValidTag tag = (0 <= tag, tag <= 3) Source #

fcp :: forall tag idx deriveType deriveMaterial. ( KnownNat ( DerivationTag deriveType deriveMaterial), KnownNat idx, DerivationTag deriveType deriveMaterial ~ tag, ValidDerivationIndex idx ~ ' True , ValidDerivationIndexForType deriveType idx ~ ' True ) => Proxy deriveMaterial -> Proxy deriveType -> Proxy idx -> ChainCode -> DerivationIndex deriveType idx -> [ Word8 ] -> HMAC_SHA512 Source #

Compute the HMAC-SHA512 using the ChainCode as the key

step2 :: Bytes 64 -> ( FBits 256, FBits 256) Source #

Given Z, return 8*ZL(28Bytes) and ZR