Coder Social home page Coder Social logo

Comments (5)

ozbenh avatar ozbenh commented on August 14, 2024

Note: I'm basically following your README.md example using an arbitrary large file (larger than 2560 bytes) as input

from aws-kms-pkcs11.

ozbenh avatar ozbenh commented on August 14, 2024

Hrm.. ok so you expect to be getting a digest which indeed shouldn't be that big... I'm not sure what openssl is smoking here .. ugh.

from aws-kms-pkcs11.

JackOfMostTrades avatar JackOfMostTrades commented on August 14, 2024

So I'm just finally circling around to looking at this, and it does seem like the pkeyutl example in the README doesn't quite play nice with RSA keys (I just end up testing EC keys in my workflow). With RSA keys it seems like you need to supply a hint about what digest you're using because of all the weird digest identifier prefixes that get prepended to digests under the weird RSASSA_PKCS1_V1_5_* spec. I think it's just a matter of passing in -pkeyopt digest:sha256 option when doing both the pkeyutl sign and verify operations.

from aws-kms-pkcs11.

JackOfMostTrades avatar JackOfMostTrades commented on August 14, 2024

Yea, the pkeyutl does expect foo to be the digest (not the raw message). I also just checked and for RSA keys only you have to pass in the -pkeyutl digest:sha256 option so that openssl expects/uses that digest algorithm identifier prefix. Added a note about that option to the README.

from aws-kms-pkcs11.

ozbenh avatar ozbenh commented on August 14, 2024

Thanks !

from aws-kms-pkcs11.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.