HORIZON HASKELLDocslts/ghc-9.14.xd82dee82026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · d82dee8 · 2026-10-12

Modulecardano-crypto-1.3.0Haskell2010

Cardano.Crypto.Wallet

This provides similar functionality to BIP32 but using Ed25519 arithmetic instead of P256K1 arithmethic.

Key can be hierarchically derived from private key in two fashions: Hardened or Normal.

In the hardened scheme, the child secret key is not linearly derived, so that the child public key has no way to be efficiently computed from the parent public key.

The normal scheme allows anyone to derive public keys from public key.

  • 6 types
  • 15 values
newtypenewtype ChainCode
#

Constructors

Instances6Eq, Ord, Show, NFData, Hashable, ByteArrayAccess
  • Eq ChainCodeDefined in cardano-crypto-1.3.0 · Cardano.Crypto.Wallet.Types
  • Ord ChainCodeDefined in cardano-crypto-1.3.0 · Cardano.Crypto.Wallet.Types
  • Show ChainCodeDefined in cardano-crypto-1.3.0 · Cardano.Crypto.Wallet.Types
  • NFData ChainCodeDefined in cardano-crypto-1.3.0 · Cardano.Crypto.Wallet.Types
  • Hashable ChainCodeDefined in cardano-crypto-1.3.0 · Cardano.Crypto.Wallet.Types
  • ByteArrayAccess ChainCodeDefined in cardano-crypto-1.3.0 · Cardano.Crypto.Wallet.Types
datadata DerivationScheme
#
Instances6Bounded, Enum, Eq, Ord, Show, Arbitrary

Extended Private & Public types

14 declarations
newtypenewtype XPrv
#
Instances2NFData, ByteArrayAccess
datadata XPub
#
Instances7Eq, Ord, Show, Generic, NFData, Hashable, …
newtypenewtype XSignature
#
Instances6Eq, Ord, Show, NFData, Hashable, ByteArrayAccess
valuegenerateNew
  1. :: (ByteArrayAccess keyPassPhrase, ByteArrayAccess generationPassPhrase, ByteArrayAccess seed)
  2. => seed

    Raw entropy used as source of randomness for this algorithm

  3. -> generationPassPhrase

    User chosen passphrase for the generation phase

  4. -> keyPassPhrase

    Symmetric encryption key passphrase used for the in-memory security

  5. -> XPrv
#

Generate a new XPrv from an entropy seed

The seed should be at least 16 bytes, although it is not enforced

The passphrase encrypt the secret key in memory

Derivation function

2 declarations

Signature & Verification from extended types

2 declarations