From a736615412832431df9ccb8909c3c2374f529470 Mon Sep 17 00:00:00 2001 From: Tiago Oliveira Date: Thu, 27 Jun 2024 12:51:27 +0100 Subject: [PATCH] sct: poly1305 --- src/crypto_onetimeauth/poly1305/amd64/avx/onetimeauth.jazz | 4 ++++ src/crypto_onetimeauth/poly1305/amd64/avx2/onetimeauth.jazz | 4 ++++ src/crypto_onetimeauth/poly1305/amd64/ref/onetimeauth.jazz | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src/crypto_onetimeauth/poly1305/amd64/avx/onetimeauth.jazz b/src/crypto_onetimeauth/poly1305/amd64/avx/onetimeauth.jazz index 5d0eb076..6a44f48a 100644 --- a/src/crypto_onetimeauth/poly1305/amd64/avx/onetimeauth.jazz +++ b/src/crypto_onetimeauth/poly1305/amd64/avx/onetimeauth.jazz @@ -9,6 +9,8 @@ export fn jade_onetimeauth_poly1305_amd64_avx(reg u64 mac input input_length key input_length = input_length; key = key; + _ = #init_msf(); + __poly1305_avx(mac, input, input_length, key); ?{}, r = #set0(); @@ -24,6 +26,8 @@ export fn jade_onetimeauth_poly1305_amd64_avx_verify(reg u64 mac input input_len input_length = input_length; key = key; + _ = #init_msf(); + r = __poly1305_verify_avx(mac, input, input_length, key); return r; diff --git a/src/crypto_onetimeauth/poly1305/amd64/avx2/onetimeauth.jazz b/src/crypto_onetimeauth/poly1305/amd64/avx2/onetimeauth.jazz index 71ee3f39..03a80f3c 100644 --- a/src/crypto_onetimeauth/poly1305/amd64/avx2/onetimeauth.jazz +++ b/src/crypto_onetimeauth/poly1305/amd64/avx2/onetimeauth.jazz @@ -9,6 +9,8 @@ export fn jade_onetimeauth_poly1305_amd64_avx2(reg u64 mac input input_length ke input_length = input_length; key = key; + _ = #init_msf(); + __poly1305_avx2(mac, input, input_length, key); ?{}, r = #set0(); @@ -24,6 +26,8 @@ export fn jade_onetimeauth_poly1305_amd64_avx2_verify(reg u64 mac input input_le input_length = input_length; key = key; + _ = #init_msf(); + r = __poly1305_verify_avx2(mac, input, input_length, key); return r; diff --git a/src/crypto_onetimeauth/poly1305/amd64/ref/onetimeauth.jazz b/src/crypto_onetimeauth/poly1305/amd64/ref/onetimeauth.jazz index f0179e1c..3b389990 100644 --- a/src/crypto_onetimeauth/poly1305/amd64/ref/onetimeauth.jazz +++ b/src/crypto_onetimeauth/poly1305/amd64/ref/onetimeauth.jazz @@ -9,6 +9,8 @@ export fn jade_onetimeauth_poly1305_amd64_ref(reg u64 mac input input_length key input_length = input_length; key = key; + _ = #init_msf(); + __poly1305_ref(mac, input, input_length, key); ?{}, r = #set0(); @@ -24,6 +26,8 @@ export fn jade_onetimeauth_poly1305_amd64_ref_verify(reg u64 mac input input_len input_length = input_length; key = key; + _ = #init_msf(); + r = __poly1305_verify_ref(mac, input, input_length, key); return r;