-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return value issues #14
Comments
A RSA signature is just a big number represented as a byte string. It should have the size of the RSA modulus, which is 256 bytes for a 2048 bit RSA key for instance. There is # Build the digest info TLV as PKCS#1
ary1 = [
OpenSSL::ASN1::ObjectId.new('SHA256'),
OpenSSL::ASN1::Null.new(nil),
]
ary2 = [
OpenSSL::ASN1::Sequence.new(ary1),
OpenSSL::ASN1::OctetString.new(OpenSSL::Digest::SHA256.new(document_to_be_signed).digest),
]
raw_value_to_be_signed = OpenSSL::ASN1::Sequence.new(ary2).to_der Similarly for Simple raw RSA signature is also in our tests: pkcs11/test/test_pkcs11_crypt.rb Lines 72 to 89 in eeda7cb
|
PKCS11 RSA signature is returning a bit string or something. Is there a way to specify the format of the signature that gets returned?
The text was updated successfully, but these errors were encountered: