Issue in `ECDH(a, B)` with check calculating shared secret?
Created by: cobratbq
I'm in conversation with Bouncy Castle devs. He noticed something in the section on generating shared secrets.
ECDH(a, B) K_ecdh = a * B if K_ecdh == 0 (check that it is an all-zero value) return error else return K_ecdh
He is wondering if
if K_ecdh == 0 is a remnant of the Montgomery-based logic, where
0 is the neutral element as Montgomery
u-coordinate. Given that we work with Edwards representation, should this be a comparison to
(0, 1) (neutral element)? (or its corresponding binary encoding)