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 COMMON_STANDARD_UNBIND_EXCHANGE_H 17 #define COMMON_STANDARD_UNBIND_EXCHANGE_H 18 19 #include <stdint.h> 20 #include "common_defs.h" 21 #include "pake_base_cur_task.h" 22 23 #define HICHAIN_REMOVE_INFO_REQUEST "hichain_remove_info_request" 24 #define HICHAIN_REMOVE_INFO_RESPONSE "hichain_remove_info_response" 25 26 #define STANDARD_UNBIND_EXCHANGE_NONCE_LEN 12 27 28 typedef struct StandardUnbindExchangeParamsT { 29 Uint8Buff rmvInfo; 30 Uint8Buff exRmvCipher; 31 Uint8Buff resultCipher; 32 Uint8Buff nonce; 33 } StandardUnbindExchangeParams; 34 35 int32_t InitStandardUnbindExchangeParams(StandardUnbindExchangeParams *params); 36 void DestroyStandardUnbindExchangeParams(StandardUnbindExchangeParams *params); 37 38 int32_t ClientRequestStandardUnbindExchange(const PakeParams *pakeParams, StandardUnbindExchangeParams *exchangeParams); 39 int32_t ServerResponseStandardUnbindExchange(PakeParams *pakeParams, StandardUnbindExchangeParams *exchangeParams); 40 int32_t ClientConfirmStandardUnbindExchange(PakeParams *pakeParams, StandardUnbindExchangeParams *exchangeParams); 41 42 #endif 43