cryptostore-0.3.1.0: Serialization of cryptographic data types
LicenseBSD-style
MaintainerOlivier Chéron <olivier.cheron@gmail.com>
Stabilityexperimental
Portabilityunknown
Safe HaskellSafe-Inferred
LanguageHaskell2010

Crypto.Store.KeyWrap.TripleDES

Description

Triple-DES Key Wrap (RFC 3217)

Should be used with a cipher from module Crypto.Cipher.TripleDES.

Synopsis

Documentation

wrap :: (BlockCipher cipher, ByteArray ba) => cipher -> IV cipher -> ba -> Either StoreError ba Source #

Wrap a Triple-DES key with the specified Triple-DES cipher.

Input must be 24 bytes. A fresh IV should be generated randomly for each invocation.

unwrap :: (BlockCipher cipher, ByteArray ba) => cipher -> ba -> Either StoreError ba Source #

Unwrap an encrypted Triple-DES key with the specified Triple-DES cipher.