diff options
author | Jack Lloyd <[email protected]> | 2019-05-31 23:08:48 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-05-31 23:34:34 -0400 |
commit | 924bb1a52ec3dad476a5f8567a7411b18a3e7056 (patch) | |
tree | be6ecc03c2cf7b6da23f51c85ab3d5170566d150 /doc/api_ref/cryptobox.rst | |
parent | c610d318d37c899260a2d3f3e3692970c6f8d9ba (diff) |
Reorg documentation layout. Rename manual to handbook.
Diffstat (limited to 'doc/api_ref/cryptobox.rst')
-rw-r--r-- | doc/api_ref/cryptobox.rst | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/api_ref/cryptobox.rst b/doc/api_ref/cryptobox.rst new file mode 100644 index 000000000..dbade88af --- /dev/null +++ b/doc/api_ref/cryptobox.rst @@ -0,0 +1,32 @@ + +Cryptobox +======================================== + +Encryption using a passphrase +---------------------------------------- + +.. versionadded:: 1.8.6 + +This is a set of simple routines that encrypt some data using a +passphrase. There are defined in the header `cryptobox.h`, inside +namespace `Botan::CryptoBox`. + +It generates cipher and MAC keys using 8192 iterations of PBKDF2 with +HMAC(SHA-512), then encrypts using Serpent in CTR mode and authenticates using a +HMAC(SHA-512) mac of the ciphertext, truncated to 160 bits. + + .. cpp:function:: std::string encrypt(const uint8_t input[], size_t input_len, \ + const std::string& passphrase, \ + RandomNumberGenerator& rng) + + Encrypt the contents using *passphrase*. + + .. cpp:function:: std::string decrypt(const uint8_t input[], size_t input_len, \ + const std::string& passphrase) + + Decrypts something encrypted with encrypt. + + .. cpp:function:: std::string decrypt(const std::string& input, \ + const std::string& passphrase) + + Decrypts something encrypted with encrypt. |