Re: Curve25519/448 key agreement for SSH

Damien Miller <[email protected]>
Newsgroups gmane.ietf.secsh
Message-ID <[email protected]>
On Tue, 10 Nov 2015, Simon Josefsson wrote:

> Damien Miller <[email protected]> writes:
> 
> >>    the number X are then converted into a big integer k.  This
> >>    conversion follows the network byte order.  This step differs from
> >>    [RFC5656].
> >
> > Maybe "converted into a big integer k by treating the value X as an
> > unsigned, network-byte order integer".
>
> For Curve448, it appears to lead to 56 byte bigint or sometimes (when
> msb is 1) a 57 byte bigint with leading zero. Is this a problem? If
> somebody could observe the size difference, it would leak the MSB. If
> worth resolving, how to resolve it?

AFAIK it might not be possible to resolve without being incompatible
with the deployed [email protected] protocol: OpenSSH at
least checks for correct zero-padding for mpints with the MSB set.

When OpenSSH first added [email protected], I accidentally
messed up this padding and it would cause ~1/128 connections to libssh
to fail :/

IMO it's probably not worth fixing this now; the other kex protocols
have the same problem, and the shared secret is never sent on the wire.

-d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.