[go: up one dir, main page]

File: object-alg.md

package info (click to toggle)
tpm2-tools 5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,396 kB
  • sloc: ansic: 35,984; sh: 12,809; xml: 8,089; makefile: 569
file content (128 lines) | stat: -rw-r--r-- 4,762 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Supported Public Object Algorithms

Supported public object algorithms are:

## Symmetric
###  AES
The AES cipher has a bitsize and a mode. When the mode is not specified, ie a
"NULL" mode, the TPM will allow any mode usages on subsequent key uses. If the
mode is specified during object creation, only that mode is allowed in
subsequent use cases.

  * **aes** - Default AES selection. The default AES Selection is AES 128 with
    a NULL mode.

  * **aes[128|192|256]** - AES with a key size of 128, 192 and 256 respectively
    with a NULL mode.

  * **aes[128|192|256][cbc|ocb|cfb|ecb]** - AES with a key size of 128, 192 and
    256 and a mode of cbc, ocb, cfb and ecb respectively.

#### Examples

  * aes256cbc - AES with a key bitsize of 256 and a mode of cbc.

  * aes192cfb - AES with a bitsize of 192 and mode of cfb.

  * aes128 - AES with a bitsize of 128 and NULL mode.

## Asymmetric

### RSA

The RSA cipher has a bitsize, and the TPM (optionally) supports associating a symmetric
key along with the RSA algorithm. The AES key will be used for encryption modes that rely
on an RSA scheme, like RSAES_OAEP.

  * **rsa** -
    Default RSA algorithm. The default bitsize is 2048. Depending on if the object
    is a restricted object (aka a parent object), the algorithms encryption options will default to:

    * restricted object - scheme of null and a NULL symmetric algorithm.

    * non-restricted object - scheme of null and an aes128cfb symmetric algorithm.

  * **rsa[1024|2048|4096]** -
    Similar to **rsa** option, but provides control over the key
    size to either 1024, 2048 or 4096 respectively.

  * **rsa[1024|2048|4096]:[oaep|rsaes]** -
    Similar to **rsa[1024|2048|4096]** option, but provides the ability
    to control the scheme. The algorithms encryption options will default to:
    aes128cfb.

  * **rsa[1024|2048|4096]:[oaep|rsaes]:[aes]**
    Similar to **rsa[1024|2048]:[oaep|rsaes]** option, but provides
    full control over the aes key options. See the section **AES**
    for details of these AES strings.

#### Examples

  * rsa1024 - Creates an RSA 1024 key with a scheme and symmetric algorithm dependent on the restricted attribute.

  * rsa:oeap:aes - Creates an RSA 2048 key with an AES-OEAP scheme and an AES default key based on attributes.

  * rsa1024:null:aes128cbc - Creates an RSA 1024 key with a NULL encryption scheme and an AES key of 128 for use ONLY with CBC.

### ECC

The ECC cipher has a size, and the TPM (optionally) supports associating a symmetric
key along with the ECC algorithm. The AES key will be used for encryption modes that rely
on an asymmetric encryption scheme, like RSAES_OAEP.

  * **ecc** -
    Default ECC algorithm. The default curve size is 256. Depending on if the object
    is a restricted object (aka a parent object), the algorithms encryption options will default to:

    * restricted object - scheme of null and a NULL symmetric algorithm.

    * non-restricted object - scheme of null and an aes128cfb symmetric algorithm.

  * **ecc[224|256|384|521]** -
    Similar to **ecc** option, but provides control over the curve
    size to either 224,256,384 or 521 respectively.

  * **ecc[224|256|384|521]:[oaep|rsaes]** -
    Similar to **ecc[224|256|384|521]** option, but provides the ability
    to control the scheme. The algorithms encryption options will default to:
    aes128cfb.

  * **ecc[224|256|384|521]:[oaep|rsaes]:[aes]**
    Similar to **ecc[224|256|384|521]:[oaep|rsaes]** option, but provides
    full control over the aes key options. See the section **AES**
    for details of these AES strings.

#### Examples

  * ecc224 - Creates an ECC 224 key with a scheme and symmetric algorithm dependent on the restricted attribute.

  * ecc:oeap:aes - Creates an ECC 256 key with an AES-OEAP scheme and an AES default key based on attributes.

  * ecc384:null:aes128cbc - Creates an ECC 384 key with a NULL encryption scheme and an AES key of 128 for use ONLY with CBC.

## KeyedHash

 The keyedhash algorithms are hmac and xor.

### HMAC

The HMAC algorithm needs a hashing algorithm and nothing more. It defaults to
sha256 if not specified.

  * **hmac:[sha256|sha384|sha512]** -
    Generate an HMAC key valid for the associated hash algorithm, defaults to
    sha256 if not specified.


### XOR

The XOR algorithm needs a hashing algorithm and nothing more. It defaults to
sha256 if not specified. The XOR scheme should be used where confidentiality
of the objects is desired, but secrecy is not mandatory. The algorithm is
lightweight and quick.

  * **xor:[sha256|sha384|sha512]** -
    Generate an XOR key valid for the associated hash algorithm, defaults to
    sha256 if not specified.

**NOTE**: Your TPM may not support all algorithms.