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