Z-Botan-0.4.0.0: Crypto for Haskell
CopyrightAnJie Dong Dong Han 2021
LicenseBSD
Maintainerwinterland1989@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Z.Crypto.KeyWrap

Description

This module provides RFC3394 key Wrapping. It uses a 128-bit, 192-bit, or 256-bit key to encrypt an input key. AES is always used. The input must be a multiple of 8 bytes; if not an exception is thrown.

Synopsis

key wrap & unwrap

keyWrap Source #

Arguments

:: HasCallStack 
=> Secret

key

-> Secret

kek

-> IO Bytes 

Wrap the input key using kek (the key encryption key), and return the result. It will be 8 bytes longer than the input key.

keyUnwrap Source #

Arguments

:: HasCallStack 
=> Bytes

wrapped key

-> Secret

kek

-> IO Secret 

Unwrap a key wrapped with rfc3394_keywrap.

re-export