| ... | @@ -146,7 +146,7 @@ pub const Ghash = struct { | ... | @@ -146,7 +146,7 @@ pub const Ghash = struct { |
| 146 | | 146 | |
| 147 | // Software carryless multiplication of two 64-bit integers. | 147 | // Software carryless multiplication of two 64-bit integers. |
| 148 | fn clmulSoft(x_: u128, y_: u128, comptime half: Selector) u128 { | 148 | fn clmulSoft(x_: u128, y_: u128, comptime half: Selector) u128 { |
| 149 | const x = @truncate(u64, if (half == .hi) x_ >> 64 else x_); | 149 | const x = @truncate(u64, if (half == .hi or half == .hi_lo) x_ >> 64 else x_); |
| 150 | const y = @truncate(u64, if (half == .hi) y_ >> 64 else y_); | 150 | const y = @truncate(u64, if (half == .hi) y_ >> 64 else y_); |
| 151 | | 151 | |
| 152 | const x0 = x & 0x1111111111111110; | 152 | const x0 = x & 0x1111111111111110; |