1 /* pkcs-11v2-20a3.h include file for the PKCS #11 Version 2.20 Amendment 3 2 document. */ 3 4 /* $Revision: 1.4 $ */ 5 6 /* License to copy and use this software is granted provided that it is 7 * identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface 8 * (Cryptoki) Version 2.20 Amendment 3" in all material mentioning or 9 * referencing this software. 10 11 * RSA Security Inc. makes no representations concerning either the 12 * merchantability of this software or the suitability of this software for 13 * any particular purpose. It is provided "as is" without express or implied 14 * warranty of any kind. 15 */ 16 17 /* This file is preferably included after inclusion of pkcs11.h */ 18 19 #ifndef _PKCS_11V2_20A3_H_ 20 #define _PKCS_11V2_20A3_H_ 1 21 22 /* Are the definitions of this file already included in pkcs11t.h ? */ 23 #ifndef CKK_CAMELLIA 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 /* Key types */ 30 31 /* Camellia is new for PKCS #11 v2.20 amendment 3 */ 32 #define CKK_CAMELLIA 0x00000025 33 /* ARIA is new for PKCS #11 v2.20 amendment 3 */ 34 #define CKK_ARIA 0x00000026 35 36 37 /* Mask-generating functions */ 38 39 /* SHA-224 is new for PKCS #11 v2.20 amendment 3 */ 40 #define CKG_MGF1_SHA224 0x00000005 41 42 43 /* Mechanism Identifiers */ 44 45 /* SHA-224 is new for PKCS #11 v2.20 amendment 3 */ 46 #define CKM_SHA224 0x00000255 47 #define CKM_SHA224_HMAC 0x00000256 48 #define CKM_SHA224_HMAC_GENERAL 0x00000257 49 50 /* SHA-224 key derivation is new for PKCS #11 v2.20 amendment 3 */ 51 #define CKM_SHA224_KEY_DERIVATION 0x00000396 52 53 /* SHA-224 RSA mechanisms are new for PKCS #11 v2.20 amendment 3 */ 54 #define CKM_SHA224_RSA_PKCS 0x00000046 55 #define CKM_SHA224_RSA_PKCS_PSS 0x00000047 56 57 /* AES counter mode is new for PKCS #11 v2.20 amendment 3 */ 58 #define CKM_AES_CTR 0x00001086 59 60 /* Camellia is new for PKCS #11 v2.20 amendment 3 */ 61 #define CKM_CAMELLIA_KEY_GEN 0x00000550 62 #define CKM_CAMELLIA_ECB 0x00000551 63 #define CKM_CAMELLIA_CBC 0x00000552 64 #define CKM_CAMELLIA_MAC 0x00000553 65 #define CKM_CAMELLIA_MAC_GENERAL 0x00000554 66 #define CKM_CAMELLIA_CBC_PAD 0x00000555 67 #define CKM_CAMELLIA_ECB_ENCRYPT_DATA 0x00000556 68 #define CKM_CAMELLIA_CBC_ENCRYPT_DATA 0x00000557 69 #define CKM_CAMELLIA_CTR 0x00000558 70 71 /* ARIA is new for PKCS #11 v2.20 amendment 3 */ 72 #define CKM_ARIA_KEY_GEN 0x00000560 73 #define CKM_ARIA_ECB 0x00000561 74 #define CKM_ARIA_CBC 0x00000562 75 #define CKM_ARIA_MAC 0x00000563 76 #define CKM_ARIA_MAC_GENERAL 0x00000564 77 #define CKM_ARIA_CBC_PAD 0x00000565 78 #define CKM_ARIA_ECB_ENCRYPT_DATA 0x00000566 79 #define CKM_ARIA_CBC_ENCRYPT_DATA 0x00000567 80 81 82 /* Mechanism parameters */ 83 84 /* CK_AES_CTR_PARAMS is new for PKCS #11 v2.20 amendment 3 */ 85 typedef struct CK_AES_CTR_PARAMS { 86 CK_ULONG ulCounterBits; 87 CK_BYTE cb[16]; 88 } CK_AES_CTR_PARAMS; 89 90 typedef CK_AES_CTR_PARAMS CK_PTR CK_AES_CTR_PARAMS_PTR; 91 92 /* CK_CAMELLIA_CTR_PARAMS is new for PKCS #11 v2.20 amendment 3 */ 93 typedef struct CK_CAMELLIA_CTR_PARAMS { 94 CK_ULONG ulCounterBits; 95 CK_BYTE cb[16]; 96 } CK_CAMELLIA_CTR_PARAMS; 97 98 typedef CK_CAMELLIA_CTR_PARAMS CK_PTR CK_CAMELLIA_CTR_PARAMS_PTR; 99 100 /* CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS is new for PKCS #11 v2.20 amendment 3 */ 101 typedef struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS { 102 CK_BYTE iv[16]; 103 CK_BYTE_PTR pData; 104 CK_ULONG length; 105 } CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS; 106 107 typedef CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS CK_PTR CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR; 108 109 /* CK_ARIA_CBC_ENCRYPT_DATA_PARAMS is new for PKCS #11 v2.20 amendment 3 */ 110 typedef struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS { 111 CK_BYTE iv[16]; 112 CK_BYTE_PTR pData; 113 CK_ULONG length; 114 } CK_ARIA_CBC_ENCRYPT_DATA_PARAMS; 115 116 typedef CK_ARIA_CBC_ENCRYPT_DATA_PARAMS CK_PTR CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR; 117 118 #ifdef __cplusplus 119 } 120 #endif 121 122 #endif 123 124 #endif