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