sha3: Fix applying second padding bit on big-endian platforms

Fixes: 56f4b2096a ("sha3: Fix Keccak when compiled with GCC 13.x")
This commit is contained in:
Tobias Brunner
2026-07-24 08:47:39 +02:00
parent ac7f071673
commit 1b9b037816
+1 -1
View File
@@ -435,7 +435,7 @@ METHOD(sha3_keccak_t, finalize, void,
* optimizations */
rate_lanes = (this->rate - 1) / sizeof(uint64_t);
remainder = (this->rate - 1) % sizeof(uint64_t);
state_lanes[rate_lanes] ^= (0x80ULL << remainder * 8);
state_lanes[rate_lanes] ^= htole64(0x80ULL << remainder * 8);
/* Switch to the squeezing phase */
keccak_f1600_state_permute(this->state);