cardano-addresses
Safe HaskellNone
LanguageHaskell2010

Cardano.Address.Crypto.Wallet.Encrypted

Contents

Description

Vendored from cardano-crypto (Apache-2.0).

Synopsis

Documentation

data EncryptedKey #

Instances

Instances details
NFData EncryptedKey # 
Instance details

Defined in Cardano.Address.Crypto.Wallet.Encrypted

Methods

rnf :: EncryptedKey -> () #

ByteArrayAccess EncryptedKey # 
Instance details

Defined in Cardano.Address.Crypto.Wallet.Encrypted

encryptedKey :: ByteString -> Maybe EncryptedKey #

Create an encryped key from binary representation.

If the binary is not of the right size, Nothing is returned

newtype Signature #

Constructors

Signature ByteString 

Instances

Instances details
NFData Signature # 
Instance details

Defined in Cardano.Address.Crypto.Wallet.Encrypted

Methods

rnf :: Signature -> () #

Methods

encryptedCreate :: (ByteArrayAccess passphrase, ByteArrayAccess secret, ByteArrayAccess cc) => secret -> passphrase -> cc -> CryptoFailable EncryptedKey #

Create a new encrypted key from the secret, encrypting the secret in memory using the passphrase.

encryptedCreateDirectWithTweak :: (ByteArrayAccess passphrase, ByteArrayAccess secret) => secret -> passphrase -> EncryptedKey #

Create a new encrypted key using the output of the masterKeyGeneration directly (96 bytes) using the encryption passphrase.

encryptedChangePass #

Arguments

:: (ByteArrayAccess oldPassPhrase, ByteArrayAccess newPassPhrase) 
=> oldPassPhrase

passphrase to decrypt the current encrypted key

-> newPassPhrase

new passphrase to use for the new encrypted key

-> EncryptedKey

Key using the old pass phrase

-> EncryptedKey

Key using the new pass phrase

Create a new encrypted key that uses a different passphrase

encryptedSign :: (ByteArrayAccess passphrase, ByteArrayAccess msg) => EncryptedKey -> passphrase -> msg -> Signature #

Sign using the encrypted keys and temporarly decrypt the secret in memory with a minimal memory footprint.

encryptedPublic :: EncryptedKey -> ByteString #

Get the public part of an encrypted key

encryptedChainCode :: EncryptedKey -> ByteString #

Get the chain code part of an encrypted key

encryptedDerivePublic :: DerivationScheme -> (PublicKey, ChainCode) -> DerivationIndex -> (PublicKey, ChainCode) #