1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef HKS_CMD_ID_H 17 #define HKS_CMD_ID_H 18 19 #include "hks_type_inner.h" 20 21 enum HksCmdId { 22 HKS_CMD_ID_INVALID = 0x0, 23 HKS_CMD_ID_GENERATE_KEY, 24 HKS_CMD_ID_GET_KEY_CHARACTER, 25 HKS_CMD_ID_BEGIN, 26 HKS_CMD_ID_UPDATE, 27 HKS_CMD_ID_FINISH, 28 HKS_CMD_ID_ABORT, 29 HKS_CMD_ID_SET, 30 HKS_CMD_ID_GET, 31 HKS_CMD_ID_ATTEST_KEY, 32 HKS_CMD_ID_EXPORT_KEY, 33 HKS_CMD_ID_DELETE, 34 HKS_CMD_ID_EXPORT_TRUST_CERT, 35 HKS_CMD_ID_ECDH, 36 HKS_CMD_ID_ATTEST_TA_KEY, 37 HKS_CMD_ID_SET_KEY_PROTECTION, 38 HKS_CMD_ID_CONFIGURE, 39 40 HKS_CMD_ID_IMPORT_KEY = 0x100, 41 HKS_CMD_ID_GET_CERTCHAIN = 0x101, 42 HKS_CMD_ID_SIGN = 0x102, 43 HKS_CMD_ID_SIGN_INIT = 0x103, 44 HKS_CMD_ID_SIGN_UPDATE = 0x104, 45 HKS_CMD_ID_SIGN_FINAL = 0x105, 46 HKS_CMD_ID_VERIFY = 0x106, 47 HKS_CMD_ID_VERIFY_INIT = 0x107, 48 HKS_CMD_ID_VERIFY_UPDATE = 0x108, 49 HKS_CMD_ID_VERIFY_FINAL = 0x109, 50 HKS_CMD_ID_MAC = 0x10A, 51 HKS_CMD_ID_MAC_INIT = 0x10B, 52 HKS_CMD_ID_MAC_UPDATE = 0x10C, 53 HKS_CMD_ID_MAC_FINAL = 0x10D, 54 HKS_CMD_ID_ENCRYPT = 0x10E, 55 HKS_CMD_ID_ENCRYPT_INIT = 0x10F, 56 HKS_CMD_ID_ENCRYPT_UPDATE = 0x110, 57 HKS_CMD_ID_ENCRYPT_FINAL = 0x111, 58 HKS_CMD_ID_DECRYPT = 0x112, 59 HKS_CMD_ID_DECRYPT_INIT = 0x113, 60 HKS_CMD_ID_DECRYPT_UPDATE = 0x114, 61 HKS_CMD_ID_DECRYPT_FINAL = 0x115, 62 HKS_CMD_ID_CHECK_KEY_LEGALITY = 0x116, 63 HKS_CMD_ID_GENERATE_RANDOM = 0x117, 64 HKS_CMD_ID_AGREE_KEY = 0x118, 65 HKS_CMD_ID_DERIVE_KEY = 0x119, 66 67 HKS_CMD_ID_WRAP = 0x1000, 68 HKS_CMD_ID_UNWRAP = 0x1001, 69 70 HKS_CMD_ID_SIGN_WITH_DEV_KEY = 0x00010103, 71 72 HKS_CMD_ID_GET_FP_AUTH_RESULT_QCOM = 0x00020500, 73 74 HKS_CMD_ID_INJECT_KEY = 0x00010015, 75 HKS_CMD_ID_INJECT_KEY_VERIFY = 0x00010016, 76 }; 77 78 #endif 79