You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Marshaling back and forth from ASN1 is difficult as the handling of BN integers requires it have a non leading 1 to prevent the number being read as negative.
We should add OpenSSL::PKey::EC#dsa_sign(hash: String, k: , r:) => [ r: OpenSSL:BN, s: OpenSSL:BN ] and OpenSSL::PKey::EC#dsa_verify(r: OpenSSL:BN, s: OpenSSL:BN) => bool to support these operations.
The native methods would be ECDSA_do_sign_ex and ECDSA_do_verify
The text was updated successfully, but these errors were encountered:
The simple implementation might be to parse the ASN1 and return the two BN values as a helper method as this is a stable OpenSSL API surface. Will implement as a pure Ruby convenance method now that a deterministic k implementation is complete.
Conversely a verify that takes r and s as OpenSSL::BN and then calls the ASN1 function by encoding a signature is the opposite of that.
Marshaling back and forth from ASN1 is difficult as the handling of BN integers requires it have a non leading 1 to prevent the number being read as negative.
We should add
OpenSSL::PKey::EC#dsa_sign(hash: String, k: , r:) => [ r: OpenSSL:BN, s: OpenSSL:BN ]
andOpenSSL::PKey::EC#dsa_verify(r: OpenSSL:BN, s: OpenSSL:BN) => bool
to support these operations.The native methods would be
ECDSA_do_sign_ex
andECDSA_do_verify
The text was updated successfully, but these errors were encountered: