1 /* 2 * Copyright (c) 2021-2025 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_IPC_SERVICE_H 17 #define HKS_IPC_SERVICE_H 18 19 #include "hks_type_inner.h" 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 void HksIpcServiceGenerateKey(const struct HksBlob *srcData, const uint8_t *context); 26 27 void HksIpcServiceImportKey(const struct HksBlob *srcData, const uint8_t *context); 28 29 void HksIpcServiceExportPublicKey(const struct HksBlob *srcData, const uint8_t *context); 30 31 void HksIpcServiceImportWrappedKey(const struct HksBlob *srcData, const uint8_t *context); 32 33 void HksIpcServiceDeleteKey(const struct HksBlob *srcData, const uint8_t *context); 34 35 void HksIpcServiceGetKeyParamSet(const struct HksBlob *srcData, const uint8_t *context); 36 37 void HksIpcServiceKeyExist(const struct HksBlob *srcData, const uint8_t *context); 38 39 void HksIpcServiceGenerateRandom(const struct HksBlob *srcData, const uint8_t *context); 40 41 void HksIpcServiceSign(const struct HksBlob *srcData, const uint8_t *context); 42 43 void HksIpcServiceVerify(const struct HksBlob *srcData, const uint8_t *context); 44 45 void HksIpcServiceEncrypt(const struct HksBlob *srcData, const uint8_t *context); 46 47 void HksIpcServiceDecrypt(const struct HksBlob *srcData, const uint8_t *context); 48 49 void HksIpcServiceAgreeKey(const struct HksBlob *srcData, const uint8_t *context); 50 51 void HksIpcServiceDeriveKey(const struct HksBlob *srcData, const uint8_t *context); 52 53 void HksIpcServiceMac(const struct HksBlob *srcData, const uint8_t *context); 54 55 void HksIpcServiceGetKeyInfoList(const struct HksBlob *srcData, const uint8_t *context); 56 57 void HksIpcServiceAttestKey(const struct HksBlob *srcData, const uint8_t *context, const uint8_t *remoteObject); 58 59 void HksIpcServiceInit(const struct HksBlob *paramSetBlob, struct HksBlob *outData, const uint8_t *context); 60 61 void HksIpcServiceUpdate(const struct HksBlob *paramSetBlob, struct HksBlob *outData, const uint8_t *context); 62 63 void HksIpcServiceFinish(const struct HksBlob *paramSetBlob, struct HksBlob *outData, const uint8_t *context); 64 65 void HksIpcServiceAbort(const struct HksBlob *paramSetBlob, struct HksBlob *outData, const uint8_t *context); 66 67 void HksIpcServiceListAliases(const struct HksBlob *srcData, const uint8_t *context); 68 69 void HksIpcServiceRenameKeyAlias(const struct HksBlob *srcData, const uint8_t *context); 70 71 void HksIpcChangeStorageLevel(const struct HksBlob *srcData, const uint8_t *context); 72 73 void HksIpcWrapKey(const struct HksBlob *srcData, const uint8_t *context); 74 75 void HksIpcUnwrapKey(const struct HksBlob *srcData, const uint8_t *context); 76 77 #ifdef __cplusplus 78 } 79 #endif 80 81 #endif 82