fapi-profile.5.in 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. .\" Automatically generated by Pandoc 1.19.2.1
  2. .\"
  3. .TH "fapi-profile" 5 "JULI 2020" "TPM2 Software Stack"
  4. .hy
  5. .SH "SEE ALSO"
  6. .BR fapi-config (5)
  7. .SH DESCRIPTION
  8. .PP
  9. .SB FAPI Cryptographic Profile
  10. .PP
  11. Cryptographic profiles determine the cryptographic algorithms and
  12. parameters for all keys and operations of a specific TPM interaction.
  13. The values affected by these profiles are:
  14. .IP \[bu] 2
  15. the name hash algorithm
  16. .IP \[bu] 2
  17. asymmetric signature algorithm, scheme and parameters (such as curve,
  18. keysize, default padding, hash, etc)
  19. .IP \[bu] 2
  20. PCR bank selection (which PCR banks shall be extended, quoted and read)
  21. .PP
  22. Two exemplary profiles for RSA and ECC are installed with the TSS.
  23. By default, the RSA cryptographic profile is activated.
  24. The user is free to create own cryptographic profiles according to his
  25. needs.
  26. .PP
  27. Specific profiles are activated in the FAPI configuration file.
  28. If not otherwise specified during TSS installation, the default location
  29. for the exemplary profiles is /etc/tpm2\-tss/profiles/ and
  30. /etc/tpm2\-tss/ for the FAPI configuration file.
  31. .PP
  32. The parameters of the profile are:
  33. .IP \[bu] 2
  34. type: The asymmetric algorithm used for this profile.
  35. .IP \[bu] 2
  36. nameAlg: The hash algorithm which will be used for sessions and keys.
  37. .IP \[bu] 2
  38. srk_template: The type definition for the /SRK object.
  39. See the type parameter of Fapi_CreateKey.
  40. .IP \[bu] 2
  41. srk_description: The description to be set for the /EK object.
  42. See Fapi_GetDescription.
  43. .IP \[bu] 2
  44. ek_template: The type definition for the /EK object.
  45. See the type parameter of Fapi_CreateKey.
  46. .IP \[bu] 2
  47. ek_description: The description to be set for the /SRK object.
  48. See Fapi_GetDescription.
  49. .IP \[bu] 2
  50. ecc_signing_scheme: The signing scheme used for ECC keys.
  51. .IP \[bu] 2
  52. rsa_signing_scheme: The signing scheme used for RSA keys.
  53. .IP \[bu] 2
  54. keyBits: The key size for RSA keys.
  55. .IP \[bu] 2
  56. exponent: The exponent of RSA keys.
  57. .IP \[bu] 2
  58. sym_mode: The block cipher mode for symmetric encryption.
  59. .IP \[bu] 2
  60. sym_parameters: The algorithm and parameters used for symmetric
  61. encryption.
  62. .IP \[bu] 2
  63. sym_block_size: The block size used for symmetric encryption.
  64. .IP \[bu] 2
  65. pcr_selection: The PCR registers and banks used by FAPI.
  66. .IP \[bu] 2
  67. curveID: The curve ID for ECC keys.
  68. .IP \[bu] 2
  69. ek_policy: The JSON encoded policy for the /EK object.
  70. .IP \[bu] 2
  71. srk_policy: The JSON encoded policy for the /SRK object.
  72. .IP \[bu] 2
  73. eh_policy: The JSON encoded policy for the endorsement hierarchy /HE.
  74. .IP \[bu] 2
  75. sh_policy: The JSON encoded policy for the owner hierarchy /HS.
  76. .IP \[bu] 2
  77. lockout_policy: The JSON encoded policy for the lockout hierarchy
  78. /LOCKOUT.
  79. .IP \[bu] 2
  80. newMaxTries: Count of authorization failures before the lockout is
  81. imposed.
  82. If not set the default is 5.
  83. .IP \[bu] 2
  84. newRecoveryTime: Time in seconds before the authorization failure count
  85. is automatically decremented.
  86. A value of zero indicates that DA protection is disabled.
  87. If not set the default is 1000.
  88. .IP \[bu] 2
  89. lockoutRecovery: Time in seconds after a lockoutAuth failure before use
  90. of lockoutAuth is allowed A value of zero indicates that a reboot is
  91. required.
  92. If not set the default is 1000.
  93. .SH EXAMPLES
  94. .PP
  95. The following JSON encoded example shows the standard profile for ECC
  96. keys:
  97. .IP
  98. .nf
  99. \f[C]
  100. {
  101. \ \ \ \ "type":\ "TPM2_ALG_ECC",
  102. \ \ \ \ "nameAlg":"TPM2_ALG_SHA256",
  103. \ \ \ \ "srk_template":\ "system,restricted,decrypt,0x81000001",
  104. \ \ \ \ "srk_description":\ "Storage\ root\ key\ SRK",
  105. \ \ \ \ "ek_template":\ \ "system,restricted,decrypt",
  106. \ \ \ \ "ek_description":\ "Endorsement\ key\ EK",
  107. \ \ \ \ "ecc_signing_scheme":\ {
  108. \ \ \ \ \ \ \ \ "scheme":"TPM2_ALG_ECDSA",
  109. \ \ \ \ \ \ \ \ "details":{
  110. \ \ \ \ \ \ \ \ \ \ \ \ "hashAlg":"TPM2_ALG_SHA256"
  111. \ \ \ \ \ \ \ \ },
  112. \ \ \ \ },
  113. \ \ \ \ "sym_mode":"TPM2_ALG_CFB",
  114. \ \ \ \ "sym_parameters":\ {
  115. \ \ \ \ \ \ \ \ "algorithm":"TPM2_ALG_AES",
  116. \ \ \ \ \ \ \ \ "keyBits":"128",
  117. \ \ \ \ \ \ \ \ "mode":"TPM2_ALG_CFB"
  118. \ \ \ \ },
  119. \ \ \ \ "sym_block_size":\ 16,
  120. \ \ \ \ "pcr_selection":\ [
  121. \ \ \ \ \ \ \ {\ "hash":\ "TPM2_ALG_SHA1",
  122. \ \ \ \ \ \ \ \ \ "pcrSelect":\ [\ ],
  123. \ \ \ \ \ \ \ },
  124. \ \ \ \ \ \ \ {\ "hash":\ "TPM2_ALG_SHA256",
  125. \ \ \ \ \ \ \ \ \ "pcrSelect":\ [\ 8,\ 9,\ 11,\ 12,\ 13,\ 14,\ 15,\ 16,\ 17,\ 18,\ 19,\ 20,\ 21,\ 22,\ 23\ ]
  126. \ \ \ \ \ \ \ }
  127. \ \ \ \ ],
  128. \ \ \ \ "curveID":\ "TPM2_ECC_NIST_P256",
  129. \ \ \ \ "ek_policy":\ {
  130. \ \ \ \ \ \ \ \ "description":\ "Endorsement\ hierarchy\ used\ for\ policy\ secret.",
  131. \ \ \ \ \ \ \ \ "policy":[
  132. \ \ \ \ \ \ \ \ \ \ \ \ {
  133. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "type":"POLICYSECRET",
  134. \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "objectName":\ "4000000b",
  135. \ \ \ \ \ \ \ \ \ \ \ \ }
  136. \ \ \ \ \ \ \ \ ]
  137. \ \ \ \ }
  138. }
  139. \f[]
  140. .fi
  141. .PP
  142. Beside the cryptographic parameters descriptions for the storage root
  143. key and the endorsement key can be set.
  144. For the endorsement hierarchy the policy "ek_policy" is set according to
  145. the TCG Credential profile EK 2.0.
  146. The values of the constants are the same as the constants defined in the
  147. TSS header files, where the prefix TPM2_ can be omitted.
  148. .PP
  149. The key type of the storage root key and the endorsement key is defined
  150. by the JSON fields srk_template and ek_template.
  151. The type consists of a list of comma and/or space separated keywords.
  152. If a keyword is not present the inverse of the reference TPM attribute
  153. bits SHALL be set or cleared.
  154. The keywords are:
  155. .IP \[bu] 2
  156. sign: Sets the sign attribute of a key.
  157. .IP \[bu] 2
  158. decrypt: Sets the decrypt attribute of a key.
  159. .IP \[bu] 2
  160. If neither sign nor decrypt are provided, both attributes SHALL be set.
  161. .IP \[bu] 2
  162. restricted: Sets the restricted attribute of a key.
  163. .IP \[bu] 2
  164. If restricted is set, either sign or decrypt (but not both) SHALL be
  165. set.
  166. .IP \[bu] 2
  167. noda: Sets the noda attribute of a key or NV index.
  168. .IP \[bu] 2
  169. A hexadecimal number: Marks a key object to be made persistent and sets
  170. the persistent object handle to this value.
  171. .PP
  172. The RSA profile has specific values for the signing scheme and the
  173. decrypt scheme:
  174. .IP
  175. .nf
  176. \f[C]
  177. \ \ \ \ \ \ "rsa_signing_scheme":\ {
  178. \ \ \ \ \ \ \ \ "scheme":"TPM2_ALG_RSAPSS",
  179. \ \ \ \ \ \ \ \ "details":{
  180. \ \ \ \ \ \ \ \ \ \ \ \ "hashAlg":"TPM2_ALG_SHA256"
  181. \ \ \ \ \ \ \ \ }
  182. \ \ \ \ "rsa_decrypt_scheme":\ {
  183. \ \ \ \ \ \ \ \ "scheme":"TPM2_ALG_OAEP",
  184. \ \ \ \ \ \ \ \ "details":{
  185. \ \ \ \ \ \ \ \ \ \ \ \ "hashAlg":"TPM2_ALG_SHA256"
  186. \ \ \ \ \ \ \ \ }
  187. \ \ \ \ },
  188. \f[]
  189. .fi
  190. .PP
  191. Possible values for the signing schemes are:
  192. .IP \[bu] 2
  193. RSA: RSASSA, RSAPSS
  194. .IP \[bu] 2
  195. ECC: ECDSA, ECDAA
  196. .PP
  197. Possible modes for symmetric encryption are:
  198. .IP \[bu] 2
  199. CTR, OFB, CBC, CFB, ECB, NULL
  200. .PP
  201. Possible modes for the RSA decrypt scheme are:
  202. .IP \[bu] 2
  203. RSAES, OAEP
  204. .PP
  205. The following curve ids can be used:
  206. .IP \[bu] 2
  207. ECC_NIST_P192, ECC_NIST_P224, ECC_NIST_P256, ECC_NIST_P384,
  208. ECC_NIST_P521, ECC_BN_P256, ECC_BN_P638, ECC_SM2_P256