randombit / botan

Cryptography Toolkit
https://botan.randombit.net
BSD 2-Clause "Simplified" License
2.59k stars 570 forks source link

Explore using _BitInt instead of donna128 #4420

Open randombit opened 3 weeks ago

randombit commented 3 weeks ago

This way Clang never sees donna128 and can't do it's nasty/smart optimizations.

This assumes _BitInt is constant time which it is on x86-64 but I should check RISC-V32 since that seems worst case (32 bit, no carry bit) [*]

[*] And if _BitInt is not ct on RISCV that probably prevent using it for word3 also