summaryrefslogtreecommitdiffstats
path: root/comm/third_party/botan/src/lib/misc/rfc3394/rfc3394.h
diff options
context:
space:
mode:
Diffstat (limited to 'comm/third_party/botan/src/lib/misc/rfc3394/rfc3394.h')
-rw-r--r--comm/third_party/botan/src/lib/misc/rfc3394/rfc3394.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/comm/third_party/botan/src/lib/misc/rfc3394/rfc3394.h b/comm/third_party/botan/src/lib/misc/rfc3394/rfc3394.h
new file mode 100644
index 0000000000..9cfcfaaf6d
--- /dev/null
+++ b/comm/third_party/botan/src/lib/misc/rfc3394/rfc3394.h
@@ -0,0 +1,39 @@
+/*
+* AES Key Wrap (RFC 3394)
+* (C) 2011 Jack Lloyd
+*
+* Botan is released under the Simplified BSD License (see license.txt)
+*/
+
+#ifndef BOTAN_RFC3394_H_
+#define BOTAN_RFC3394_H_
+
+#include <botan/symkey.h>
+
+namespace Botan {
+
+/**
+* Encrypt a key under a key encryption key using the algorithm
+* described in RFC 3394
+*
+* @param key the plaintext key to encrypt
+* @param kek the key encryption key
+* @return key encrypted under kek
+*/
+secure_vector<uint8_t> BOTAN_PUBLIC_API(2,0) rfc3394_keywrap(const secure_vector<uint8_t>& key,
+ const SymmetricKey& kek);
+
+/**
+* Decrypt a key under a key encryption key using the algorithm
+* described in RFC 3394
+*
+* @param key the encrypted key to decrypt
+* @param kek the key encryption key
+* @return key decrypted under kek
+*/
+secure_vector<uint8_t> BOTAN_PUBLIC_API(2,0) rfc3394_keyunwrap(const secure_vector<uint8_t>& key,
+ const SymmetricKey& kek);
+
+}
+
+#endif