David Drysdale | 0cf92d2 | 2022-06-10 15:56:42 +0100 | [diff] [blame] | 1 | DateTime = int |
| 2 | KeySizeInBits = int |
David Drysdale | 0b3938d | 2022-09-28 16:49:16 +0100 | [diff] [blame] | 3 | RsaExponent = int |
David Drysdale | 0cf92d2 | 2022-06-10 15:56:42 +0100 | [diff] [blame] | 4 | Algorithm = &( |
| 5 | Algorithm_Rsa: 1, |
| 6 | Algorithm_Ec: 3, |
| 7 | Algorithm_Aes: 32, |
| 8 | Algorithm_TripleDes: 33, |
| 9 | Algorithm_Hmac: 128, |
| 10 | ) |
| 11 | BlockMode = &( |
| 12 | BlockMode_Ecb: 1, |
| 13 | BlockMode_Cbc: 2, |
| 14 | BlockMode_Ctr: 3, |
| 15 | BlockMode_Gcm: 32, |
| 16 | ) |
| 17 | Digest = &( |
| 18 | Digest_None: 0, |
| 19 | Digest_Md5: 1, |
| 20 | Digest_Sha1: 2, |
| 21 | Digest_Sha224: 3, |
| 22 | Digest_Sha256: 4, |
| 23 | Digest_Sha384: 5, |
| 24 | Digest_Sha512: 6, |
| 25 | ) |
| 26 | EcCurve = &( |
| 27 | EcCurve_P224: 0, |
| 28 | EcCurve_P256: 1, |
| 29 | EcCurve_P384: 2, |
| 30 | EcCurve_P521: 3, |
| 31 | EcCurve_Curve25519: 4, |
| 32 | ) |
David Drysdale | ed33ed1 | 2022-08-23 10:01:39 +0100 | [diff] [blame] | 33 | CurveType = &( |
| 34 | CurveType_Nist: 0, |
| 35 | CurveType_EdDsa: 1, |
| 36 | CurveType_Xdh: 2, |
| 37 | ) |
David Drysdale | 0cf92d2 | 2022-06-10 15:56:42 +0100 | [diff] [blame] | 38 | ErrorCode = &( |
| 39 | ErrorCode_Ok: 0, |
| 40 | ErrorCode_RootOfTrustAlreadySet: -1, |
| 41 | ErrorCode_UnsupportedPurpose: -2, |
| 42 | ErrorCode_IncompatiblePurpose: -3, |
| 43 | ErrorCode_UnsupportedAlgorithm: -4, |
| 44 | ErrorCode_IncompatibleAlgorithm: -5, |
| 45 | ErrorCode_UnsupportedKeySize: -6, |
| 46 | ErrorCode_UnsupportedBlockMode: -7, |
| 47 | ErrorCode_IncompatibleBlockMode: -8, |
| 48 | ErrorCode_UnsupportedMacLength: -9, |
| 49 | ErrorCode_UnsupportedPaddingMode: -10, |
| 50 | ErrorCode_IncompatiblePaddingMode: -11, |
| 51 | ErrorCode_UnsupportedDigest: -12, |
| 52 | ErrorCode_IncompatibleDigest: -13, |
| 53 | ErrorCode_InvalidExpirationTime: -14, |
| 54 | ErrorCode_InvalidUserId: -15, |
| 55 | ErrorCode_InvalidAuthorizationTimeout: -16, |
| 56 | ErrorCode_UnsupportedKeyFormat: -17, |
| 57 | ErrorCode_IncompatibleKeyFormat: -18, |
| 58 | ErrorCode_UnsupportedKeyEncryptionAlgorithm: -19, |
| 59 | ErrorCode_UnsupportedKeyVerificationAlgorithm: -20, |
| 60 | ErrorCode_InvalidInputLength: -21, |
| 61 | ErrorCode_KeyExportOptionsInvalid: -22, |
| 62 | ErrorCode_DelegationNotAllowed: -23, |
| 63 | ErrorCode_KeyNotYetValid: -24, |
| 64 | ErrorCode_KeyExpired: -25, |
| 65 | ErrorCode_KeyUserNotAuthenticated: -26, |
| 66 | ErrorCode_OutputParameterNull: -27, |
| 67 | ErrorCode_InvalidOperationHandle: -28, |
| 68 | ErrorCode_InsufficientBufferSpace: -29, |
| 69 | ErrorCode_VerificationFailed: -30, |
| 70 | ErrorCode_TooManyOperations: -31, |
| 71 | ErrorCode_UnexpectedNullPointer: -32, |
| 72 | ErrorCode_InvalidKeyBlob: -33, |
| 73 | ErrorCode_ImportedKeyNotEncrypted: -34, |
| 74 | ErrorCode_ImportedKeyDecryptionFailed: -35, |
| 75 | ErrorCode_ImportedKeyNotSigned: -36, |
| 76 | ErrorCode_ImportedKeyVerificationFailed: -37, |
| 77 | ErrorCode_InvalidArgument: -38, |
| 78 | ErrorCode_UnsupportedTag: -39, |
| 79 | ErrorCode_InvalidTag: -40, |
| 80 | ErrorCode_MemoryAllocationFailed: -41, |
| 81 | ErrorCode_ImportParameterMismatch: -44, |
| 82 | ErrorCode_SecureHwAccessDenied: -45, |
| 83 | ErrorCode_OperationCancelled: -46, |
| 84 | ErrorCode_ConcurrentAccessConflict: -47, |
| 85 | ErrorCode_SecureHwBusy: -48, |
| 86 | ErrorCode_SecureHwCommunicationFailed: -49, |
| 87 | ErrorCode_UnsupportedEcField: -50, |
| 88 | ErrorCode_MissingNonce: -51, |
| 89 | ErrorCode_InvalidNonce: -52, |
| 90 | ErrorCode_MissingMacLength: -53, |
| 91 | ErrorCode_KeyRateLimitExceeded: -54, |
| 92 | ErrorCode_CallerNonceProhibited: -55, |
| 93 | ErrorCode_KeyMaxOpsExceeded: -56, |
| 94 | ErrorCode_InvalidMacLength: -57, |
| 95 | ErrorCode_MissingMinMacLength: -58, |
| 96 | ErrorCode_UnsupportedMinMacLength: -59, |
| 97 | ErrorCode_UnsupportedKdf: -60, |
| 98 | ErrorCode_UnsupportedEcCurve: -61, |
| 99 | ErrorCode_KeyRequiresUpgrade: -62, |
| 100 | ErrorCode_AttestationChallengeMissing: -63, |
| 101 | ErrorCode_KeymintNotConfigured: -64, |
| 102 | ErrorCode_AttestationApplicationIdMissing: -65, |
| 103 | ErrorCode_CannotAttestIds: -66, |
| 104 | ErrorCode_RollbackResistanceUnavailable: -67, |
| 105 | ErrorCode_HardwareTypeUnavailable: -68, |
| 106 | ErrorCode_ProofOfPresenceRequired: -69, |
| 107 | ErrorCode_ConcurrentProofOfPresenceRequested: -70, |
| 108 | ErrorCode_NoUserConfirmation: -71, |
| 109 | ErrorCode_DeviceLocked: -72, |
| 110 | ErrorCode_EarlyBootEnded: -73, |
| 111 | ErrorCode_AttestationKeysNotProvisioned: -74, |
| 112 | ErrorCode_AttestationIdsNotProvisioned: -75, |
| 113 | ErrorCode_InvalidOperation: -76, |
| 114 | ErrorCode_StorageKeyUnsupported: -77, |
| 115 | ErrorCode_IncompatibleMgfDigest: -78, |
| 116 | ErrorCode_UnsupportedMgfDigest: -79, |
| 117 | ErrorCode_MissingNotBefore: -80, |
| 118 | ErrorCode_MissingNotAfter: -81, |
| 119 | ErrorCode_MissingIssuerSubject: -82, |
| 120 | ErrorCode_InvalidIssuerSubject: -83, |
| 121 | ErrorCode_BootLevelExceeded: -84, |
| 122 | ErrorCode_HardwareNotYetAvailable: -85, |
| 123 | ErrorCode_Unimplemented: -100, |
| 124 | ErrorCode_VersionMismatch: -101, |
| 125 | ErrorCode_UnknownError: -1000, |
David Drysdale | 1aa5637 | 2023-10-06 10:21:30 +0100 | [diff] [blame] | 126 | ErrorCode_EncodingError: -20000, |
| 127 | ErrorCode_BoringSslError: -30000, |
David Drysdale | 0cf92d2 | 2022-06-10 15:56:42 +0100 | [diff] [blame] | 128 | ) |
| 129 | HardwareAuthenticatorType = &( |
| 130 | HardwareAuthenticatorType_None: 0, |
| 131 | HardwareAuthenticatorType_Password: 1, |
| 132 | HardwareAuthenticatorType_Fingerprint: 2, |
| 133 | HardwareAuthenticatorType_Any: -1, |
| 134 | ) |
| 135 | KeyFormat = &( |
| 136 | KeyFormat_X509: 0, |
| 137 | KeyFormat_Pkcs8: 1, |
| 138 | KeyFormat_Raw: 3, |
| 139 | ) |
| 140 | KeyOrigin = &( |
| 141 | KeyOrigin_Generated: 0, |
| 142 | KeyOrigin_Derived: 1, |
| 143 | KeyOrigin_Imported: 2, |
| 144 | KeyOrigin_Reserved: 3, |
| 145 | KeyOrigin_SecurelyImported: 4, |
| 146 | ) |
| 147 | KeyPurpose = &( |
| 148 | KeyPurpose_Encrypt: 0, |
| 149 | KeyPurpose_Decrypt: 1, |
| 150 | KeyPurpose_Sign: 2, |
| 151 | KeyPurpose_Verify: 3, |
| 152 | KeyPurpose_WrapKey: 5, |
| 153 | KeyPurpose_AgreeKey: 6, |
| 154 | KeyPurpose_AttestKey: 7, |
| 155 | ) |
| 156 | PaddingMode = &( |
| 157 | PaddingMode_None: 1, |
| 158 | PaddingMode_RsaOaep: 2, |
| 159 | PaddingMode_RsaPss: 3, |
| 160 | PaddingMode_RsaPkcs115Encrypt: 4, |
| 161 | PaddingMode_RsaPkcs115Sign: 5, |
| 162 | PaddingMode_Pkcs7: 64, |
| 163 | ) |
| 164 | SecurityLevel = &( |
| 165 | SecurityLevel_Software: 0, |
| 166 | SecurityLevel_TrustedEnvironment: 1, |
| 167 | SecurityLevel_Strongbox: 2, |
| 168 | SecurityLevel_Keystore: 100, |
| 169 | ) |
| 170 | Tag = &( |
| 171 | Tag_Invalid: 0, |
| 172 | Tag_Purpose: 536870913, |
| 173 | Tag_Algorithm: 268435458, |
| 174 | Tag_KeySize: 805306371, |
| 175 | Tag_BlockMode: 536870916, |
| 176 | Tag_Digest: 536870917, |
| 177 | Tag_Padding: 536870918, |
| 178 | Tag_CallerNonce: 1879048199, |
| 179 | Tag_MinMacLength: 805306376, |
| 180 | Tag_EcCurve: 268435466, |
| 181 | Tag_RsaPublicExponent: 1342177480, |
| 182 | Tag_IncludeUniqueId: 1879048394, |
| 183 | Tag_RsaOaepMgfDigest: 536871115, |
| 184 | Tag_BootloaderOnly: 1879048494, |
| 185 | Tag_RollbackResistance: 1879048495, |
| 186 | Tag_HardwareType: 268435760, |
| 187 | Tag_EarlyBootOnly: 1879048497, |
| 188 | Tag_ActiveDatetime: 1610613136, |
| 189 | Tag_OriginationExpireDatetime: 1610613137, |
| 190 | Tag_UsageExpireDatetime: 1610613138, |
| 191 | Tag_MinSecondsBetweenOps: 805306771, |
| 192 | Tag_MaxUsesPerBoot: 805306772, |
| 193 | Tag_UsageCountLimit: 805306773, |
| 194 | Tag_UserId: 805306869, |
| 195 | Tag_UserSecureId: -1610612234, |
| 196 | Tag_NoAuthRequired: 1879048695, |
| 197 | Tag_UserAuthType: 268435960, |
| 198 | Tag_AuthTimeout: 805306873, |
| 199 | Tag_AllowWhileOnBody: 1879048698, |
| 200 | Tag_TrustedUserPresenceRequired: 1879048699, |
| 201 | Tag_TrustedConfirmationRequired: 1879048700, |
| 202 | Tag_UnlockedDeviceRequired: 1879048701, |
| 203 | Tag_ApplicationId: -1879047591, |
| 204 | Tag_ApplicationData: -1879047492, |
| 205 | Tag_CreationDatetime: 1610613437, |
| 206 | Tag_Origin: 268436158, |
| 207 | Tag_RootOfTrust: -1879047488, |
| 208 | Tag_OsVersion: 805307073, |
| 209 | Tag_OsPatchlevel: 805307074, |
| 210 | Tag_UniqueId: -1879047485, |
| 211 | Tag_AttestationChallenge: -1879047484, |
| 212 | Tag_AttestationApplicationId: -1879047483, |
| 213 | Tag_AttestationIdBrand: -1879047482, |
| 214 | Tag_AttestationIdDevice: -1879047481, |
| 215 | Tag_AttestationIdProduct: -1879047480, |
| 216 | Tag_AttestationIdSerial: -1879047479, |
| 217 | Tag_AttestationIdImei: -1879047478, |
| 218 | Tag_AttestationIdMeid: -1879047477, |
| 219 | Tag_AttestationIdManufacturer: -1879047476, |
| 220 | Tag_AttestationIdModel: -1879047475, |
| 221 | Tag_VendorPatchlevel: 805307086, |
| 222 | Tag_BootPatchlevel: 805307087, |
| 223 | Tag_DeviceUniqueAttestation: 1879048912, |
| 224 | Tag_IdentityCredentialKey: 1879048913, |
| 225 | Tag_StorageKey: 1879048914, |
David Drysdale | 7cb8c3d | 2023-01-03 10:36:07 +0000 | [diff] [blame] | 226 | Tag_AttestationIdSecondImei: -1879047469, |
David Drysdale | 0cf92d2 | 2022-06-10 15:56:42 +0100 | [diff] [blame] | 227 | Tag_AssociatedData: -1879047192, |
| 228 | Tag_Nonce: -1879047191, |
| 229 | Tag_MacLength: 805307371, |
| 230 | Tag_ResetSinceIdRotation: 1879049196, |
| 231 | Tag_ConfirmationToken: -1879047187, |
| 232 | Tag_CertificateSerial: -2147482642, |
| 233 | Tag_CertificateSubject: -1879047185, |
| 234 | Tag_CertificateNotBefore: 1610613744, |
| 235 | Tag_CertificateNotAfter: 1610613745, |
| 236 | Tag_MaxBootLevel: 805307378, |
| 237 | ) |
| 238 | TagType = &( |
| 239 | TagType_Invalid: 0, |
| 240 | TagType_Enum: 268435456, |
| 241 | TagType_EnumRep: 536870912, |
| 242 | TagType_Uint: 805306368, |
| 243 | TagType_UintRep: 1073741824, |
| 244 | TagType_Ulong: 1342177280, |
| 245 | TagType_Date: 1610612736, |
| 246 | TagType_Bool: 1879048192, |
| 247 | TagType_Bignum: -2147483648, |
| 248 | TagType_Bytes: -1879048192, |
| 249 | TagType_UlongRep: -1610612736, |
| 250 | ) |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 251 | AttestationKey = [ |
| 252 | key_blob: bstr, |
David Drysdale | 0cf92d2 | 2022-06-10 15:56:42 +0100 | [diff] [blame] | 253 | attest_key_params: [* KeyParam], |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 254 | issuer_subject_name: bstr, |
| 255 | ] |
| 256 | Certificate = [ |
| 257 | encoded_certificate: bstr, |
| 258 | ] |
| 259 | DeviceInfo = [ |
| 260 | device_info: bstr, |
| 261 | ] |
| 262 | HardwareAuthToken = [ |
| 263 | challenge: int, |
| 264 | user_id: int, |
| 265 | authenticator_id: int, |
| 266 | authenticator_type: HardwareAuthenticatorType, |
| 267 | timestamp: Timestamp, |
| 268 | mac: bstr, |
| 269 | ] |
| 270 | KeyCharacteristics = [ |
| 271 | security_level: SecurityLevel, |
David Drysdale | 0cf92d2 | 2022-06-10 15:56:42 +0100 | [diff] [blame] | 272 | authorizations: [* KeyParam], |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 273 | ] |
| 274 | KeyCreationResult = [ |
| 275 | key_blob: bstr, |
| 276 | key_characteristics: [* KeyCharacteristics], |
| 277 | certificate_chain: [* Certificate], |
| 278 | ] |
| 279 | KeyMintHardwareInfo = [ |
| 280 | version_number: int, |
| 281 | security_level: SecurityLevel, |
| 282 | key_mint_name: tstr, |
| 283 | key_mint_author_name: tstr, |
| 284 | timestamp_token_required: bool, |
| 285 | ] |
David Drysdale | d8b53db | 2022-11-21 14:54:12 +0000 | [diff] [blame] | 286 | EekCurve = &( |
| 287 | EekCurve_None: 0, |
| 288 | EekCurve_P256: 1, |
| 289 | EekCurve_Curve25519: 2, |
| 290 | ) |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 291 | MacedPublicKey = [ |
| 292 | maced_key: bstr, |
| 293 | ] |
| 294 | ProtectedData = [ |
| 295 | protected_data: bstr, |
| 296 | ] |
David Drysdale | d8b53db | 2022-11-21 14:54:12 +0000 | [diff] [blame] | 297 | HardwareInfo = [ |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 298 | version_number: int, |
| 299 | rpc_author_name: tstr, |
David Drysdale | d8b53db | 2022-11-21 14:54:12 +0000 | [diff] [blame] | 300 | supported_eek_curve: EekCurve, |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 301 | unique_id: [? tstr], |
Tri Vo | b0e6fa7 | 2022-11-03 13:32:06 -0700 | [diff] [blame] | 302 | supported_num_keys_in_csr: int, |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 303 | ] |
| 304 | TimeStampToken = [ |
| 305 | challenge: int, |
| 306 | timestamp: Timestamp, |
| 307 | mac: bstr, |
| 308 | ] |
| 309 | Timestamp = [ |
| 310 | milliseconds: int, |
| 311 | ] |
| 312 | SharedSecretParameters = [ |
| 313 | seed: bstr, |
| 314 | nonce: bstr, |
| 315 | ] |
David Drysdale | 0cf92d2 | 2022-06-10 15:56:42 +0100 | [diff] [blame] | 316 | KeyParam = &( |
| 317 | [268435458, Algorithm], ; Tag_Algorithm |
| 318 | [536870916, BlockMode], ; Tag_BlockMode |
| 319 | [536870918, PaddingMode], ; Tag_Padding |
| 320 | [536870917, Digest], ; Tag_Digest |
| 321 | [268435466, EcCurve], ; Tag_EcCurve |
| 322 | [268436158, KeyOrigin], ; Tag_Origin |
| 323 | [536870913, KeyPurpose], ; Tag_Purpose |
| 324 | [805306371, KeySizeInBits], ; Tag_KeySize |
| 325 | [1879048199, bstr], ; Tag_CallerNonce |
| 326 | [805306376, int], ; Tag_MinMacLength |
David Drysdale | 0b3938d | 2022-09-28 16:49:16 +0100 | [diff] [blame] | 327 | [1342177480, RsaExponent], ; Tag_RsaPublicExponent |
David Drysdale | 0cf92d2 | 2022-06-10 15:56:42 +0100 | [diff] [blame] | 328 | [1879048394, true], ; Tag_IncludeUniqueId |
| 329 | [536871115, Digest], ; Tag_RsaOaepMgfDigest |
| 330 | [1879048494, true], ; Tag_BootloaderOnly |
| 331 | [1879048495, true], ; Tag_RollbackResistance |
| 332 | [1879048497, true], ; Tag_EarlyBootOnly |
| 333 | [1610613136, DateTime], ; Tag_ActiveDatetime |
| 334 | [1610613137, DateTime], ; Tag_OriginationExpireDatetime |
| 335 | [1610613138, DateTime], ; Tag_UsageExpireDatetime |
| 336 | [805306772, int], ; Tag_MaxUsesPerBoot |
| 337 | [805306773, int], ; Tag_UsageCountLimit |
| 338 | [805306869, int], ; Tag_UserId |
| 339 | [-1610612234, int], ; Tag_UserSecureId |
| 340 | [1879048695, true], ; Tag_NoAuthRequired |
| 341 | [268435960, int], ; Tag_UserAuthType |
| 342 | [805306873, int], ; Tag_AuthTimeout |
| 343 | [1879048698, true], ; Tag_AllowWhileOnBody |
| 344 | [1879048699, true], ; Tag_TrustedUserPresenceRequired |
| 345 | [1879048700, true], ; Tag_TrustedConfirmationRequired |
| 346 | [1879048701, true], ; Tag_UnlockedDeviceRequired |
| 347 | [-1879047591, bstr], ; Tag_ApplicationId |
| 348 | [-1879047492, bstr], ; Tag_ApplicationData |
| 349 | [1610613437, DateTime], ; Tag_CreationDatetime |
| 350 | [-1879047488, bstr], ; Tag_RootOfTrust |
| 351 | [805307073, int], ; Tag_OsVersion |
| 352 | [805307074, int], ; Tag_OsPatchlevel |
| 353 | [-1879047484, bstr], ; Tag_AttestationChallenge |
| 354 | [-1879047483, bstr], ; Tag_AttestationApplicationId |
| 355 | [-1879047482, bstr], ; Tag_AttestationIdBrand |
| 356 | [-1879047481, bstr], ; Tag_AttestationIdDevice |
| 357 | [-1879047480, bstr], ; Tag_AttestationIdProduct |
| 358 | [-1879047479, bstr], ; Tag_AttestationIdSerial |
| 359 | [-1879047478, bstr], ; Tag_AttestationIdImei |
David Drysdale | 7cb8c3d | 2023-01-03 10:36:07 +0000 | [diff] [blame] | 360 | [-1879047469, bstr], ; Tag_AttestationIdSecondImei |
David Drysdale | 0cf92d2 | 2022-06-10 15:56:42 +0100 | [diff] [blame] | 361 | [-1879047477, bstr], ; Tag_AttestationIdMeid |
| 362 | [-1879047476, bstr], ; Tag_AttestationIdManufacturer |
| 363 | [-1879047475, bstr], ; Tag_AttestationIdModel |
| 364 | [805307086, int], ; Tag_VendorPatchlevel |
| 365 | [805307087, int], ; Tag_BootPatchlevel |
| 366 | [1879048912, true], ; Tag_DeviceUniqueAttestation |
| 367 | [1879048914, true], ; Tag_StorageKey |
| 368 | [-1879047191, bstr], ; Tag_Nonce |
| 369 | [805307371, int], ; Tag_MacLength |
| 370 | [1879049196, true], ; Tag_ResetSinceIdRotation |
| 371 | [-2147482642, bstr], ; Tag_CertificateSerial |
| 372 | [-1879047185, bstr], ; Tag_CertificateSubject |
| 373 | [1610613744, DateTime], ; Tag_CertificateNotBefore |
| 374 | [1610613745, DateTime], ; Tag_CertificateNotAfter |
| 375 | [805307378, int], ; Tag_MaxBootLevel |
| 376 | ) |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 377 | KeyMintOperation = &( |
| 378 | DeviceGetHardwareInfo: 0x11, |
| 379 | DeviceAddRngEntropy: 0x12, |
| 380 | DeviceGenerateKey: 0x13, |
| 381 | DeviceImportKey: 0x14, |
| 382 | DeviceImportWrappedKey: 0x15, |
| 383 | DeviceUpgradeKey: 0x16, |
| 384 | DeviceDeleteKey: 0x17, |
| 385 | DeviceDeleteAllKeys: 0x18, |
| 386 | DeviceDestroyAttestationIds: 0x19, |
| 387 | DeviceBegin: 0x1a, |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 388 | DeviceEarlyBootEnded: 0x1c, |
| 389 | DeviceConvertStorageKeyToEphemeral: 0x1d, |
| 390 | DeviceGetKeyCharacteristics: 0x1e, |
| 391 | OperationUpdateAad: 0x31, |
| 392 | OperationUpdate: 0x32, |
| 393 | OperationFinish: 0x33, |
| 394 | OperationAbort: 0x34, |
| 395 | RpcGetHardwareInfo: 0x41, |
| 396 | RpcGenerateEcdsaP256KeyPair: 0x42, |
| 397 | RpcGenerateCertificateRequest: 0x43, |
Tri Vo | 1f6c4a0 | 2022-10-13 17:24:20 -0700 | [diff] [blame] | 398 | RpcGenerateCertificateV2Request: 0x44, |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 399 | SharedSecretGetSharedSecretParameters: 0x51, |
| 400 | SharedSecretComputeSharedSecret: 0x52, |
| 401 | SecureClockGenerateTimeStamp: 0x61, |
| 402 | GetRootOfTrustChallenge: 0x71, |
| 403 | GetRootOfTrust: 0x72, |
| 404 | SendRootOfTrust: 0x73, |
| 405 | SetHalInfo: 0x81, |
| 406 | SetBootInfo: 0x82, |
David Drysdale | ed33ed1 | 2022-08-23 10:01:39 +0100 | [diff] [blame] | 407 | SetAttestationIds: 0x83, |
Eric Biggers | 4f8cad1 | 2024-02-16 20:15:53 +0000 | [diff] [blame] | 408 | SetHalVersion: 0x84, |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 409 | ) |
| 410 | GetHardwareInfoRequest = [] |
| 411 | GetHardwareInfoResponse = [ |
| 412 | ret: KeyMintHardwareInfo, |
| 413 | ] |
| 414 | AddRngEntropyRequest = [ |
| 415 | data: bstr, |
| 416 | ] |
| 417 | AddRngEntropyResponse = [] |
| 418 | GenerateKeyRequest = [ |
David Drysdale | 0cf92d2 | 2022-06-10 15:56:42 +0100 | [diff] [blame] | 419 | key_params: [* KeyParam], |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 420 | attestation_key: [? AttestationKey], |
| 421 | ] |
| 422 | GenerateKeyResponse = [ |
| 423 | ret: KeyCreationResult, |
| 424 | ] |
| 425 | ImportKeyRequest = [ |
David Drysdale | 0cf92d2 | 2022-06-10 15:56:42 +0100 | [diff] [blame] | 426 | key_params: [* KeyParam], |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 427 | key_format: KeyFormat, |
| 428 | key_data: bstr, |
| 429 | attestation_key: [? AttestationKey], |
| 430 | ] |
| 431 | ImportKeyResponse = [ |
| 432 | ret: KeyCreationResult, |
| 433 | ] |
| 434 | ImportWrappedKeyRequest = [ |
| 435 | wrapped_key_data: bstr, |
| 436 | wrapping_key_blob: bstr, |
| 437 | masking_key: bstr, |
David Drysdale | 0cf92d2 | 2022-06-10 15:56:42 +0100 | [diff] [blame] | 438 | unwrapping_params: [* KeyParam], |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 439 | password_sid: int, |
| 440 | biometric_sid: int, |
| 441 | ] |
| 442 | ImportWrappedKeyResponse = [ |
| 443 | ret: KeyCreationResult, |
| 444 | ] |
| 445 | UpgradeKeyRequest = [ |
| 446 | key_blob_to_upgrade: bstr, |
David Drysdale | 0cf92d2 | 2022-06-10 15:56:42 +0100 | [diff] [blame] | 447 | upgrade_params: [* KeyParam], |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 448 | ] |
| 449 | UpgradeKeyResponse = [ |
| 450 | ret: bstr, |
| 451 | ] |
| 452 | DeleteKeyRequest = [ |
| 453 | key_blob: bstr, |
| 454 | ] |
| 455 | DeleteKeyResponse = [] |
| 456 | DeleteAllKeysRequest = [] |
| 457 | DeleteAllKeysResponse = [] |
| 458 | DestroyAttestationIdsRequest = [] |
| 459 | DestroyAttestationIdsResponse = [] |
| 460 | BeginRequest = [ |
| 461 | purpose: KeyPurpose, |
| 462 | key_blob: bstr, |
David Drysdale | 0cf92d2 | 2022-06-10 15:56:42 +0100 | [diff] [blame] | 463 | params: [* KeyParam], |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 464 | auth_token: [? HardwareAuthToken], |
| 465 | ] |
| 466 | InternalBeginResult = [ |
| 467 | challenge: int, |
David Drysdale | 0cf92d2 | 2022-06-10 15:56:42 +0100 | [diff] [blame] | 468 | params: [* KeyParam], |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 469 | op_handle: int, |
| 470 | ] |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 471 | EarlyBootEndedRequest = [] |
| 472 | EarlyBootEndedResponse = [] |
| 473 | ConvertStorageKeyToEphemeralRequest = [ |
| 474 | storage_key_blob: bstr, |
| 475 | ] |
| 476 | ConvertStorageKeyToEphemeralResponse = [ |
| 477 | ret: bstr, |
| 478 | ] |
| 479 | GetKeyCharacteristicsRequest = [ |
| 480 | key_blob: bstr, |
| 481 | app_id: bstr, |
| 482 | app_data: bstr, |
| 483 | ] |
| 484 | GetKeyCharacteristicsResponse = [ |
| 485 | ret: [* KeyCharacteristics], |
| 486 | ] |
| 487 | UpdateAadRequest = [ |
| 488 | op_handle: int, |
| 489 | input: bstr, |
| 490 | auth_token: [? HardwareAuthToken], |
| 491 | timestamp_token: [? TimeStampToken], |
| 492 | ] |
| 493 | UpdateAadResponse = [] |
| 494 | UpdateRequest = [ |
| 495 | op_handle: int, |
| 496 | input: bstr, |
| 497 | auth_token: [? HardwareAuthToken], |
| 498 | timestamp_token: [? TimeStampToken], |
| 499 | ] |
| 500 | UpdateResponse = [ |
| 501 | ret: bstr, |
| 502 | ] |
| 503 | FinishRequest = [ |
| 504 | op_handle: int, |
| 505 | input: [? bstr], |
| 506 | signature: [? bstr], |
| 507 | auth_token: [? HardwareAuthToken], |
| 508 | timestamp_token: [? TimeStampToken], |
| 509 | confirmation_token: [? bstr], |
| 510 | ] |
| 511 | FinishResponse = [ |
| 512 | ret: bstr, |
| 513 | ] |
| 514 | AbortRequest = [ |
| 515 | op_handle: int, |
| 516 | ] |
| 517 | AbortResponse = [] |
| 518 | GetRpcHardwareInfoRequest = [] |
| 519 | GetRpcHardwareInfoResponse = [ |
David Drysdale | d8b53db | 2022-11-21 14:54:12 +0000 | [diff] [blame] | 520 | ret: HardwareInfo, |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 521 | ] |
| 522 | GenerateEcdsaP256KeyPairRequest = [ |
| 523 | test_mode: bool, |
| 524 | ] |
| 525 | GenerateEcdsaP256KeyPairResponse = [ |
| 526 | maced_public_key: MacedPublicKey, |
| 527 | ret: bstr, |
| 528 | ] |
| 529 | GenerateCertificateRequestRequest = [ |
| 530 | test_mode: bool, |
| 531 | keys_to_sign: [* MacedPublicKey], |
| 532 | endpoint_encryption_cert_chain: bstr, |
| 533 | challenge: bstr, |
| 534 | ] |
| 535 | GenerateCertificateRequestResponse = [ |
| 536 | device_info: DeviceInfo, |
| 537 | protected_data: ProtectedData, |
| 538 | ret: bstr, |
| 539 | ] |
Tri Vo | 1f6c4a0 | 2022-10-13 17:24:20 -0700 | [diff] [blame] | 540 | GenerateCertificateRequestV2Request = [ |
| 541 | keys_to_sign: [* MacedPublicKey], |
| 542 | challenge: bstr, |
| 543 | ] |
| 544 | GenerateCertificateRequestV2Response = [ |
| 545 | ret: bstr, |
| 546 | ] |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 547 | GetSharedSecretParametersRequest = [] |
| 548 | GetSharedSecretParametersResponse = [ |
| 549 | ret: SharedSecretParameters, |
| 550 | ] |
| 551 | ComputeSharedSecretRequest = [ |
| 552 | params: [* SharedSecretParameters], |
| 553 | ] |
| 554 | ComputeSharedSecretResponse = [ |
| 555 | ret: bstr, |
| 556 | ] |
| 557 | GenerateTimeStampRequest = [ |
| 558 | challenge: int, |
| 559 | ] |
| 560 | GenerateTimeStampResponse = [ |
| 561 | ret: TimeStampToken, |
| 562 | ] |
| 563 | PerformOpReq = &( |
| 564 | [DeviceGetHardwareInfo, GetHardwareInfoRequest], |
| 565 | [DeviceAddRngEntropy, AddRngEntropyRequest], |
| 566 | [DeviceGenerateKey, GenerateKeyRequest], |
| 567 | [DeviceImportKey, ImportKeyRequest], |
| 568 | [DeviceImportWrappedKey, ImportWrappedKeyRequest], |
| 569 | [DeviceUpgradeKey, UpgradeKeyRequest], |
| 570 | [DeviceDeleteKey, DeleteKeyRequest], |
| 571 | [DeviceDeleteAllKeys, DeleteAllKeysRequest], |
| 572 | [DeviceDestroyAttestationIds, DestroyAttestationIdsRequest], |
| 573 | [DeviceBegin, BeginRequest], |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 574 | [DeviceEarlyBootEnded, EarlyBootEndedRequest], |
| 575 | [DeviceConvertStorageKeyToEphemeral, ConvertStorageKeyToEphemeralRequest], |
| 576 | [DeviceGetKeyCharacteristics, GetKeyCharacteristicsRequest], |
| 577 | [OperationUpdateAad, UpdateAadRequest], |
| 578 | [OperationUpdate, UpdateRequest], |
| 579 | [OperationFinish, FinishRequest], |
| 580 | [OperationAbort, AbortRequest], |
| 581 | [RpcGetHardwareInfo, GetRpcHardwareInfoRequest], |
| 582 | [RpcGenerateEcdsaP256KeyPair, GenerateEcdsaP256KeyPairRequest], |
| 583 | [RpcGenerateCertificateRequest, GenerateCertificateRequestRequest], |
Tri Vo | 1f6c4a0 | 2022-10-13 17:24:20 -0700 | [diff] [blame] | 584 | [RpcGenerateCertificateV2Request, GenerateCertificateRequestV2Request], |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 585 | [SharedSecretGetSharedSecretParameters, GetSharedSecretParametersRequest], |
| 586 | [SharedSecretComputeSharedSecret, ComputeSharedSecretRequest], |
| 587 | [SecureClockGenerateTimeStamp, GenerateTimeStampRequest], |
| 588 | [GetRootOfTrustChallenge, GetRootOfTrustChallengeRequest], |
| 589 | [GetRootOfTrust, GetRootOfTrustRequest], |
| 590 | [SendRootOfTrust, SendRootOfTrustRequest], |
| 591 | [SetHalInfo, SetHalInfoRequest], |
| 592 | [SetBootInfo, SetBootInfoRequest], |
David Drysdale | ed33ed1 | 2022-08-23 10:01:39 +0100 | [diff] [blame] | 593 | [SetAttestationIds, SetAttestationIdsRequest], |
Eric Biggers | 4f8cad1 | 2024-02-16 20:15:53 +0000 | [diff] [blame] | 594 | [SetHalVersion, SetHalVersionRequest], |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 595 | ) |
| 596 | PerformOpRsp = &( |
| 597 | [DeviceGetHardwareInfo, GetHardwareInfoResponse], |
| 598 | [DeviceAddRngEntropy, AddRngEntropyResponse], |
| 599 | [DeviceGenerateKey, GenerateKeyResponse], |
| 600 | [DeviceImportKey, ImportKeyResponse], |
| 601 | [DeviceImportWrappedKey, ImportWrappedKeyResponse], |
| 602 | [DeviceUpgradeKey, UpgradeKeyResponse], |
| 603 | [DeviceDeleteKey, DeleteKeyResponse], |
| 604 | [DeviceDeleteAllKeys, DeleteAllKeysResponse], |
| 605 | [DeviceDestroyAttestationIds, DestroyAttestationIdsResponse], |
| 606 | [DeviceBegin, BeginResponse], |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 607 | [DeviceEarlyBootEnded, EarlyBootEndedResponse], |
| 608 | [DeviceConvertStorageKeyToEphemeral, ConvertStorageKeyToEphemeralResponse], |
| 609 | [DeviceGetKeyCharacteristics, GetKeyCharacteristicsResponse], |
| 610 | [OperationUpdateAad, UpdateAadResponse], |
| 611 | [OperationUpdate, UpdateResponse], |
| 612 | [OperationFinish, FinishResponse], |
| 613 | [OperationAbort, AbortResponse], |
| 614 | [RpcGetHardwareInfo, GetRpcHardwareInfoResponse], |
| 615 | [RpcGenerateEcdsaP256KeyPair, GenerateEcdsaP256KeyPairResponse], |
| 616 | [RpcGenerateCertificateRequest, GenerateCertificateRequestResponse], |
Tri Vo | 1f6c4a0 | 2022-10-13 17:24:20 -0700 | [diff] [blame] | 617 | [RpcGenerateCertificateV2Request, GenerateCertificateRequestV2Response], |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 618 | [SharedSecretGetSharedSecretParameters, GetSharedSecretParametersResponse], |
| 619 | [SharedSecretComputeSharedSecret, ComputeSharedSecretResponse], |
| 620 | [SecureClockGenerateTimeStamp, GenerateTimeStampResponse], |
| 621 | [GetRootOfTrustChallenge, GetRootOfTrustChallengeResponse], |
| 622 | [GetRootOfTrust, GetRootOfTrustResponse], |
| 623 | [SendRootOfTrust, SendRootOfTrustResponse], |
| 624 | [SetHalInfo, SetHalInfoResponse], |
| 625 | [SetBootInfo, SetBootInfoResponse], |
David Drysdale | ed33ed1 | 2022-08-23 10:01:39 +0100 | [diff] [blame] | 626 | [SetAttestationIds, SetAttestationIdsResponse], |
Eric Biggers | 4f8cad1 | 2024-02-16 20:15:53 +0000 | [diff] [blame] | 627 | [SetHalVersion, SetHalVersionResponse], |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 628 | ) |
| 629 | PerformOpResponse = [ |
David Drysdale | b19cb0a | 2022-11-21 15:41:48 +0000 | [diff] [blame] | 630 | error_code: int, |
David Drysdale | 64e07e3 | 2022-06-10 14:45:45 +0100 | [diff] [blame] | 631 | rsp: [? PerformOpRsp], |
| 632 | ] |