diff options
author | Damjan Marion <dmarion@me.com> | 2020-02-12 18:30:17 +0100 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2020-02-12 19:10:55 +0000 |
commit | 8727acdd92ca67ae4ee6c7681dd9e862c0d6d000 (patch) | |
tree | 230d8339ffefa8a04f06f3b8de59c3ed1f7ea6de /src/plugins | |
parent | f0beeb0da03d584e60ecf7baf5f7ed552f7a082a (diff) |
crypto-native: fix ghash function naming
Type: refactor
Change-Id: I1d594af6d7c0d065d5c2decc5b22d549189b1882
Signed-off-by: Damjan Marion <dmarion@me.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/crypto_native/ghash.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/crypto_native/ghash.h b/src/plugins/crypto_native/ghash.h index 3f68f80dab4..79f4a348af2 100644 --- a/src/plugins/crypto_native/ghash.h +++ b/src/plugins/crypto_native/ghash.h @@ -124,13 +124,13 @@ gmul_lo_lo (u8x16 a, u8x16 b) } static_always_inline u8x16 -gmul_lo_hi (u8x16 a, u8x16 b) +gmul_hi_lo (u8x16 a, u8x16 b) { return (u8x16) _mm_clmulepi64_si128 ((__m128i) a, (__m128i) b, 0x01); } static_always_inline u8x16 -gmul_hi_lo (u8x16 a, u8x16 b) +gmul_lo_hi (u8x16 a, u8x16 b) { return (u8x16) _mm_clmulepi64_si128 ((__m128i) a, (__m128i) b, 0x10); } @@ -165,7 +165,7 @@ ghash_mul_first (ghash_data_t * gd, u8x16 a, u8x16 b) /* a0 * b0 */ gd->lo = gmul_lo_lo (a, b); /* a0 * b1 ^ a1 * b0 */ - gd->mid = (gmul_lo_hi (a, b) ^ gmul_hi_lo (a, b)); + gd->mid = (gmul_hi_lo (a, b) ^ gmul_lo_hi (a, b)); /* set gd->pending to 0 so next invocation of ghash_mul_next(...) knows that there is no pending data in tmp_lo and tmp_hi */ @@ -198,7 +198,7 @@ ghash_mul_next (ghash_data_t * gd, u8x16 a, u8x16 b) } /* gd->mid ^= a0 * b1 ^ a1 * b0 */ - gd->mid = ghash_xor3 (gd->mid, gmul_lo_hi (a, b), gmul_hi_lo (a, b)); + gd->mid = ghash_xor3 (gd->mid, gmul_hi_lo (a, b), gmul_lo_hi (a, b)); } static_always_inline void @@ -223,7 +223,7 @@ ghash_reduce (ghash_data_t * gd) gd->hi ^= midr; } - r = gmul_lo_hi (ghash_poly2, gd->lo); + r = gmul_hi_lo (ghash_poly2, gd->lo); gd->lo ^= u8x16_word_shift_left (r, 8); } @@ -231,7 +231,7 @@ static_always_inline void ghash_reduce2 (ghash_data_t * gd) { gd->tmp_lo = gmul_lo_lo (ghash_poly2, gd->lo); - gd->tmp_hi = gmul_hi_lo (ghash_poly2, gd->lo); + gd->tmp_hi = gmul_lo_hi (ghash_poly2, gd->lo); } static_always_inline u8x16 |