cloudflare / circl

CIRCL: Cloudflare Interoperable Reusable Cryptographic Library
http://blog.cloudflare.com/introducing-circl
Other
1.27k stars 142 forks source link

R=2^32 ? #365

Closed kriskwiatkowski closed 2 years ago

kriskwiatkowski commented 2 years ago

Shouldn't this be? (256)⁻¹ R² mod q, where R = 2³²

> sage -c "Q=8380417;L=32;R=2^L;print((R^2)/(2^8)%Q)"
41978

https://github.com/cloudflare/circl/blob/0a9554f37a47ea95082a1c70c0551377007c5ac9/sign/dilithium/internal/common/params/params.go#L12

bwesterb commented 2 years ago

Yeah, that's a typo.

kriskwiatkowski commented 2 years ago

Thank you. I started to think, I'm missing something here.