OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

pkcs11 message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [pkcs11] FW: [pkcs11-comment] pkcs11.h build errors


And to be precise - the header file changes are as follows:

--- a/working/3-00-current/pkcs11t.h
+++ b/working/3-00-current/pkcs11t.h
@@ -2380,13 +2380,13 @@ typedef struct CK_XEDDSA_PARAMS {
Âtypedef CK_XEDDSA_PARAMS CK_PTR CK_XEDDSA_PARAMS_PTR;
Â
Âtypedef struct CK_HKDF_PARAMS {
- Â CK_BOOL bExtract;
- Â CK_BOOL bExpand;
+ Â CK_BBOOL bExtract;
+ Â CK_BBOOL bExpand;
  CK_MECHANISM_TYPE prfHashMechanism;
  CK_ULONG ulSaltType;
  CK_BYTE_PTR pSalt;
  CK_ULONG ulSaltLen;
- Â CK_HANDLE hSaltKey;
+ Â CK_OBJECT_HANDLE ÂhSaltKey;
  CK_BYTE_PTR pInfo;
  CK_ULONG ulInfoLen;
Â} CK_HKDF_PARAMS;



On Mon, Oct 28, 2019 at 11:08 PM Daniel Minder <Daniel.Minder@utimaco.com> wrote:
All,

probably you've seen the attached mail that was sent to pkcs11-comment.

In fact, Patrick is right with all his comments...

To (1):
CK_BOOL should be CK_BBOOL and CK_HANDLE should be CK_OBJECT_HANDLE in the CK_HKDF_PARAMS struct both in the header AND in the Current Mechanisms Specification section 2.62.2!

To (2):
The header file is current and the Base Specification is wrong! C_EncryptMessageNext and C_DecryptMessageNext need the pParameter/ulParameterLen parameters since, for example section 2.13.2 (AES GCM) says: "Call C_EncryptMessage(), or C_EncryptMessageBegin() followed by C_EncryptMessageNext()*. The mechanism parameter is passed to all three of these functions."

So, we should change the header and mech spec for (1) and the base spec for (2).

Regards,
Daniel

-----Original Message-----
From: pkcs11-comment@lists.oasis-open.org <pkcs11-comment@lists.oasis-open.org> On Behalf Of Patrick Steuer
Sent: Sonntag, 27. Oktober 2019 13:52
To: pkcs11-comment@lists.oasis-open.org
Subject: [pkcs11-comment] pkcs11.h build errors

Hi,

just wanted to report some build errors with pkcs11 header files in case you are not already aware of them:

(1)
In file included from include/pkcs11.h:149:0

include/pkcs11t.h:2383:4: error: unknown type name 'CK_BOOL'
  ÂCK_BOOL bExtract; Â// should be CK_BBOOL ?
  Â^
include/pkcs11t.h:2384:4: error: unknown type name 'CK_BOOL'
  ÂCK_BOOL bExpand;  // should be CK_BBOOL ?
  Â^
include/pkcs11t.h:2389:4: error: unknown type name 'CK_HANDLE'
  ÂCK_HANDLE hSaltKey; // couldnt find definition
  Â^

(2)
error: conflicting types for 'C_EncryptMessageNext'
error: conflicting types for 'C_DecryptMessageNext'

Those functions' signatures are differ in header file and spec.

pkcs11f.h:

CK_PKCS11_FUNCTION_INFO(C_EncryptMessageNext)
(
 ÂCK_SESSION_HANDLE hSession,
 ÂCK_VOID_PTR pParameter,
 ÂCK_ULONG ulParameterLen,
 ÂCK_BYTE_PTR pPlaintextPart,
 ÂCK_ULONG ulPlaintextPartLen,
 ÂCK_BYTE_PTR pCiphertextPart,
 ÂCK_ULONG_PTR pulCiphertextPartLen,
 ÂCK_FLAGS flags
);

CK_PKCS11_FUNCTION_INFO(C_DecryptMessageNext)
(
 ÂCK_SESSION_HANDLE hSession,
 ÂCK_VOID_PTR pParameter,
 ÂCK_ULONG ulParameterLen,
 ÂCK_BYTE_PTR pCiphertext,
 ÂCK_ULONG ulCiphertextLen,
 ÂCK_BYTE_PTR pPlaintext,
 ÂCK_ULONG_PTR pulPlaintextLen,
 ÂCK_FLAGS flags
);

https://docs.oasis-open.org/pkcs11/pkcs11-base/v3.0/pkcs11-base-v3.0.docx :

CK_DECLARE_FUNCTION(CK_RV, C_EncryptMessageNext)(
 ÂCK_SESSION_HANDLE hSession,
 ÂCK_BYTE_PTR pPlaintextPart,
 ÂCK_ULONG ulPlaintextPartLen,
 ÂCK_BYTE_PTR pCiphertextPart,
 ÂCK_ULONG_PTR pulCiphertextPartLen,
 ÂCK_ULONG flags
);

CK_DECLARE_FUNCTION(CK_RV, C_DecryptMessageNext)(
 ÂCK_SESSION_HANDLE hSession,
 ÂCK_BYTE_PTR pCiphertextPart,
 ÂCK_ULONG ulCiphertextPartLen,
 ÂCK_BYTE_PTR pPlaintextPart,
 ÂCK_ULONG_PTR pulPlaintextPartLen,
 ÂCK_FLAGS flags
);

Header files obtained from
https://docs.oasis-open.org/pkcs11/pkcs11-base/v3.0/csprd01/include/pkcs11-v3.0/

Best regards
Patrick

--
This publicly archived list offers a means to provide input to the OASIS PKCS 11 TC.

In order to verify user consent to the Feedback License terms and to minimize spam in the list archive, subscription is required before posting.

Subscribe: pkcs11-comment-subscribe@lists.oasis-open.org
Unsubscribe: pkcs11-comment-unsubscribe@lists.oasis-open.org
List help: pkcs11-comment-help@lists.oasis-open.org
List archive: http://lists.oasis-open.org/archives/pkcs11-comment/
Feedback License: http://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
Committee: http://www.oasis-open.org/committees/pkcs11
Join OASIS: http://www.oasis-open.org/join/



________________________________

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 (Chairman) CEO, Malte Pollmann CSO, Dr. Frank J. Nellissen CFO

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.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]