Annotation of embedaddon/strongswan/src/libtpmtss/tpm_tss_tss2_names_v2.c, revision 1.1.1.2
1.1 misho 1: /*
2: * Copyright (C) 2018 Andreas Steffen
3: * HSR Hochschule fuer Technik Rapperswil
4: *
5: * This program is free software; you can redistribute it and/or modify it
6: * under the terms of the GNU General Public License as published by the
7: * Free Software Foundation; either version 2 of the License, or (at your
8: * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9: *
10: * This program is distributed in the hope that it will be useful, but
11: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13: * for more details.
14: */
15:
16: #ifdef TSS_TSS2_V2
17:
18: #include "tpm_tss_tss2_names.h"
19:
20: #include <tss2/tss2_sys.h>
21:
22: /**
23: * TPM 2.0 algorithm ID names
24: */
25: ENUM_BEGIN(tpm_alg_id_names, TPM2_ALG_ERROR, TPM2_ALG_RSA,
26: "ERROR",
27: "RSA"
28: );
29: ENUM_NEXT(tpm_alg_id_names, TPM2_ALG_SHA1, TPM2_ALG_KEYEDHASH, TPM2_ALG_RSA,
30: "SHA1",
31: "HMAC",
32: "AES",
33: "MGF1",
34: "KEYEDHASH"
35: );
36: ENUM_NEXT(tpm_alg_id_names, TPM2_ALG_XOR, TPM2_ALG_SHA512, TPM2_ALG_KEYEDHASH,
37: "XOR",
38: "SHA256",
39: "SHA384",
40: "SHA512"
41: );
42: ENUM_NEXT(tpm_alg_id_names, TPM2_ALG_NULL, TPM2_ALG_NULL, TPM2_ALG_SHA512,
43: "NULL"
44: );
45: ENUM_NEXT(tpm_alg_id_names, TPM2_ALG_SM3_256, TPM2_ALG_ECMQV, TPM2_ALG_NULL,
46: "SM3_256",
47: "SM4",
48: "RSASSA",
49: "RSAES",
50: "RSAPSS",
51: "OAEP",
52: "ECDSA",
53: "ECDH",
54: "ECDAA",
55: "SM2",
56: "ECSCHNORR",
57: "ECMQV"
58: );
59: ENUM_NEXT(tpm_alg_id_names, TPM2_ALG_KDF1_SP800_56A, TPM2_ALG_ECC, TPM2_ALG_ECMQV,
60: "KDF1_SP800_56A",
61: "KDF2",
62: "KDF1_SP800_108",
63: "ECC"
64: );
1.1.1.2 ! misho 65: ENUM_NEXT(tpm_alg_id_names, TPM2_ALG_SYMCIPHER, TPM2_ALG_SHA3_512, TPM2_ALG_ECC,
1.1 misho 66: "SYMCIPHER",
1.1.1.2 ! misho 67: "CAMELLIA",
! 68: "SHA3_256",
! 69: "SHA3_384",
! 70: "SHA3_512"
1.1 misho 71: );
1.1.1.2 ! misho 72: ENUM_NEXT(tpm_alg_id_names, TPM2_ALG_CMAC, TPM2_ALG_ECB, TPM2_ALG_SHA3_512,
! 73: "CMAC",
1.1 misho 74: "CTR",
75: "OFB",
76: "CBC",
77: "CFB",
78: "ECB"
79: );
80: ENUM_END(tpm_alg_id_names, TPM2_ALG_ECB);
81:
82: /**
83: * TPM 2.0 ECC curve names
84: */
85: ENUM_BEGIN(tpm_ecc_curve_names, TPM2_ECC_NONE, TPM2_ECC_NIST_P521,
86: "NONE",
87: "NIST_P192",
88: "NIST_P224",
89: "NIST_P256",
90: "NIST_P384",
91: "NIST_P521"
92: );
93: ENUM_NEXT(tpm_ecc_curve_names, TPM2_ECC_BN_P256, TPM2_ECC_BN_P638, TPM2_ECC_NIST_P521,
94: "BN_P256",
95: "BN_P638"
96: );
97: ENUM_NEXT(tpm_ecc_curve_names, TPM2_ECC_SM2_P256, TPM2_ECC_SM2_P256, TPM2_ECC_BN_P638,
98: "SM2_P256"
99: );
100: ENUM_END(tpm_ecc_curve_names, TPM2_ECC_SM2_P256);
101:
102: #endif /* TSS_TSS2_V2 */
103:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>