|  | 
| 1 | 1 | /** | 
| 2 |  | - * \file rsa_internal.h | 
| 3 |  | - * | 
| 4 |  | - * \brief Context-independent RSA helper functions | 
| 5 |  | - */ | 
| 6 |  | -/* | 
| 7 |  | - *  Copyright (C) 2006-2017, ARM Limited, All Rights Reserved | 
| 8 |  | - *  SPDX-License-Identifier: GPL-2.0 | 
| 9 |  | - * | 
| 10 |  | - *  This program is free software; you can redistribute it and/or modify | 
| 11 |  | - *  it under the terms of the GNU General Public License as published by | 
| 12 |  | - *  the Free Software Foundation; either version 2 of the License, or | 
| 13 |  | - *  (at your option) any later version. | 
| 14 |  | - * | 
| 15 |  | - *  This program is distributed in the hope that it will be useful, | 
| 16 |  | - *  but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| 17 |  | - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
| 18 |  | - *  GNU General Public License for more details. | 
| 19 |  | - * | 
| 20 |  | - *  You should have received a copy of the GNU General Public License along | 
| 21 |  | - *  with this program; if not, write to the Free Software Foundation, Inc., | 
| 22 |  | - *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 
| 23 |  | - * | 
| 24 |  | - *  This file is part of mbed TLS (https://tls.mbed.org) | 
| 25 |  | - * | 
| 26 |  | - * | 
| 27 |  | - *  This file declares some RSA-related helper functions useful when | 
| 28 |  | - *  implementing the RSA interface. They are public and provided in a | 
| 29 |  | - *  separate compilation unit in order to make it easy for designers of | 
| 30 |  | - *  alternative RSA implementations to use them in their code, as it is | 
| 31 |  | - *  conceived that the functionality they provide will be necessary | 
| 32 |  | - *  for most complete implementations. | 
| 33 |  | - * | 
| 34 |  | - *  End-users of Mbed TLS not intending to re-implement the RSA functionality | 
| 35 |  | - *  are not expected to get into the need of making use of these functions directly, | 
| 36 |  | - *  but instead should be able to use the functions declared in rsa.h. | 
| 37 |  | - * | 
| 38 |  | - *  There are two classes of helper functions: | 
| 39 |  | - *  (1) Parameter-generating helpers. These are: | 
| 40 |  | - *	  - ttls_rsa_deduce_primes | 
| 41 |  | - *	  - ttls_rsa_deduce_private_exponent | 
| 42 |  | - *	  - ttls_rsa_deduce_crt | 
| 43 |  | - *	   Each of these functions takes a set of core RSA parameters | 
| 44 |  | - *	   and generates some other, or CRT related parameters. | 
| 45 |  | - *  (2) Parameter-checking helpers. These are: | 
| 46 |  | - *	  - ttls_rsa_validate_params | 
| 47 |  | - *	  - ttls_rsa_validate_crt | 
| 48 |  | - *	  They take a set of core or CRT related RSA parameters | 
| 49 |  | - *	  and check their validity. | 
| 50 |  | - * | 
|  | 2 | + *		Tempesta TLS | 
|  | 3 | + * | 
|  | 4 | + * Context-independent RSA helper functions. | 
|  | 5 | + * | 
|  | 6 | + * This file declares some RSA-related helper functions useful when | 
|  | 7 | + * implementing the RSA interface. They are public and provided in a | 
|  | 8 | + * separate compilation unit in order to make it easy for designers of | 
|  | 9 | + * alternative RSA implementations to use them in their code, as it is | 
|  | 10 | + * conceived that the functionality they provide will be necessary | 
|  | 11 | + * for most complete implementations. | 
|  | 12 | + * | 
|  | 13 | + * There are two classes of helper functions: | 
|  | 14 | + * (1) Parameter-generating helpers. These are: | 
|  | 15 | + *  - ttls_rsa_deduce_primes | 
|  | 16 | + *  - ttls_rsa_deduce_private_exponent | 
|  | 17 | + *  - ttls_rsa_deduce_crt | 
|  | 18 | + *   Each of these functions takes a set of core RSA parameters | 
|  | 19 | + *   and generates some other, or CRT related parameters. | 
|  | 20 | + * (2) Parameter-checking helpers. These are: | 
|  | 21 | + *  - ttls_rsa_validate_params | 
|  | 22 | + *  - ttls_rsa_validate_crt | 
|  | 23 | + *  They take a set of core or CRT related RSA parameters | 
|  | 24 | + *  and check their validity. | 
|  | 25 | + * | 
|  | 26 | + * Copyright (C) 2006-2017, ARM Limited, All Rights Reserved | 
|  | 27 | + * Copyright (C) 2015-2019 Tempesta Technologies, Inc. | 
|  | 28 | + * SPDX-License-Identifier: GPL-2.0 | 
|  | 29 | + * | 
|  | 30 | + * This program is free software; you can redistribute it and/or modify | 
|  | 31 | + * it under the terms of the GNU General Public License as published by | 
|  | 32 | + * the Free Software Foundation; either version 2 of the License, or | 
|  | 33 | + * (at your option) any later version. | 
|  | 34 | + * | 
|  | 35 | + * This program is distributed in the hope that it will be useful, | 
|  | 36 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|  | 37 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|  | 38 | + * GNU General Public License for more details. | 
|  | 39 | + * | 
|  | 40 | + * You should have received a copy of the GNU General Public License along | 
|  | 41 | + * with this program; if not, write to the Free Software Foundation, Inc., | 
|  | 42 | + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 
| 51 | 43 |  */ | 
| 52 |  | - | 
| 53 | 44 | #ifndef TTLS_RSA_INTERNAL_H | 
| 54 | 45 | #define TTLS_RSA_INTERNAL_H | 
| 55 | 46 | 
 | 
| 56 |  | -#if !defined(TTLS_CONFIG_FILE) | 
| 57 | 47 | #include "config.h" | 
| 58 |  | -#else | 
| 59 |  | -#include TTLS_CONFIG_FILE | 
| 60 |  | -#endif | 
| 61 |  | - | 
| 62 | 48 | #include "bignum.h" | 
| 63 | 49 | 
 | 
| 64 |  | -#ifdef __cplusplus | 
| 65 |  | -extern "C" { | 
| 66 |  | -#endif | 
| 67 |  | - | 
| 68 |  | - | 
| 69 | 50 | /** | 
| 70 | 51 |  * \brief		  Compute RSA prime moduli P, Q from public modulus N=PQ | 
| 71 | 52 |  *				 and a pair of private and public key. | 
|  | 
0 commit comments