Skip to content

RSA key size #3105

Answered by dengert
msetina asked this question in Q&A
Apr 9, 2024 · 3 comments · 3 replies
Discussion options

You must be logged in to vote

PKCS11 "CKA_MODULUS_BITS" is not an attribute of object class "CKO_PRIVATE_KEY, key type CKK_RSA"
"CKA_MODULUS_BITS" is an attribute of "CKO_PUBLIC_KEY, key type CKK_RSA"

"Note that when generating an RSA private key, there is no CKA_MODULUS_BITS attribute specified. 389 This is because RSA private keys are only generated as part of an RSA key pair, and the 390 CKA_MODULUS_BITS attribute for the pair is specified in the template for the RSA public key."

See https://docs.oasis-open.org/pkcs11/pkcs11-curr/v3.0/os/pkcs11-curr-v3.0-os.pdf in sections "2.1.2 RSA public key objects" and "2.1.3 RSA private key objects.

The CKO_PRIVATE_KEY, CKO_PUBLIC_KEY and CKO_CERTIFICATE should all contain th…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@mouse07410
Comment options

@msetina
Comment options

Comment options

You must be logged in to vote
1 reply
@msetina
Comment options

Answer selected by msetina
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants