diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-18 02:45:03 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-18 04:21:16 +0200 |
commit | 9a2f6963065576df10aff603411ecc96b3981995 (patch) | |
tree | bb0fa077291024ad6d4e0b00ba5487df5608cb1a /src/crypto/zinc/poly1305/poly1305-x86_64-glue.h | |
parent | f0ea799b1b0e920e4fd00d977dffa240f527bbee (diff) |
poly1305-x86_64: show full struct for state
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/crypto/zinc/poly1305/poly1305-x86_64-glue.h')
-rw-r--r-- | src/crypto/zinc/poly1305/poly1305-x86_64-glue.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h b/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h index 2158863..d6495cd 100644 --- a/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h +++ b/src/crypto/zinc/poly1305/poly1305-x86_64-glue.h @@ -61,8 +61,11 @@ static inline bool poly1305_init_arch(void *ctx, } struct poly1305_arch_internal { - u32 state[5]; - u32 simd_is_engaged; + u32 h[5]; + u32 is_base2_26; + u64 r[2]; + u64 pad; + struct { u32 r2, r1, r4, r3; } rn[9]; }; static inline bool poly1305_blocks_arch(void *ctx, const u8 *inp, @@ -72,7 +75,7 @@ static inline bool poly1305_blocks_arch(void *ctx, const u8 *inp, struct poly1305_arch_internal *state = ctx; if (!poly1305_use_avx || - (len < (POLY1305_BLOCK_SIZE * 18) && !state->simd_is_engaged) || + (len < (POLY1305_BLOCK_SIZE * 18) && !state->is_base2_26) || !simd_use(simd_context)) poly1305_blocks_x86_64(ctx, inp, len, padbit); else @@ -101,8 +104,7 @@ static inline bool poly1305_emit_arch(void *ctx, u8 mac[POLY1305_MAC_SIZE], { struct poly1305_arch_internal *state = ctx; - if (!poly1305_use_avx || !state->simd_is_engaged || - !simd_use(simd_context)) + if (!poly1305_use_avx || !state->is_base2_26 ||!simd_use(simd_context)) poly1305_emit_x86_64(ctx, mac, nonce); else #ifdef CONFIG_AS_AVX512 |