From cda3dc51520680d52df56fd22f42db4e64c84600 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 17 Sep 2018 03:58:17 +0200 Subject: poly1305: do not require simd context for arch Signed-off-by: Jason A. Donenfeld --- src/crypto/zinc/chacha20poly1305.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/crypto/zinc/chacha20poly1305.c') diff --git a/src/crypto/zinc/chacha20poly1305.c b/src/crypto/zinc/chacha20poly1305.c index ee9434b..92a5b9c 100644 --- a/src/crypto/zinc/chacha20poly1305.c +++ b/src/crypto/zinc/chacha20poly1305.c @@ -45,7 +45,7 @@ __chacha20poly1305_encrypt(u8 *dst, const u8 *src, const size_t src_len, chacha20_init(&chacha20_state, key, nonce); chacha20(&chacha20_state, b.block0, b.block0, sizeof(b.block0), simd_context); - poly1305_init(&poly1305_state, b.block0, simd_context); + poly1305_init(&poly1305_state, b.block0); poly1305_update(&poly1305_state, ad, ad_len, simd_context); poly1305_update(&poly1305_state, pad0, (0x10 - ad_len) & 0xf, @@ -102,7 +102,7 @@ bool chacha20poly1305_encrypt_sg(struct scatterlist *dst, chacha20_init(&chacha20_state, key, nonce); chacha20(&chacha20_state, b.block0, b.block0, sizeof(b.block0), simd_context); - poly1305_init(&poly1305_state, b.block0, simd_context); + poly1305_init(&poly1305_state, b.block0); poly1305_update(&poly1305_state, ad, ad_len, simd_context); poly1305_update(&poly1305_state, pad0, (0x10 - ad_len) & 0xf, @@ -173,7 +173,7 @@ __chacha20poly1305_decrypt(u8 *dst, const u8 *src, const size_t src_len, chacha20_init(&chacha20_state, key, nonce); chacha20(&chacha20_state, b.block0, b.block0, sizeof(b.block0), simd_context); - poly1305_init(&poly1305_state, b.block0, simd_context); + poly1305_init(&poly1305_state, b.block0); poly1305_update(&poly1305_state, ad, ad_len, simd_context); poly1305_update(&poly1305_state, pad0, (0x10 - ad_len) & 0xf, @@ -243,7 +243,7 @@ bool chacha20poly1305_decrypt_sg(struct scatterlist *dst, chacha20_init(&chacha20_state, key, nonce); chacha20(&chacha20_state, b.block0, b.block0, sizeof(b.block0), simd_context); - poly1305_init(&poly1305_state, b.block0, simd_context); + poly1305_init(&poly1305_state, b.block0); poly1305_update(&poly1305_state, ad, ad_len, simd_context); poly1305_update(&poly1305_state, pad0, (0x10 - ad_len) & 0xf, -- cgit v1.2.3