cryptostore-0.3.0.1: Serialization of cryptographic data types

License | BSD-style
Maintainer | Olivier Chéron <olivier.cheron@gmail.com>
Stability | experimental
Portability | unknown
Safe Haskell | Safe-Inferred
Language | Haskell2010

Crypto.Store.KeyWrap.TripleDES

Description

Triple-DES Key Wrap (RFC 3217)

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

Synopsis

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

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