aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-03-21 11:28:23 +0100
committerLoïc Hoguin <[email protected]>2019-03-21 11:28:23 +0100
commite7c0b56a28a85959fbde9de88b982cae94bf3474 (patch)
tree6cdb01bd3f4e59da0bd51c122b73bbcfcb96e083 /lib/crypto
parent00b62166411300ef3cb9d2f992682ff968695fd3 (diff)
downloadotp-e7c0b56a28a85959fbde9de88b982cae94bf3474.tar.gz
otp-e7c0b56a28a85959fbde9de88b982cae94bf3474.tar.bz2
otp-e7c0b56a28a85959fbde9de88b982cae94bf3474.zip
Hardcode aes_ctr cipher infos to support older cryptolibs
Diffstat (limited to 'lib/crypto')
-rw-r--r--lib/crypto/src/crypto.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl
index 4df7e6360c..34fc1b2f41 100644
--- a/lib/crypto/src/crypto.erl
+++ b/lib/crypto/src/crypto.erl
@@ -540,6 +540,16 @@ poly1305(Key, Data) ->
-spec cipher_info(Type) -> map() when Type :: block_cipher_with_iv()
| aead_cipher()
| block_cipher_without_iv().
+%% These ciphers are not available via the EVP interface on older cryptolibs.
+cipher_info(aes_ctr) ->
+ #{block_size => 1,iv_length => 16,key_length => 32,mode => ctr_mode,type => undefined};
+cipher_info(aes_128_ctr) ->
+ #{block_size => 1,iv_length => 16,key_length => 16,mode => ctr_mode,type => undefined};
+cipher_info(aes_192_ctr) ->
+ #{block_size => 1,iv_length => 16,key_length => 24,mode => ctr_mode,type => undefined};
+cipher_info(aes_256_ctr) ->
+ #{block_size => 1,iv_length => 16,key_length => 32,mode => ctr_mode,type => undefined};
+%% This cipher is handled specialy.
cipher_info(aes_ige256) ->
#{block_size => 16,iv_length => 32,key_length => 16,mode => ige_mode,type => undefined};
cipher_info(Type) ->