ReactOS 0.4.15-dev-7924-g5949c20
rsa_internal.h
Go to the documentation of this file.
1
37/*
38 * Copyright The Mbed TLS Contributors
39 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
40 *
41 * This file is provided under the Apache License 2.0, or the
42 * GNU General Public License v2.0 or later.
43 *
44 * **********
45 * Apache License 2.0:
46 *
47 * Licensed under the Apache License, Version 2.0 (the "License"); you may
48 * not use this file except in compliance with the License.
49 * You may obtain a copy of the License at
50 *
51 * http://www.apache.org/licenses/LICENSE-2.0
52 *
53 * Unless required by applicable law or agreed to in writing, software
54 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
55 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
56 * See the License for the specific language governing permissions and
57 * limitations under the License.
58 *
59 * **********
60 *
61 * **********
62 * GNU General Public License v2.0 or later:
63 *
64 * This program is free software; you can redistribute it and/or modify
65 * it under the terms of the GNU General Public License as published by
66 * the Free Software Foundation; either version 2 of the License, or
67 * (at your option) any later version.
68 *
69 * This program is distributed in the hope that it will be useful,
70 * but WITHOUT ANY WARRANTY; without even the implied warranty of
71 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
72 * GNU General Public License for more details.
73 *
74 * You should have received a copy of the GNU General Public License along
75 * with this program; if not, write to the Free Software Foundation, Inc.,
76 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
77 *
78 * **********
79 *
80 */
81
82#ifndef MBEDTLS_RSA_INTERNAL_H
83#define MBEDTLS_RSA_INTERNAL_H
84
85#if !defined(MBEDTLS_CONFIG_FILE)
86#include "config.h"
87#else
88#include MBEDTLS_CONFIG_FILE
89#endif
90
91#include "bignum.h"
92
93#ifdef __cplusplus
94extern "C" {
95#endif
96
97
123 mbedtls_mpi const *D,
125
148 mbedtls_mpi const *Q,
149 mbedtls_mpi const *E,
150 mbedtls_mpi *D );
151
152
174 const mbedtls_mpi *D, mbedtls_mpi *DP,
175 mbedtls_mpi *DQ, mbedtls_mpi *QP );
176
177
209 const mbedtls_mpi *Q, const mbedtls_mpi *D,
210 const mbedtls_mpi *E,
211 int (*f_rng)(void *, unsigned char *, size_t),
212 void *p_rng );
213
244 const mbedtls_mpi *D, const mbedtls_mpi *DP,
245 const mbedtls_mpi *DQ, const mbedtls_mpi *QP );
246
247#ifdef __cplusplus
248}
249#endif
250
251#endif /* rsa_internal.h */
#define N
Definition: crc32.c:57
Multi-precision integer library.
#define D(d)
Definition: builtin.c:4557
#define P(row, col)
static const WCHAR E[]
Definition: oid.c:1253
int mbedtls_rsa_deduce_private_exponent(mbedtls_mpi const *P, mbedtls_mpi const *Q, mbedtls_mpi const *E, mbedtls_mpi *D)
Compute RSA private exponent from prime moduli and public key.
int mbedtls_rsa_validate_params(const mbedtls_mpi *N, const mbedtls_mpi *P, const mbedtls_mpi *Q, const mbedtls_mpi *D, const mbedtls_mpi *E, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
Check validity of core RSA parameters.
int mbedtls_rsa_deduce_primes(mbedtls_mpi const *N, mbedtls_mpi const *E, mbedtls_mpi const *D, mbedtls_mpi *P, mbedtls_mpi *Q)
Compute RSA prime moduli P, Q from public modulus N=PQ and a pair of private and public key.
int mbedtls_rsa_deduce_crt(const mbedtls_mpi *P, const mbedtls_mpi *Q, const mbedtls_mpi *D, mbedtls_mpi *DP, mbedtls_mpi *DQ, mbedtls_mpi *QP)
Generate RSA-CRT parameters.
int mbedtls_rsa_validate_crt(const mbedtls_mpi *P, const mbedtls_mpi *Q, const mbedtls_mpi *D, const mbedtls_mpi *DP, const mbedtls_mpi *DQ, const mbedtls_mpi *QP)
Check validity of RSA CRT parameters.
MPI structure.
Definition: bignum.h:211