aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/src/crypto.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-12-17 15:44:33 +0100
committerSverker Eriksson <[email protected]>2015-12-17 15:44:33 +0100
commit82be6a3e5589781551ca9170cb212983463f1446 (patch)
treea20ab632829309aa291b72250d5bc7ddd5afd42e /lib/crypto/src/crypto.erl
parent0eb8ad3ef943238d0eaeefa872b8dd766e4524c3 (diff)
parent32eb9d7d9f680d320f42186de67db65688cdd53f (diff)
downloadotp-82be6a3e5589781551ca9170cb212983463f1446.tar.gz
otp-82be6a3e5589781551ca9170cb212983463f1446.tar.bz2
otp-82be6a3e5589781551ca9170cb212983463f1446.zip
Merge branch 'sverk/crypto/aes-cbc-192-bit'
OTP-13206 * sverk/crypto/aes-cbc-192-bit: crypto: Support 192-bit keys for AES CBC
Diffstat (limited to 'lib/crypto/src/crypto.erl')
-rw-r--r--lib/crypto/src/crypto.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl
index 8722e801a6..3e24ff2b0a 100644
--- a/lib/crypto/src/crypto.erl
+++ b/lib/crypto/src/crypto.erl
@@ -274,6 +274,7 @@ hmac_final_n(Context, HashLen) ->
des3_cbc | des3_cbf | des_ede3 |
blowfish_cbc | blowfish_cfb64 | blowfish_ofb64 |
aes_cbc128 | aes_cfb8 | aes_cfb128 | aes_cbc256 | aes_ige256 |
+ aes_cbc |
rc2_cbc,
Key::iodata(), Ivec::binary(), Data::iodata()) -> binary();
(aes_gcm | chacha20_poly1305, Key::iodata(), Ivec::binary(), {AAD::binary(), Data::iodata()}) -> {binary(), binary()}.
@@ -287,6 +288,7 @@ block_encrypt(Type, Key, Ivec, Data) when Type =:= des_cbc;
Type =:= aes_cfb8;
Type =:= aes_cfb128;
Type =:= aes_cbc256;
+ Type =:= aes_cbc;
Type =:= rc2_cbc ->
block_crypt_nif(Type, Key, Ivec, Data, true);
block_encrypt(Type, Key0, Ivec, Data) when Type =:= des3_cbc;
@@ -307,6 +309,7 @@ block_encrypt(chacha20_poly1305, Key, Ivec, {AAD, Data}) ->
des3_cbc | des3_cbf | des_ede3 |
blowfish_cbc | blowfish_cfb64 | blowfish_ofb64 |
aes_cbc128 | aes_cfb8 | aes_cfb128 | aes_cbc256 | aes_ige256 |
+ aes_cbc |
rc2_cbc,
Key::iodata(), Ivec::binary(), Data::iodata()) -> binary();
(aes_gcm | chacha20_poly1305, Key::iodata(), Ivec::binary(),
@@ -316,6 +319,7 @@ block_decrypt(Type, Key, Ivec, Data) when Type =:= des_cbc;
Type =:= blowfish_cbc;
Type =:= blowfish_cfb64;
Type =:= blowfish_ofb64;
+ Type =:= aes_cbc;
Type =:= aes_cbc128;
Type =:= aes_cfb8;
Type =:= aes_cfb128;