From fb9d36c2c7c1bd4760d0be2801b9c2852d3502bf Mon Sep 17 00:00:00 2001 From: Andreas Schultz Date: Mon, 16 Jun 2014 18:46:09 +0200 Subject: crypto: add support for ChaCha20/Policy1305 AEAD cipher --- lib/crypto/doc/src/crypto.xml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/crypto/doc/src') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 5f19c5cce3..cdeeaaaf43 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -136,7 +136,9 @@

block_cipher() = aes_cbc128 | aes_cfb8 | aes_cfb128 | aes_ige256 | blowfish_cbc | blowfish_cfb64 | des_cbc | des_cfb | des3_cbc | des3_cbf - | des_ede3 | rc2_cbc | aes_gcm

+ | des_ede3 | rc2_cbc

+ +

aead_cipher() = aes_gcm | chacha20_poly1305

stream_key() = aes_key() | rc4_key()

@@ -158,7 +160,7 @@ Note that both md4 and md5 are recommended only for compatibility with existing applications.

cipher_algorithms() = des_cbc | des_cfb | des3_cbc | des3_cbf | des_ede3 | - blowfish_cbc | blowfish_cfb64 | aes_cbc128 | aes_cfb8 | aes_cfb128| aes_cbc256 | aes_ige256 | aes_gcm | rc2_cbc | aes_ctr| rc4

+ blowfish_cbc | blowfish_cfb64 | aes_cbc128 | aes_cfb8 | aes_cfb128| aes_cbc256 | aes_ige256 | aes_gcm | chacha20_poly1305 | rc2_cbc | aes_ctr| rc4

public_key_algorithms() = rsa |dss | ecdsa | dh | ecdh | ec_gf2m Note that ec_gf2m is not strictly a public key algorithm, but a restriction on what curves are supported with ecdsa and ecdh. @@ -169,10 +171,11 @@ block_encrypt(Type, Key, Ivec, PlainText) -> CipherText - block_encrypt(aes_gcm, Key, Ivec, {AAD, PlainText}) -> {CipherText, CipherTag} + block_encrypt(AeadType, Key, Ivec, {AAD, PlainText}) -> {CipherText, CipherTag} Encrypt PlainText according to Type block cipher Type = block_cipher() + AeadType = aead_cipher() Key = block_key() PlainText = iodata() AAD = IVec = CipherText = CipherTag = binary() @@ -190,10 +193,11 @@ block_decrypt(Type, Key, Ivec, CipherText) -> PlainText - block_decrypt(aes_gcm, Key, Ivec, {AAD, CipherText, CipherTag}) -> PlainText | error + block_decrypt(AeadType, Key, Ivec, {AAD, CipherText, CipherTag}) -> PlainText | error Decrypt CipherText according to Type block cipher Type = block_cipher() + AeadType = aead_cipher() Key = block_key() PlainText = iodata() AAD = IVec = CipherText = CipherTag = binary() -- cgit v1.2.3