diff options
| author | Frank Denis <github@pureftpd.org> | 2022-11-17 23:54:21 +0100 |
|---|---|---|
| committer | Frank Denis <github@pureftpd.org> | 2022-11-17 23:54:21 +0100 |
| commit | 4dd061a7ac3160c322fd035bc4a7bfa7a0bb9d13 (patch) | |
| tree | 87fb9da6610b7f2e9c5bad598ed6aad0e64571f7 /lib | |
| parent | 3051e279a5b9519481e38ce61fba436664b17d0e (diff) | |
| download | zig-4dd061a7ac3160c322fd035bc4a7bfa7a0bb9d13.tar.gz zig-4dd061a7ac3160c322fd035bc4a7bfa7a0bb9d13.zip | |
ghash: handle the .hi_lo case when no CLMUL acceleration is present, too
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/std/crypto/ghash.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/crypto/ghash.zig b/lib/std/crypto/ghash.zig index 7052b07794..c60710c4ba 100644 --- a/lib/std/crypto/ghash.zig +++ b/lib/std/crypto/ghash.zig @@ -146,7 +146,7 @@ pub const Ghash = struct { // Software carryless multiplication of two 64-bit integers. fn clmulSoft(x_: u128, y_: u128, comptime half: Selector) u128 { - const x = @truncate(u64, if (half == .hi) x_ >> 64 else x_); + const x = @truncate(u64, if (half == .hi or half == .hi_lo) x_ >> 64 else x_); const y = @truncate(u64, if (half == .hi) y_ >> 64 else y_); const x0 = x & 0x1111111111111110; |
