Z-Botan-0.1.1.1: 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

Documentation

keyWrap Source #

Arguments

:: Bytes

key

-> Bytes

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

:: Bytes

wrapped key

-> Bytes

kek

-> IO Bytes 

Unwrap a key wrapped with rfc3394_keywrap.