1 /*
2  * softoknt.h - public data structures for the software token library
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 
8 #ifndef _SOFTOKNT_H_
9 #define _SOFTOKNT_H_
10 
11 #define NSS_SOFTOKEN_DEFAULT_CHUNKSIZE 2048
12 #define DES_BLOCK_SIZE 8     /* bytes */
13 #define MAX_DES3_KEY_SIZE 24 /* DES_BLOCK_SIZE * 3 */
14 #define SFTK_MAX_DERIVE_KEY_SIZE 64
15 
16 /*
17  * FIPS 140-2 auditing
18  */
19 typedef enum {
20     NSS_AUDIT_ERROR = 3,   /* errors */
21     NSS_AUDIT_WARNING = 2, /* warning messages */
22     NSS_AUDIT_INFO = 1     /* informational messages */
23 } NSSAuditSeverity;
24 
25 typedef enum {
26     NSS_AUDIT_ACCESS_KEY = 0,
27     NSS_AUDIT_CHANGE_KEY,
28     NSS_AUDIT_COPY_KEY,
29     NSS_AUDIT_CRYPT,
30     NSS_AUDIT_DERIVE_KEY,
31     NSS_AUDIT_DESTROY_KEY,
32     NSS_AUDIT_DIGEST_KEY,
33     NSS_AUDIT_FIPS_STATE,
34     NSS_AUDIT_GENERATE_KEY,
35     NSS_AUDIT_INIT_PIN,
36     NSS_AUDIT_INIT_TOKEN,
37     NSS_AUDIT_LOAD_KEY,
38     NSS_AUDIT_LOGIN,
39     NSS_AUDIT_LOGOUT,
40     NSS_AUDIT_SELF_TEST,
41     NSS_AUDIT_SET_PIN,
42     NSS_AUDIT_UNWRAP_KEY,
43     NSS_AUDIT_WRAP_KEY
44 } NSSAuditType;
45 
46 #endif /* _SOFTOKNT_H_ */
47