cloudflare / circl

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

sike: blinds the difference point to prevent invalid case in xDblAdd #297

Closed armfazh closed 2 years ago

armfazh commented 2 years ago

The xDbladd(P,Q,QmP) function has an exceptional case when QmP is a point of order two: either T=(0,1) or O=(1,0). When this happens, the isogeny calculation continues with registers filled with all-zeros.

The fix proposed detects when QmP is exceptional, and replaces its value with a random one. Both detection and replacement are performed in constant-time.

Bug reported by Hovav & Wang.