jose-0.8.2.0: Javascript Object Signing and Encryption and JSON Web Token library

Safe HaskellNone
LanguageHaskell98

Crypto.JOSE.AESKW

Description

Advanced Encryption Standard (AES) Key Wrap Algorithm; https://https://tools.ietf.org/html/rfc3394.

Synopsis

Documentation

aesKeyWrap :: (ByteArrayAccess m, ByteArray c, BlockCipher128 cipher) => cipher -> m -> c Source #

Wrap a secret.

Input size must be a multiple of 8 bytes, and at least 16 bytes. Output size is input size plus 8 bytes.

aesKeyUnwrap :: (ByteArrayAccess c, ByteArray m, BlockCipher128 cipher) => cipher -> c -> Maybe m Source #

Unwrap a secret.

Input size must be a multiple of 8 bytes, and at least 24 bytes. Output size is input size minus 8 bytes.

Returns Nothing if inherent integrity check fails. Otherwise, the chance that the key data is corrupt is 2 ^ -64.