Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data EncryptedKey
- encryptedKey :: ByteString -> Maybe EncryptedKey
- unEncryptedKey :: EncryptedKey -> ByteString
- newtype Signature = Signature ByteString
- encryptedCreate :: ( ByteArrayAccess passphrase, ByteArrayAccess secret, ByteArrayAccess cc) => secret -> passphrase -> cc -> CryptoFailable EncryptedKey
- encryptedCreateDirectWithTweak :: ( ByteArrayAccess passphrase, ByteArrayAccess secret) => secret -> passphrase -> EncryptedKey
- encryptedChangePass :: ( ByteArrayAccess oldPassPhrase, ByteArrayAccess newPassPhrase) => oldPassPhrase -> newPassPhrase -> EncryptedKey -> EncryptedKey
- encryptedSign :: ( ByteArrayAccess passphrase, ByteArrayAccess msg) => EncryptedKey -> passphrase -> msg -> Signature
- encryptedPublic :: EncryptedKey -> ByteString
- encryptedChainCode :: EncryptedKey -> ByteString
- encryptedDerivePrivate :: ByteArrayAccess passphrase => DerivationScheme -> EncryptedKey -> passphrase -> DerivationIndex -> EncryptedKey
- encryptedDerivePublic :: DerivationScheme -> (PublicKey, ChainCode) -> DerivationIndex -> (PublicKey, ChainCode)
Documentation
data EncryptedKey Source #
Instances
NFData EncryptedKey Source # | |
Defined in Cardano.Crypto.Wallet.Encrypted rnf :: EncryptedKey -> () Source # |
|
ByteArrayAccess EncryptedKey Source # | |
Defined in Cardano.Crypto.Wallet.Encrypted length :: EncryptedKey -> Int Source # withByteArray :: EncryptedKey -> ( Ptr p -> IO a) -> IO a Source # copyByteArrayToPtr :: EncryptedKey -> Ptr p -> IO () Source # |
encryptedKey :: ByteString -> Maybe EncryptedKey Source #
Create an encryped key from binary representation.
If the binary is not of the right size, Nothing is returned
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.
:: ( 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
encryptedDerivePrivate :: ByteArrayAccess passphrase => DerivationScheme -> EncryptedKey -> passphrase -> DerivationIndex -> EncryptedKey Source #
encryptedDerivePublic :: DerivationScheme -> (PublicKey, ChainCode) -> DerivationIndex -> (PublicKey, ChainCode) Source #