summaryrefslogtreecommitdiffstats
path: root/providers/common/ciphers
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2019-04-08 18:19:59 +0200
committerMatt Caswell <matt@openssl.org>2019-04-19 10:31:54 +0200
commit819a7ae9fc7721f675757c0925821f91b20dfc8f (patch)
tree74581c672aae6ae1a1aeb7e9403625de5edf893c /providers/common/ciphers
parentImplement AES CFB ciphers in the default provider (diff)
downloadopenssl-819a7ae9fc7721f675757c0925821f91b20dfc8f.tar.xz
openssl-819a7ae9fc7721f675757c0925821f91b20dfc8f.zip
Implement AES CTR ciphers in the default provider
Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/8700)
Diffstat (limited to 'providers/common/ciphers')
-rw-r--r--providers/common/ciphers/aes.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/providers/common/ciphers/aes.c b/providers/common/ciphers/aes.c
index a7af6a6773..285fea6ea9 100644
--- a/providers/common/ciphers/aes.c
+++ b/providers/common/ciphers/aes.c
@@ -219,6 +219,12 @@ IMPLEMENT_new_ctx(cfb8, CFB, 256)
IMPLEMENT_new_ctx(cfb8, CFB, 192)
IMPLEMENT_new_ctx(cfb8, CFB, 128)
+/* CTR */
+IMPLEMENT_new_params(ctr, CTR)
+IMPLEMENT_new_ctx(ctr, CTR, 256)
+IMPLEMENT_new_ctx(ctr, CTR, 192)
+IMPLEMENT_new_ctx(ctr, CTR, 128)
+
static void aes_freectx(void *vctx)
{
PROV_AES_KEY *ctx = (PROV_AES_KEY *)vctx;
@@ -362,3 +368,8 @@ IMPLEMENT_stream_funcs(cfb1, 128, 16)
IMPLEMENT_stream_funcs(cfb8, 256, 16)
IMPLEMENT_stream_funcs(cfb8, 192, 16)
IMPLEMENT_stream_funcs(cfb8, 128, 16)
+
+/* CTR */
+IMPLEMENT_stream_funcs(ctr, 256, 16)
+IMPLEMENT_stream_funcs(ctr, 192, 16)
+IMPLEMENT_stream_funcs(ctr, 128, 16)