cardano-crypto-1.3.0: Cryptography primitives for cardano
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Crypto.Wallet.Encrypted

Contents

Synopsis

Documentation

data EncryptedKey Source #

Instances

Instances details
NFData EncryptedKey Source # 
Instance details

Defined in Cardano.Crypto.Wallet.Encrypted

Methods

rnf :: EncryptedKey -> () #

ByteArrayAccess EncryptedKey Source # 
Instance details

Defined in Cardano.Crypto.Wallet.Encrypted

encryptedKey :: ByteString -> Maybe EncryptedKey Source #

Create an encryped key from binary representation.

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

newtype Signature Source #

Constructors

Signature ByteString 

Instances

Instances details
NFData Signature Source # 
Instance details

Defined in Cardano.Crypto.Wallet.Encrypted

Methods

rnf :: Signature -> () #

Methods

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

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

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

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

encryptedChangePass Source #

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 Source #

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

encryptedPublic :: EncryptedKey -> ByteString Source #

Get the public part of an encrypted key

encryptedChainCode :: EncryptedKey -> ByteString Source #

Get the chain code part of an encrypted key

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