Copyright | AnJie Dong Dong Han 2021 |
---|---|
License | BSD |
Maintainer | winterland1989@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
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
- keyWrap :: HasCallStack => Secret -> Secret -> IO Bytes
- keyUnwrap :: HasCallStack => Bytes -> Secret -> IO Secret
- module Z.Crypto.SafeMem
key wrap & unwrap
:: 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.
:: HasCallStack | |
=> Bytes | wrapped key |
-> Secret | kek |
-> IO Secret |
Unwrap a key wrapped with rfc3394_keywrap.
re-export
module Z.Crypto.SafeMem