• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
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  * Description: mbedtls harden adapt internal header file.
15  *
16  * Create: 2023-05-10
17 */
18 
19 #ifndef MBEDTLS_BIGNUM_HARDEN_H
20 #define MBEDTLS_BIGNUM_HARDEN_H
21 
22 #include "mbedtls/bignum.h"
23 
24 int check_exp_mod_harden_can_do( const mbedtls_mpi *A,
25         const mbedtls_mpi *E, const mbedtls_mpi *N );
26 
27 int exp_mod_harden( mbedtls_mpi *X, const mbedtls_mpi *A,
28         const mbedtls_mpi *E, const mbedtls_mpi *N);
29 
30 int check_mod_harden_can_do( const mbedtls_mpi *A, const mbedtls_mpi *B );
31 
32 int mod_harden( mbedtls_mpi *R, const mbedtls_mpi *A, const mbedtls_mpi *B );
33 
34 #endif /* MBEDTLS_BIGNUM_HARDEN_H */