tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit d8ca300d5aa0e5727366f626fc692e34957ba4dc
parent bd8b1b2185b6311517d9d8c379483fd80442cba5
Author: Alexander Hansen Færøy <ahf@torproject.org>
Date:   Tue, 10 Jun 2025 14:35:21 +0200

Merge branch 'tor_41091' into 'main'

cgo: Use the correct operation to re-align AES.

Closes #41091

See merge request tpo/core/tor!906
Diffstat:
Msrc/core/crypto/relay_crypto_cgo.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/crypto/relay_crypto_cgo.c b/src/core/crypto/relay_crypto_cgo.c @@ -190,7 +190,7 @@ cgo_prf_xor_t0(cgo_prf_t *prf, const uint8_t *input, // Re-align the cipher. // // This approach is faster than EVP_CIPHER_set_num! - const int ns = 16 - (PRF_T0_DATA_LEN % 0xf); + const int ns = 16 - (PRF_T0_DATA_LEN & 0xf); // We're not using the hash for anything, so it's okay to overwrite aes_crypt_inplace(prf->k, (char*)hash, ns); }