Botan 3.3.0
Crypto and TLS for C&
rfc3394.h
Go to the documentation of this file.
1/*
2* AES Key Wrap (RFC 3394)
3* (C) 2011 Jack Lloyd
4*
5* Botan is released under the Simplified BSD License (see license.txt)
6*/
7
8#ifndef BOTAN_RFC3394_H_
9#define BOTAN_RFC3394_H_
10
11#include <botan/symkey.h>
12
13namespace Botan {
14
15/**
16* Encrypt a key under a key encryption key using the algorithm
17* described in RFC 3394
18*
19* @param key the plaintext key to encrypt
20* @param kek the key encryption key
21* @return key encrypted under kek
22*/
23secure_vector<uint8_t> BOTAN_PUBLIC_API(2, 0)
24 rfc3394_keywrap(const secure_vector<uint8_t>& key, const SymmetricKey& kek);
25
26/**
27* Decrypt a key under a key encryption key using the algorithm
28* described in RFC 3394
29*
30* @param key the encrypted key to decrypt
31* @param kek the key encryption key
32* @return key decrypted under kek
33*/
35 rfc3394_keyunwrap(const secure_vector<uint8_t>& key, const SymmetricKey& kek);
36
37} // namespace Botan
38
39#endif
#define BOTAN_PUBLIC_API(maj, min)
Definition compiler.h:31
secure_vector< uint8_t > rfc3394_keywrap(const secure_vector< uint8_t > &key, const SymmetricKey &kek)
Definition rfc3394.cpp:15
OctetString SymmetricKey
Definition symkey.h:141
secure_vector< uint8_t > rfc3394_keyunwrap(const secure_vector< uint8_t > &key, const SymmetricKey &kek)
Definition rfc3394.cpp:26
std::vector< T, secure_allocator< T > > secure_vector
Definition secmem.h:61