1 /* 2 * Copyright (c) 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 #ifndef OHCRYPTO_AGREEMENT_TEST_H 16 #define OHCRYPTO_AGREEMENT_TEST_H 17 18 #include "crypto_common.h" 19 #include "crypto_key_agreement.h" 20 21 22 typedef struct { 23 const char *algoNameA; 24 const char *algoNameB; 25 } AgreementSpec; 26 27 typedef struct { 28 const char *algoName; 29 const char *vectorSource; 30 const char *localPrivKey; 31 const char *localPubKey; 32 const char *peerPrivKey; 33 const char *peerPubKey; 34 const char *sharedKey; 35 } VectorAgreementSpec; 36 37 typedef struct { 38 const char *algoName; 39 const char *nidName; 40 const char *vectorSource; 41 const char *bobD; 42 const char *bobX; 43 const char *bobY; 44 const char *aliceD; 45 const char *aliceX; 46 const char *aliceY; 47 const char *sharedKey; 48 } VectorEccAgreementSpec; 49 50 typedef struct { 51 const char *algoName; 52 const char *vectorSource; 53 const char *p; 54 const char *g; 55 const char *bobSk; 56 const char *bobPk; 57 const char *aliceSk; 58 const char *alicePk; 59 const char *sharedKey; 60 } VectorDhAgreementSpec; 61 62 #endif