diff options
author | lloyd <lloyd@randombit.net> | 2013-06-05 00:11:07 +0000 |
---|---|---|
committer | lloyd <lloyd@randombit.net> | 2013-06-05 00:11:07 +0000 |
commit | 398db82560040f25fff620c355b19fe3d4d45453 (patch) | |
tree | 8569aa36700485c3044c5ca60a636fe3fc48036e /src | |
parent | 2e4a4e269d11fb27e71ff49b52d39e5c0ac9e9a1 (diff) |
Move cryptobox/raw_key.cpp to new module cryptobox_psk which allows it
to be used in TLS without requiring pulling in CTR, Serpent, PBKDF2
and other code required by password-based cryptobox but not needed for
TLS session encryption.
Diffstat (limited to 'src')
-rw-r--r-- | src/constructs/cryptobox/cryptobox.h | 23 | ||||
-rw-r--r-- | src/constructs/cryptobox_psk/cryptobox_psk.cpp (renamed from src/constructs/cryptobox/raw_key.cpp) | 0 | ||||
-rw-r--r-- | src/constructs/cryptobox_psk/info.txt | 10 | ||||
-rw-r--r-- | src/tls/info.txt | 2 | ||||
-rw-r--r-- | src/tls/tls_session.cpp | 2 |
5 files changed, 12 insertions, 25 deletions
diff --git a/src/constructs/cryptobox/cryptobox.h b/src/constructs/cryptobox/cryptobox.h index e70492d37..7a363f72d 100644 --- a/src/constructs/cryptobox/cryptobox.h +++ b/src/constructs/cryptobox/cryptobox.h @@ -48,29 +48,6 @@ BOTAN_DLL std::string decrypt(const byte input[], size_t input_len, BOTAN_DLL std::string decrypt(const std::string& input, const std::string& passphrase); -/** -* Encrypt a message using a shared key -* @param input the input data -* @param input_len the length of input in bytes -* @param key the key used to encrypt the message -* @param rng a ref to a random number generator, such as AutoSeeded_RNG -*/ -BOTAN_DLL std::vector<byte> -encrypt(const byte input[], size_t input_len, - const SymmetricKey& key, - RandomNumberGenerator& rng); - -/** -* Encrypt a message using a shared key -* @param input the input data -* @param input_len the length of input in bytes -* @param key the key used to encrypt the message -* @param rng a ref to a random number generator, such as AutoSeeded_RNG -*/ -BOTAN_DLL secure_vector<byte> -decrypt(const byte input[], size_t input_len, - const SymmetricKey& key); - } } diff --git a/src/constructs/cryptobox/raw_key.cpp b/src/constructs/cryptobox_psk/cryptobox_psk.cpp index 9fc912c0c..9fc912c0c 100644 --- a/src/constructs/cryptobox/raw_key.cpp +++ b/src/constructs/cryptobox_psk/cryptobox_psk.cpp diff --git a/src/constructs/cryptobox_psk/info.txt b/src/constructs/cryptobox_psk/info.txt new file mode 100644 index 000000000..4f22d4f7b --- /dev/null +++ b/src/constructs/cryptobox_psk/info.txt @@ -0,0 +1,10 @@ +define CRYPTOBOX_PSK + +<requires> +aes +cbc +hmac +kdf2 +rng +sha2_64 +</requires> diff --git a/src/tls/info.txt b/src/tls/info.txt index 669dcc781..56fac8bd8 100644 --- a/src/tls/info.txt +++ b/src/tls/info.txt @@ -70,7 +70,7 @@ aes asn1 cbc credentials -cryptobox +cryptobox_psk dh ecdh eme_pkcs diff --git a/src/tls/tls_session.cpp b/src/tls/tls_session.cpp index 9d869116c..6596804b5 100644 --- a/src/tls/tls_session.cpp +++ b/src/tls/tls_session.cpp @@ -10,7 +10,7 @@ #include <botan/ber_dec.h> #include <botan/asn1_str.h> #include <botan/pem.h> -#include <botan/cryptobox.h> +#include <botan/cryptobox_psk.h> #include <memory> namespace Botan { |