Closed jjteo74 closed 11 months ago
Aah indeed. This seems like a bug in Mpint::from_positive_bytes
which could potentially strip leading zeroes and then add one if appropriate, rather than the current behavior of returning Error::FormatEncoding
if there are leading zeroes.
p256::ecdsa::Signature::split_bytes
may return byte slices that start with0
, i.e. a negative SSHmpint
, causingError::FormatEncoding
to be returned when being encoded as positive SSHmpint
in the following code fromsignature.rs
.The tests below demonstrate this error.