From 9d4d218eef62a64e1596f0208a7af674785efb38 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 21 Mar 2019 11:59:25 +0100 Subject: crypto: Note about key lengths for cipher_info/1 --- lib/crypto/doc/src/crypto.xml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 251263714d..64872d7414 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -917,6 +917,15 @@

Provides a map with information about block_size, key_length, iv_length and possibly other properties of the cipher algorithm in question.

+ +

The ciphers aes_cbc, aes_cfb8, aes_cfb128, aes_ctr, + aes_ecb, aes_gcm and aes_ccm + has no keylength in the Type as opposed to for example aes_128_ctr. They adapt to the length of + the key provided in the encrypt and decrypt function. Therefor it is impossible to return a valid keylength + in the map.

+

Always use a Type with an explicit key length, +

+

For a list of supported cipher algorithms, see supports/0.

-- cgit v1.2.3