• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_ASYM_CIPHER_TEST_H
16 #define OHCRYPTO_ASYM_CIPHER_TEST_H
17 
18 #include "crypto_common.h"
19 #include "crypto_asym_cipher.h"
20 #include "crypto_framework_common_test.h"
21 
22 #define OHTEST_RSA_512_KEYSIZE 64
23 #define OHTEST_RSA_768_KEYSIZE 96
24 #define OHTEST_RSA_1024_KEYSIZE 128
25 #define OHTEST_RSA_2048_KEYSIZE 256
26 #define OHTEST_RSA_3072_KEYSIZE 384
27 #define OHTEST_RSA_4096_KEYSIZE 512
28 #define OHTEST_RSA_8192_KEYSIZE 1024
29 
30 #define OHTEST_MD5_DIGIESTSIZE 16
31 #define OHTEST_SHA1_DIGIESTSIZE 20
32 #define OHTEST_SHA224_DIGIESTSIZE 28
33 #define OHTEST_SHA256_DIGIESTSIZE 32
34 #define OHTEST_SHA384_DIGIESTSIZE 48
35 #define OHTEST_SHA512_DIGIESTSIZE 64
36 #define OHTEST_SM3_DIGIESTSIZE 32
37 
38 #define OHTEST_RSA_PKCS1_PADDING_SIZE 11
39 
40 typedef struct {
41     const char *algoName;
42     const char *cipherName;
43     int pkLen;
44 } AsymCipherSpec;
45 
46 typedef struct {
47     const char *algoName;
48     const char *cipherName;
49     int pkLen;
50     int len;
51 } AsymSegmentCipherSpec;
52 
53 #endif