OASIS PKCS 11 TC

 View Only
  • 1.  Groups - Kem Algorithms uploaded

    Posted 02-01-2023 00:09
    Submitter's message General decisions in this and the KEM API proposal which bear more discussion:

    1) I called the new functions C_Encapsulate and C_Decapsulate rather than C_EncapsulateKey and C_DecapsulateKey. It might make sence to go with the former as it matches C_WrapKey, C_UnwrapKey, and C_DeriveKey.
    2) I added C_Encapsulate/C_Decapsulate definitions several existing mechanisms: CKM_RSA_PKCS, CKM_RSA_OAEP, CKM_RSA_X509, CKM_ECDH_DERIVE, CKM_ECDH_COFACTOR_DERIVE, CKM_DH_DERIVE, CKM_DH_X9_42_DERIVE.
    I didn't add C_Encapsulate/C_Decapsulate definitions for any of the RSA TPS mechanisms. The seemed pretty specific for TPS.
    I didn't add C_Encapsulate/C_Decapsulate definitions for any of the ECDH/DH variants which use 2 keys (They don't really map to KEMS).
    I added CKM_RSA_X509 KEM as the NIST RSASVE. It might make since, to define a separate mechanism fro RSASVE (which is KEM only).
    3) For Kyber, I defined a single mechanism and key type and the Parameter set is an attribute of the key. I defined the parameter set as a PKCS #11 constant and not a set of parameters since the security of Kyber is tightly tied to getting the parameters correct (and it avoids issues we have with using parameterized curves in ECC).
    I also defined the mechanism as providing Kyber.CPAPKE if used with wrap/unwrap. Should this really be a separate mechanism. The private key in Kyber CPAPKE is a subset of the CCAKEM private key. The public keys are identical. It's possible NIST will not define a public CPAPKE interface, but just define it as a primitive used to build CCAKEM.
    Kyber key lengths are a bit a a mash. I chose the public key length as key length specified in C_MECHANISM_INFO, and set it's length to bytes (which is different than our existing public key algorithms, but consistent with all the new Post Quantum algorithm documentation).
    I did not define any of the 90s Parameter sets (though everything is specified in a way that adding future parameter sets would not be difficult). it's even possible we could define experimental Parameter sets that match the Round 3 Proposal.
    We could also define the parameter sets as an oid, and push the definition back to x509/ansi. -- Mr. Robert Relyea Document Name : Kem Algorithms Description Algorithms that can use the new Kem APIs Download Latest Revision Public Download Link Submitter : Mr. Robert Relyea Group : OASIS PKCS 11 TC Folder : Working Drafts Date submitted : 2023-01-31 16:09:14


  • 2.  RE: [pkcs11] Groups - Kem Algorithms uploaded

    Posted 02-14-2023 14:52
    Hi Bob,   I noticed the following wording that needs updates: Occurrences of C_Encaspulate/C_Decaspulate, C_Decapslate, C_Encapsulated/C_Decapsulated, C_Enapsulate, Decapsulte across the 2 proposals Proposal KEM Algorithms, section 1.4.2 Kyber public key objects: I suggest to include the attribute {CKA_ENCAPSULATE, &true, sizeof(true)} in the example Proposal KEM Algorithms, section 1.4.3 Kyber private key objects: remove attribute {CKA_PARAMETER_SET, &param_set, sizeof(param_set)} from the example, as per definition the parameter set is not specified in the private key template   I have no additional topics for discussion than the ones you already brought up.   Best regards, Dieter   From: pkcs11@lists.oasis-open.org <pkcs11@lists.oasis-open.org> On Behalf Of Robert Relyea Sent: Wednesday, February 1, 2023 1:09 AM To: pkcs11@lists.oasis-open.org Subject: [pkcs11] Groups - Kem Algorithms uploaded   Submitter's message General decisions in this and the KEM API proposal which bear more discussion: 1) I called the new functions C_Encapsulate and C_Decapsulate rather than C_EncapsulateKey and C_DecapsulateKey. It might make sence to go with the former as it matches C_WrapKey, C_UnwrapKey, and C_DeriveKey. 2) I added C_Encapsulate/C_Decapsulate definitions several existing mechanisms: CKM_RSA_PKCS, CKM_RSA_OAEP, CKM_RSA_X509, CKM_ECDH_DERIVE, CKM_ECDH_COFACTOR_DERIVE, CKM_DH_DERIVE, CKM_DH_X9_42_DERIVE. I didn't add C_Encapsulate/C_Decapsulate definitions for any of the RSA TPS mechanisms. The seemed pretty specific for TPS. I didn't add C_Encapsulate/C_Decapsulate definitions for any of the ECDH/DH variants which use 2 keys (They don't really map to KEMS). I added CKM_RSA_X509 KEM as the NIST RSASVE. It might make since, to define a separate mechanism fro RSASVE (which is KEM only). 3) For Kyber, I defined a single mechanism and key type and the Parameter set is an attribute of the key. I defined the parameter set as a PKCS #11 constant and not a set of parameters since the security of Kyber is tightly tied to getting the parameters correct (and it avoids issues we have with using parameterized curves in ECC). I also defined the mechanism as providing Kyber.CPAPKE if used with wrap/unwrap. Should this really be a separate mechanism. The private key in Kyber CPAPKE is a subset of the CCAKEM private key. The public keys are identical. It's possible NIST will not define a public CPAPKE interface, but just define it as a primitive used to build CCAKEM. Kyber key lengths are a bit a a mash. I chose the public key length as key length specified in C_MECHANISM_INFO, and set it's length to bytes (which is different than our existing public key algorithms, but consistent with all the new Post Quantum algorithm documentation). I did not define any of the 90s Parameter sets (though everything is specified in a way that adding future parameter sets would not be difficult). it's even possible we could define experimental Parameter sets that match the Round 3 Proposal. We could also define the parameter sets as an oid, and push the definition back to x509/ansi. -- Mr. Robert Relyea Document Name : Kem Algorithms Description Algorithms that can use the new Kem APIs Download Latest Revision Public Download Link Submitter : Mr. Robert Relyea Group : OASIS PKCS 11 TC Folder : Working Drafts Date submitted : 2023-01-31 16:09:14   Utimaco IS GmbH Germanusstr. 4, D.52080 Aachen, Germany, Tel: +49-241-1696-0, www.utimaco.com Seat: Aachen – Registergericht Aachen HRB 18922 VAT ID No.: DE 815 496 496 Managementboard: Stefan Auerbach, Martin Stamm This communication is confidential. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. Please inform us immediately and destroy the email.


  • 3.  RE: [pkcs11] Groups - Add KEM APIs to PKCS #11, Trust Objects draft 2

    Posted 02-14-2023 20:15
    A few more nits in pkcs11_key.pdf (assuming they haven’t already been picked up)   Section 1.2         “CKA_ENCASPULATE” Meaning entry in the table contains “used to in”; “cipher text” should be one word 1.3.1     talks about a new “secret key object,” but nowhere is the term “shared secret” used; based on the recent draft-housley-lamps-cms-kemri-01, I think it would be wise to make this connection with “standard terminology” somehow; again “cipher text” should be one word; “and encapsulate operation” should be “a prior encapsulate operation with the corresponding public key” (or something to that effect); “the the”   pkcs11_trust_object.pdf: Obvious nits are that fonts are inconsistent in the table of section 1.1.2 and that punctuation in the list of “final attributes” on p. 5 varies as you go down the list; the list might be easier to read as a table.   I did have some substantive suggestions for improving the text from “Applications choose which…” on page 4 through “with the trust object” on p. 5, but lost them in an Acrobat crash! I will try to resurrect that.   -mjm    


  • 4.  Re: [pkcs11] Groups - Add KEM APIs to PKCS #11, Trust Objects draft 2

    Posted 05-05-2023 20:34
    On 2/14/23 12:14 PM, Michael Markowitz wrote: A few more nits in pkcs11_key.pdf (assuming they havenât already been picked up) Thanks, fixing these kinds of things helps reduce the load on the editors (as well as reduce or review load on 3.2 when we move it to draft standard)!  Section 1.2 âCKA_ENCASPULATEâ Meaning entry in the table contains âused to inâ; âcipher textâ should be one word Done 1.3.1  talks about a new âsecret key object,â but nowhere is the term âshared secretâ used; based on the recent draft-housley-lamps-cms-kemri-01, I think it would be wise to make this connection with âstandard terminologyâ somehow; The 'secret key object' here is the PKCS #11 object type (secret key), so it's a appropriate to keep this, I've tried to add additional text which identified the secret key object with the KEM 'shared key'. again âcipher textâ should be one word; âand encapsulate operationâ should be âa prior encapsulate operation with the corresponding public keyâ (or something to that effect); âthe theâ Thanks updated in draft 2.  pkcs11_trust_object.pdf: Obvious nits are that fonts are inconsistent in the table of section 1.1.2 and that punctuation in the list of âfinal attributesâ on p. 5 varies as you go down the list; the list might be easier to read as a table.  I did have some substantive suggestions for improving the text from âApplications choose whichââ on page 4 through âwith the trust objectâ on p. 5, but lost them in an Acrobat crash! I will try to resurrect that.  -mjm  Â


  • 5.  Re: [pkcs11] Groups - Kem Algorithms uploaded

    Posted 05-05-2023 20:30
    On 2/14/23 6:51 AM, Dieter Bong wrote: Hi Bob,  I noticed the following wording that needs updates: Occurrences of C_Encaspulate/C_Decaspulate, C_Decapslate, C_Encapsulated/C_Decapsulated, C_Enapsulate, Decapsulte across the 2 proposals Thanks I found occurances of everything bug C_Encapsulated and fixed them (I also didn't find and occurances of C_Encaspulate or C_Decaspulate, but I did find occurances of CKA_ENCASPULATE and CKA_DECASPULATE as well as some actual encaspulate and decapsulate in the text and tables. The current draft should now only have C_Encapsulate/C_Decapsulate. I haven't gotten any feedback on whether C_EncapsulateKey and C_DecapsulateKey would be better. Proposal KEM Algorithms, section 1.4.2 Kyber public key objects: I suggest to include the attribute {CKA_ENCAPSULATE, &true, sizeof(true)} in the example Thanks good catch. Proposal KEM Algorithms, section 1.4.3 Kyber private key objects: remove attribute {CKA_PARAMETER_SET, &param_set, sizeof(param_set)} from the example, as per definition the parameter set is not specified in the private key template That applies to key gen. This table is clearly for C_CreateObject (since it include CKA_VALUE), which would include the parameter set. (Keygen gets the parameter set from the public key template, but it doesn't exist for C_CreateObject).  I have no additional topics for discussion than the ones you already brought up.  Best regards, Dieter  From: pkcs11@lists.oasis-open.org <pkcs11@lists.oasis-open.org> On Behalf Of Robert Relyea Sent: Wednesday, February 1, 2023 1:09 AM To: pkcs11@lists.oasis-open.org Subject: [pkcs11] Groups - Kem Algorithms uploaded  Submitter's message General decisions in this and the KEM API proposal which bear more discussion: 1) I called the new functions C_Encapsulate and C_Decapsulate rather than C_EncapsulateKey and C_DecapsulateKey. It might make sence to go with the former as it matches C_WrapKey, C_UnwrapKey, and C_DeriveKey. 2) I added C_Encapsulate/C_Decapsulate definitions several existing mechanisms: CKM_RSA_PKCS, CKM_RSA_OAEP, CKM_RSA_X509, CKM_ECDH_DERIVE, CKM_ECDH_COFACTOR_DERIVE, CKM_DH_DERIVE, CKM_DH_X9_42_DERIVE. I didn't add C_Encapsulate/C_Decapsulate definitions for any of the RSA TPS mechanisms. The seemed pretty specific for TPS. I didn't add C_Encapsulate/C_Decapsulate definitions for any of the ECDH/DH variants which use 2 keys (They don't really map to KEMS). I added CKM_RSA_X509 KEM as the NIST RSASVE. It might make since, to define a separate mechanism fro RSASVE (which is KEM only). 3) For Kyber, I defined a single mechanism and key type and the Parameter set is an attribute of the key. I defined the parameter set as a PKCS #11 constant and not a set of parameters since the security of Kyber is tightly tied to getting the parameters correct (and it avoids issues we have with using parameterized curves in ECC). I also defined the mechanism as providing Kyber.CPAPKE if used with wrap/unwrap. Should this really be a separate mechanism. The private key in Kyber CPAPKE is a subset of the CCAKEM private key. The public keys are identical. It's possible NIST will not define a public CPAPKE interface, but just define it as a primitive used to build CCAKEM. Kyber key lengths are a bit a a mash. I chose the public key length as key length specified in C_MECHANISM_INFO, and set it's length to bytes (which is different than our existing public key algorithms, but consistent with all the new Post Quantum algorithm documentation). I did not define any of the 90s Parameter sets (though everything is specified in a way that adding future parameter sets would not be difficult). it's even possible we could define experimental Parameter sets that match the Round 3 Proposal. We could also define the parameter sets as an oid, and push the definition back to x509/ansi. -- Mr. Robert Relyea Document Name : Kem Algorithms Description Algorithms that can use the new Kem APIs Download Latest Revision Public Download Link Submitter : Mr. Robert Relyea Group : OASIS PKCS 11 TC Folder : Working Drafts Date submitted : 2023-01-31 16:09:14  Utimaco IS GmbH Germanusstr. 4, D.52080 Aachen, Germany, Tel: +49-241-1696-0, www.utimaco.com Seat: Aachen â Registergericht Aachen HRB 18922 VAT ID No.: DE 815 496 496 Managementboard: Stefan Auerbach, Martin Stamm This communication is confidential. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. Please inform us immediately and destroy the email.


  • 6.  RE: [pkcs11] Groups - Kem Algorithms uploaded

    Posted 02-14-2023 22:19
    Hi I’ve added some questions/comments inline below in response to your comments. And here I have some additional questions/comments I had.   1)      I know this is an early draft, but there are grammatical mistakes (or just inconsistencies) where you added “and key encapsulation and key decapsulation”.  I sure this wasn’t the your main focus for the draft. 2)      ECDH/DH. should we be more specific about the format of the returned public keys?  We’ve had issues related to this in the paste. This may apply to some of the other KEM mechanisms too. 3)      Kyber a.      Why did you choose to include wrap/unwrap using Kyber.CPAPKE yet exclude encrypt/decrypt?  Its limitations? complexity? or you didn’t see a need for it? b.      should the CKA_VALUE attribute really be a Big Integer? shouldn’t it be a byte array given that it is a compressed and encoded polynomial? c.       section 1.4.4, CKA_BASE and CKA_PRIME are used.  I assume this is a type.   And finally, below are other questions I received from various people at Thales.  I didn’t have time to review them internally with them.  - (1.4.1 Definitions): Why introduce new CK_KYBER_PARAMETER_SET_TYPE (CKP_KYBER512, CKP_KYBER768, CKP_KYBER1024) attribute?  I like it... but, why introduce this new parameter if we can reuse CKA_VALUE_LEN just like Symmetric keys do to determine strength (i.e. AES: 16, 24, 32)?   - (1.4.2 Kyber public key objects): The Kyber public key should have the CKA_ENCAPSULATE attribute set during creation. Just like the private key template has CKA_DECAPSULATE: {CKA_ENCAPSULATE, &true, sizeof(true)},   - (1.4.3 Kyber private key objects): The statement below does NOT match the example attribute template.  It DOES contain CKA_PARAMETER_SET "Note that when generating a Kyber private key, the parameter set is not specified in the key’s template . This is because Kyber private keys are only generated as part of a Kyber key pair, and the parameter set for the pair is specified in the template for the Kyber public key." [DJ] The example was for “creating a private key”, which implies C_CreateObject. With that in mind, I think the sample code is valid?   CK_ATTRIBUTE template[] = { {CKA_CLASS, &class, sizeof(class)}, {CKA_KEY_TYPE, &keyType, sizeof(keyType)}, {CKA_TOKEN, &true, sizeof(true)}, {CKA_LABEL, label, sizeof(label)-1}, {CKA_SUBJECT, subject, sizeof(subject)}, {CKA_ID, id, sizeof(id)}, {CKA_SENSITIVE, &true, sizeof(true)}, {CKA_DECAPSULATE, &true, sizeof(true)}, {CKA_PARAMETER_SET, &param_set, sizeof(param_set)}, {CKA_VALUE, value, sizeof(value)}   In my opinion, the parameter_set attribute should be on both public and private key attribute templates.   - (1.4.4 Kyber key pair generation): What are "CKA_PRIME” and “CKA_BASE" attributes used to generate a new private key?  The library (liboqs) we use to generate Kyber keys does NOT require such attributes. [DJ]  I assume this is a typo or copy-paste error.     From: pkcs11@lists.oasis-open.org <pkcs11@lists.oasis-open.org> On Behalf Of Robert Relyea Sent: Tuesday, January 31, 2023 7:09 PM To: pkcs11@lists.oasis-open.org Subject: [pkcs11] Groups - Kem Algorithms uploaded   Submitter's message General decisions in this and the KEM API proposal which bear more discussion: 1) I called the new functions C_Encapsulate and C_Decapsulate rather than C_EncapsulateKey and C_DecapsulateKey. It might make sence to go with the former as it matches C_WrapKey, C_UnwrapKey, and C_DeriveKey. [DJ] I assume you are suggesting that we should stick with the C_xxxKey convention? 2) I added C_Encapsulate/C_Decapsulate definitions several existing mechanisms: CKM_RSA_PKCS, CKM_RSA_OAEP, CKM_RSA_X509, CKM_ECDH_DERIVE, CKM_ECDH_COFACTOR_DERIVE, CKM_DH_DERIVE, CKM_DH_X9_42_DERIVE. I didn't add C_Encapsulate/C_Decapsulate definitions for any of the RSA TPS mechanisms. The seemed pretty specific for TPS. [DJ] You mean TPM right? just making sure there isn’t something else I’m not aware of. I didn't add C_Encapsulate/C_Decapsulate definitions for any of the ECDH/DH variants which use 2 keys (They don't really map to KEMS). I added CKM_RSA_X509 KEM as the NIST RSASVE. It might make since, to define a separate mechanism fro RSASVE (which is KEM only). [DJ] I agree. That might make it easier to leverage things like CKA_ALLOWED_MECHANISMS. 3) For Kyber, I defined a single mechanism and key type and the Parameter set is an attribute of the key. I defined the parameter set as a PKCS #11 constant and not a set of parameters since the security of Kyber is tightly tied to getting the parameters correct (and it avoids issues we have with using parameterized curves in ECC). I also defined the mechanism as providing Kyber.CPAPKE if used with wrap/unwrap. Should this really be a separate mechanism. The private key in Kyber CPAPKE is a subset of the CCAKEM private key. The public keys are identical. It's possible NIST will not define a public CPAPKE interface, but just define it as a primitive used to build CCAKEM. [DJ] Given that the keys are not identical, they probably need their own key type and mechanism.  Either that, or some other way to identify the key.  CKA_KEY_GEN_MECHANISM would help, but wouldn’t work well for unwrapped keys. Kyber key lengths are a bit a a mash. I chose the public key length as key length specified in C_MECHANISM_INFO, and set it's length to bytes (which is different than our existing public key algorithms, but consistent with all the new Post Quantum algorithm documentation). [DJ] I had the same thoughts. I can’t see any clean way to manage this.  I did not define any of the 90s Parameter sets (though everything is specified in a way that adding future parameter sets would not be difficult). it's even possible we could define experimental Parameter sets that match the Round 3 Proposal. We could also define the parameter sets as an oid, and push the definition back to x509/ansi. -- Mr. Robert Relyea Document Name : Kem Algorithms Description Algorithms that can use the new Kem APIs Download Latest Revision Public Download Link Submitter : Mr. Robert Relyea Group : OASIS PKCS 11 TC Folder : Working Drafts Date submitted : 2023-01-31 16:09:14    


  • 7.  Re: [pkcs11] Groups - Kem Algorithms uploaded

    Posted 05-09-2023 15:26
    On 2/14/23 2:18 PM, JOHNSON Darren wrote: Hi Iâve added some questions/comments inline below in response to your comments. And here I have some additional questions/comments I had.  1)  I know this is an early draft, but there are grammatical mistakes (or just inconsistencies) where you added âand key encapsulation and key decapsulationâ. I sure this wasnât the your main focus for the draft. It's a draft toward voting on (once we've handled all the comments). Identify typos and mistakes are definitely worthwhile. as for the above text, the whole sentence with changes reads: It supports single-part encryption and decryption; single-part signatures and verification with and without message recovery; key wrapping and key unwrapping; and key encapsulation and key decapsulation. It's already unweildly, and my only goal was to add key encapsulation and key decapsulation I'm definitely open to suggestions on how to improve it. 2)  ECDH/DH. should we be more specific about the format of the returned public keys? Weâve had issues related to this in the paste. This may apply to some of the other KEM mechanisms too. I've added text that the ciphertext == public key is the same format as the public key in C_DeriveKey for this mechanism. Other KEMs are explicit in their spec what the format of ciphertext is. 3)  Kyber a.  Why did you choose to include wrap/unwrap using Kyber.CPAPKE yet exclude encrypt/decrypt? Its limitations? complexity? or you didnât see a need for it? It's really defined as a key wrap. it's security to wrap arbitrary data isn't as strong. If there is a need to I could include encrypt/decrypt. (There is a convenience case for using encrypt/decrypt... when you just want to token to do the math for you but not hold the key, I'm not sure if a lot of new protocols will add the key wrap version to them, though). b.  should the CKA_VALUE attribute really be a Big Integer? shouldnât it be a byte array given that it is a compressed and encoded polynomial? Good point, yes. c.  section 1.4.4, CKA_BASE and CKA_PRIME are used. I assume this is a type. Yup, a typo it should be CKA_PARAMETER_SET  And finally, below are other questions I received from various people at Thales. I didnât have time to review them internally with them. - (1.4.1 Definitions): Why introduce new CK_KYBER_PARAMETER_SET_TYPE (CKP_KYBER512, CKP_KYBER768, CKP_KYBER1024) attribute? I like it... but, why introduce this new parameter if we can reuse CKA_VALUE_LEN just like Symmetric keys do to determine strength (i.e. AES: 16, 24, 32)? Parameter sets are 1) not the same as key lengths, and 2) do not have unique key lengths. These values are tied to the public and private keys since the keys are uniquely generated with a parameter set (and must only be used in that parameter set). Think of them as 'curves' in ECC. In this spec I've updated it to make it clear only ROUND3 is defined now. In the future, when the NIST SPEC is out I'll include the SP 800 versions of this. I've renamed the CKP_KYBERxxx parameter set to include _ROUND3 to make it clear the difference between them and the final set.  - (1.4.2 Kyber public key objects): The Kyber public key should have the CKA_ENCAPSULATE attribute set during creation. Just like the private key template has CKA_DECAPSULATE: {CKA_ENCAPSULATE, &true, sizeof(true)},  - (1.4.3 Kyber private key objects): The statement below does NOT match the example attribute template. It DOES contain CKA_PARAMETER_SET Note that when generating a Kyber private key, the parameter set is not specified in the keyâs template . This is because Kyber private keys are only generated as part of a Kyber key pair, and the parameter set for the pair is specified in the template for the Kyber public key. [DJ] The example was for âcreating a private keyâ, which implies C_CreateObject. With that in mind, I think the sample code is valid?  CK_ATTRIBUTE template[] = { {CKA_CLASS, &class, sizeof(class)}, {CKA_KEY_TYPE, &keyType, sizeof(keyType)}, {CKA_TOKEN, &true, sizeof(true)}, {CKA_LABEL, label, sizeof(label)-1}, {CKA_SUBJECT, subject, sizeof(subject)}, {CKA_ID, id, sizeof(id)}, {CKA_SENSITIVE, &true, sizeof(true)}, {CKA_DECAPSULATE, &true, sizeof(true)}, {CKA_PARAMETER_SET, &param_set, sizeof(param_set)}, {CKA_VALUE, value, sizeof(value)}  In my opinion, the parameter_set attribute should be on both public and private key attribute templates.  - (1.4.4 Kyber key pair generation): What are CKA_PRIMEâ and âCKA_BASE attributes used to generate a new private key? The library (liboqs) we use to generate Kyber keys does NOT require such attributes. [DJ] I assume this is a typo or copy-paste error.   From: pkcs11@lists.oasis-open.org <pkcs11@lists.oasis-open.org> On Behalf Of Robert Relyea Sent: Tuesday, January 31, 2023 7:09 PM To: pkcs11@lists.oasis-open.org Subject: [pkcs11] Groups - Kem Algorithms uploaded  Submitter's message General decisions in this and the KEM API proposal which bear more discussion: 1) I called the new functions C_Encapsulate and C_Decapsulate rather than C_EncapsulateKey and C_DecapsulateKey. It might make sence to go with the former as it matches C_WrapKey, C_UnwrapKey, and C_DeriveKey. [DJ] I assume you are suggesting that we should stick with the C_xxxKey convention? I was implying it, but I haven't gotten any feedback on which to do. currently it's without the 'Key'. 2) I added C_Encapsulate/C_Decapsulate definitions several existing mechanisms: CKM_RSA_PKCS, CKM_RSA_OAEP, CKM_RSA_X509, CKM_ECDH_DERIVE, CKM_ECDH_COFACTOR_DERIVE, CKM_DH_DERIVE, CKM_DH_X9_42_DERIVE. I didn't add C_Encapsulate/C_Decapsulate definitions for any of the RSA TPS mechanisms. The seemed pretty specific for TPS. [DJ] You mean TPM right? just making sure there isnât something else Iâm not aware of. yes, TPM I didn't add C_Encapsulate/C_Decapsulate definitions for any of the ECDH/DH variants which use 2 keys (They don't really map to KEMS). I added CKM_RSA_X509 KEM as the NIST RSASVE. It might make since, to define a separate mechanism fro RSASVE (which is KEM only). [DJ] I agree. That might make it easier to leverage things like CKA_ALLOWED_MECHANISMS. This is different than the feedback I got in the meeting. I've left it the same for now, but I'm up for changing it. 3) For Kyber, I defined a single mechanism and key type and the Parameter set is an attribute of the key. I defined the parameter set as a PKCS #11 constant and not a set of parameters since the security of Kyber is tightly tied to getting the parameters correct (and it avoids issues we have with using parameterized curves in ECC). I also defined the mechanism as providing Kyber.CPAPKE if used with wrap/unwrap. Should this really be a separate mechanism. The private key in Kyber CPAPKE is a subset of the CCAKEM private key. The public keys are identical. It's possible NIST will not define a public CPAPKE interface, but just define it as a primitive used to build CCAKEM. [DJ] Given that the keys are not identical, they probably need their own key type and mechanism. Either that, or some other way to identify the key. CKA_KEY_GEN_MECHANISM would help, but wouldnât work well for unwrapped keys. Kyber key lengths are a bit a a mash. I chose the public key length as key length specified in C_MECHANISM_INFO, and set it's length to bytes (which is different than our existing public key algorithms, but consistent with all the new Post Quantum algorithm documentation). [DJ] I had the same thoughts. I canât see any clean way to manage this. I did not define any of the 90s Parameter sets (though everything is specified in a way that adding future parameter sets would not be difficult). it's even possible we could define experimental Parameter sets that match the Round 3 Proposal. We could also define the parameter sets as an oid, and push the definition back to x509/ansi. -- Mr. Robert Relyea Document Name : Kem Algorithms Description Algorithms that can use the new Kem APIs Download Latest Revision Public Download Link Submitter : Mr. Robert Relyea Group : OASIS PKCS 11 TC Folder : Working Drafts Date submitted : 2023-01-31 16:09:14  Â