OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
2 * License, v. 2.0. If a copy of the MPL was not distributed with this | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 | 4 |
5 #ifndef _PKCS11N_H_ | 5 #ifndef _PKCS11N_H_ |
6 #define _PKCS11N_H_ | 6 #define _PKCS11N_H_ |
7 | 7 |
8 /* | 8 /* |
9 * pkcs11n.h | 9 * pkcs11n.h |
10 * | 10 * |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 * NSS-defined key types | 44 * NSS-defined key types |
45 * | 45 * |
46 */ | 46 */ |
47 #define CKK_NSS (CKK_VENDOR_DEFINED|NSSCK_VENDOR_NSS) | 47 #define CKK_NSS (CKK_VENDOR_DEFINED|NSSCK_VENDOR_NSS) |
48 | 48 |
49 #define CKK_NSS_PKCS8 (CKK_NSS + 1) | 49 #define CKK_NSS_PKCS8 (CKK_NSS + 1) |
50 | 50 |
51 #define CKK_NSS_JPAKE_ROUND1 (CKK_NSS + 2) | 51 #define CKK_NSS_JPAKE_ROUND1 (CKK_NSS + 2) |
52 #define CKK_NSS_JPAKE_ROUND2 (CKK_NSS + 3) | 52 #define CKK_NSS_JPAKE_ROUND2 (CKK_NSS + 3) |
53 | 53 |
| 54 #define CKK_NSS_CHACHA20 (CKK_NSS + 4) |
| 55 |
54 /* | 56 /* |
55 * NSS-defined certificate types | 57 * NSS-defined certificate types |
56 * | 58 * |
57 */ | 59 */ |
58 #define CKC_NSS (CKC_VENDOR_DEFINED|NSSCK_VENDOR_NSS) | 60 #define CKC_NSS (CKC_VENDOR_DEFINED|NSSCK_VENDOR_NSS) |
59 | 61 |
60 /* FAKE PKCS #11 defines */ | 62 /* FAKE PKCS #11 defines */ |
61 #define CKA_DIGEST 0x81000000L | 63 #define CKA_DIGEST 0x81000000L |
62 #define CKA_FLAGS_ONLY 0 /* CKA_CLASS */ | 64 #define CKA_FLAGS_ONLY 0 /* CKA_CLASS */ |
63 | 65 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 */ | 209 */ |
208 #define CKM_NSS_HMAC_CONSTANT_TIME (CKM_NSS + 19) | 210 #define CKM_NSS_HMAC_CONSTANT_TIME (CKM_NSS + 19) |
209 #define CKM_NSS_SSL3_MAC_CONSTANT_TIME (CKM_NSS + 20) | 211 #define CKM_NSS_SSL3_MAC_CONSTANT_TIME (CKM_NSS + 20) |
210 | 212 |
211 /* TLS 1.2 mechanisms */ | 213 /* TLS 1.2 mechanisms */ |
212 #define CKM_NSS_TLS_PRF_GENERAL_SHA256 (CKM_NSS + 21) | 214 #define CKM_NSS_TLS_PRF_GENERAL_SHA256 (CKM_NSS + 21) |
213 #define CKM_NSS_TLS_MASTER_KEY_DERIVE_SHA256 (CKM_NSS + 22) | 215 #define CKM_NSS_TLS_MASTER_KEY_DERIVE_SHA256 (CKM_NSS + 22) |
214 #define CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256 (CKM_NSS + 23) | 216 #define CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256 (CKM_NSS + 23) |
215 #define CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256 (CKM_NSS + 24) | 217 #define CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256 (CKM_NSS + 24) |
216 | 218 |
| 219 #define CKM_NSS_CHACHA20_KEY_GEN (CKM_NSS + 25) |
| 220 #define CKM_NSS_CHACHA20_POLY1305 (CKM_NSS + 26) |
| 221 |
217 /* | 222 /* |
218 * HISTORICAL: | 223 * HISTORICAL: |
219 * Do not attempt to use these. They are only used by NETSCAPE's internal | 224 * Do not attempt to use these. They are only used by NETSCAPE's internal |
220 * PKCS #11 interface. Most of these are place holders for other mechanism | 225 * PKCS #11 interface. Most of these are place holders for other mechanism |
221 * and will change in the future. | 226 * and will change in the future. |
222 */ | 227 */ |
223 #define CKM_NETSCAPE_PBE_SHA1_DES_CBC 0x80000002UL | 228 #define CKM_NETSCAPE_PBE_SHA1_DES_CBC 0x80000002UL |
224 #define CKM_NETSCAPE_PBE_SHA1_TRIPLE_DES_CBC 0x80000003UL | 229 #define CKM_NETSCAPE_PBE_SHA1_TRIPLE_DES_CBC 0x80000003UL |
225 #define CKM_NETSCAPE_PBE_SHA1_40_BIT_RC2_CBC 0x80000004UL | 230 #define CKM_NETSCAPE_PBE_SHA1_40_BIT_RC2_CBC 0x80000004UL |
226 #define CKM_NETSCAPE_PBE_SHA1_128_BIT_RC2_CBC 0x80000005UL | 231 #define CKM_NETSCAPE_PBE_SHA1_128_BIT_RC2_CBC 0x80000005UL |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 * be a problem because the SSL/TLS protocol limits the size of an SSL | 279 * be a problem because the SSL/TLS protocol limits the size of an SSL |
275 * record to something considerably less than 2^32 bytes. | 280 * record to something considerably less than 2^32 bytes. |
276 */ | 281 */ |
277 typedef struct CK_NSS_MAC_CONSTANT_TIME_PARAMS { | 282 typedef struct CK_NSS_MAC_CONSTANT_TIME_PARAMS { |
278 CK_MECHANISM_TYPE macAlg; /* in */ | 283 CK_MECHANISM_TYPE macAlg; /* in */ |
279 CK_ULONG ulBodyTotalLen; /* in */ | 284 CK_ULONG ulBodyTotalLen; /* in */ |
280 CK_BYTE * pHeader; /* in */ | 285 CK_BYTE * pHeader; /* in */ |
281 CK_ULONG ulHeaderLen; /* in */ | 286 CK_ULONG ulHeaderLen; /* in */ |
282 } CK_NSS_MAC_CONSTANT_TIME_PARAMS; | 287 } CK_NSS_MAC_CONSTANT_TIME_PARAMS; |
283 | 288 |
| 289 typedef struct CK_NSS_AEAD_PARAMS { |
| 290 CK_BYTE_PTR pIv; /* This is the nonce. */ |
| 291 CK_ULONG ulIvLen; |
| 292 CK_BYTE_PTR pAAD; |
| 293 CK_ULONG ulAADLen; |
| 294 CK_ULONG ulTagBits; |
| 295 } CK_NSS_AEAD_PARAMS; |
| 296 |
284 /* | 297 /* |
285 * NSS-defined return values | 298 * NSS-defined return values |
286 * | 299 * |
287 */ | 300 */ |
288 #define CKR_NSS (CKM_VENDOR_DEFINED|NSSCK_VENDOR_NSS) | 301 #define CKR_NSS (CKM_VENDOR_DEFINED|NSSCK_VENDOR_NSS) |
289 | 302 |
290 #define CKR_NSS_CERTDB_FAILED (CKR_NSS + 1) | 303 #define CKR_NSS_CERTDB_FAILED (CKR_NSS + 1) |
291 #define CKR_NSS_KEYDB_FAILED (CKR_NSS + 2) | 304 #define CKR_NSS_KEYDB_FAILED (CKR_NSS + 2) |
292 | 305 |
293 /* Mandatory parameter for the CKM_NSS_HKDF_* key deriviation mechanisms. | 306 /* Mandatory parameter for the CKM_NSS_HKDF_* key deriviation mechanisms. |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 char *parameters, void *moduleSpec); | 470 char *parameters, void *moduleSpec); |
458 | 471 |
459 /* softoken slot ID's */ | 472 /* softoken slot ID's */ |
460 #define SFTK_MIN_USER_SLOT_ID 4 | 473 #define SFTK_MIN_USER_SLOT_ID 4 |
461 #define SFTK_MAX_USER_SLOT_ID 100 | 474 #define SFTK_MAX_USER_SLOT_ID 100 |
462 #define SFTK_MIN_FIPS_USER_SLOT_ID 101 | 475 #define SFTK_MIN_FIPS_USER_SLOT_ID 101 |
463 #define SFTK_MAX_FIPS_USER_SLOT_ID 127 | 476 #define SFTK_MAX_FIPS_USER_SLOT_ID 127 |
464 | 477 |
465 | 478 |
466 #endif /* _PKCS11N_H_ */ | 479 #endif /* _PKCS11N_H_ */ |
OLD | NEW |