A Master secret is a 256 bits random quantity
Modulecardano-crypto-1.3.0Haskell2010
Crypto.ECC.Ed25519BIP32
Synopsis
- type MasterSecret
- type ChildKey
- type Key
- type Public
- type PointCompressed
- newtype ChainCode
- newtype Hash
- type Tag
- newtype SerializedIndex
- type HMAC_SHA512
- data DerivationType
- data DerivationMaterial
- data DerivationIndex
- data DerivationHier
- type MaxHardIndex
- type MinHardIndex
- type MaxSoftIndex
- type MinSoftIndex
- data ValidIndex
- data ValidHardIndex
- data ValidSoftIndex
- value getValidIndex
- value isValidIndex
- value getValidHardIndex
- value isValidHardIndex
- value getValidSoftIndex
- value isValidSoftIndex
- type ValidDerivationIndex
- type ValidDerivationHardIndex
- type ValidDerivationSoftIndex
- family ValidDerivationIndexForType
- family DerivationTag
- value leftHalfValid
- value toPublic
- value kToPoint
- value pointAdd
- value pointToRepr
- value pointFromRepr
- family BitsToHashScheme
- type ValidTag
- value fcp
- value hmacSHA512
- class GetDerivationMaterial
- value derive
- value derivePublic
- value step2
- value indexSerialized
- Packagecardano-crypto-1.3.0
- Exports47
- LanguageHaskell2010
- LicenceMIT
- SourceEd25519BIP32.hs
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)
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.
A public part of a key
A point is 1 bit of x sign and 255 bit of y coordinate (y's 256th bit is always 0)
A 256 bits chain code
Constructors
ChainCodeunChainCode :: Bytes32
Instances3Eq, GetDerivationMaterial
Eq ChainCodeDefined in cardano-crypto-1.3.0 · Crypto.ECC.Ed25519BIP32GetDerivationMaterial 'Hard KeyDefined in cardano-crypto-1.3.0 · Crypto.ECC.Ed25519BIP32GetDerivationMaterial 'Soft KeyDefined in cardano-crypto-1.3.0 · Crypto.ECC.Ed25519BIP32
A Serialized tag used during HMAC
Serialized Index
Constructors
SerializedIndex (Bytes4
)
Instances1Eq
Eq SerializedIndexDefined in cardano-crypto-1.3.0 · Crypto.ECC.Ed25519BIP32
Constructors
Constructors
IsValidIndex :: ValidDerivationIndex a :~: 'True -> ValidIndex aIsNotValidIndex :: ValidDerivationIndex a :~: 'False -> ValidIndex a
Constructors
Constructors
type family DerivationTag (ty :: DerivationType) (material :: DerivationMaterial) :: Nat whereEquations
DerivationTag 'Hard 'KeyMaterial =0
DerivationTag 'Hard 'ChainCodeMaterial =1
DerivationTag 'Soft 'KeyMaterial =2
DerivationTag 'Soft 'ChainCodeMaterial =3
Check if the left half is valid
Equations
BitsToHashScheme256
= SHA256BitsToHashScheme512
= SHA512
Compute the HMAC-SHA512 using the ChainCode as the key
Methods
getDerivationMaterial :: Proxy dtype -> mat -> [Word8]
Instances3GetDerivationMaterial
GetDerivationMaterial 'Hard KeyDefined in cardano-crypto-1.3.0 · Crypto.ECC.Ed25519BIP32GetDerivationMaterial 'Soft KeyDefined in cardano-crypto-1.3.0 · Crypto.ECC.Ed25519BIP32GetDerivationMaterial 'Soft PointCompressedDefined in cardano-crypto-1.3.0 · Crypto.ECC.Ed25519BIP32
Given Z, return 8*ZL(28Bytes) and ZR
Serialized index