Lines Matching +full:- +full:e

4  * \brief This file provides an API for the RSA public-key cryptosystem.
6 * The RSA public-key cryptosystem is defined in <em>Public-Key
8 * and <em>Public-Key Cryptography Standards (PKCS) #1 v2.1:
14 * SPDX-License-Identifier: Apache-2.0
20 * http://www.apache.org/licenses/LICENSE-2.0
44 #define MBEDTLS_ERR_RSA_BAD_INPUT_DATA -0x4080 /**< Bad input parameters to fun…
45 #define MBEDTLS_ERR_RSA_INVALID_PADDING -0x4100 /**< Input data contains invalid…
46 #define MBEDTLS_ERR_RSA_KEY_GEN_FAILED -0x4180 /**< Something failed during gen…
47 #define MBEDTLS_ERR_RSA_KEY_CHECK_FAILED -0x4200 /**< Key failed to pass the vali…
48 #define MBEDTLS_ERR_RSA_PUBLIC_FAILED -0x4280 /**< The public key operation fa…
49 #define MBEDTLS_ERR_RSA_PRIVATE_FAILED -0x4300 /**< The private key operation f…
50 #define MBEDTLS_ERR_RSA_VERIFY_FAILED -0x4380 /**< The PKCS#1 verification fai…
51 #define MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE -0x4400 /**< The output buffer for decry…
52 …DTLS_ERR_RSA_RNG_FAILED -0x4480 /**< The random generator failed to genera…
64 #define MBEDTLS_RSA_SALT_LEN_ANY -1
91 mbedtls_mpi MBEDTLS_PRIVATE(E); /*!< The public exponent. */
97 mbedtls_mpi MBEDTLS_PRIVATE(DP); /*!< <code>D % (P - 1)</code>. */
98 mbedtls_mpi MBEDTLS_PRIVATE(DQ); /*!< <code>D % (Q - 1)</code>. */
107 mbedtls_mpi MBEDTLS_PRIVATE(Vf); /*!< The cached un-blinding value. */
115 EME-OAEP and EMSA-PSS encodings. */
118 mbedtls_threading_mutex_t MBEDTLS_PRIVATE(mutex); /*!< Thread-safety mutex. */
143 * \note Set padding to #MBEDTLS_RSA_PKCS_V21 for the RSAES-OAEP
144 * encryption scheme and the RSASSA-PSS signature scheme.
185 * completes the provided information to a ready-for-use
200 * \param E The public exponent. This may be \c NULL.
203 * \return A non-zero error code on failure.
208 const mbedtls_mpi *D, const mbedtls_mpi *E );
211 * \brief This function imports core RSA parameters, in raw big-endian
219 * completes the provided information to a ready-for-use
238 * \param E The public exponent. This may be \c NULL.
239 * \param E_len The Byte length of \p E; it is ignored if \p E == NULL.
242 * \return A non-zero error code on failure.
249 unsigned char const *E, size_t E_len );
255 * To setup an RSA public key, precisely \p N and \p E
262 * <ul><li>Derive \p P, \p Q from \p N, \p D, \p E.</li>
263 * <li>Derive \p N, \p D from \p P, \p Q, \p E.</li></ul>
288 * If this function runs successfully, the non-NULL buffers
289 * pointed to by \p N, \p P, \p Q, \p D, and \p E are fully
300 * and \p E if the former are not part of the
315 * \param E The MPI to hold the public exponent.
322 * \return A non-zero return code on any other failure.
327 mbedtls_mpi *D, mbedtls_mpi *E );
331 * in raw big-endian binary format.
333 * If this function runs successfully, the non-NULL buffers
334 * pointed to by \p N, \p P, \p Q, \p D, and \p E are fully
345 * and \p E if the former are not part of the
366 * \param E The Byte array to hold the public exponent,
374 * \return A non-zero return code on any other failure.
381 unsigned char *E, size_t E_len );
386 * \note Alternative RSA implementations not using CRT-parameters
391 * \param DP The MPI to hold \c D modulo `P-1`,
393 * \param DQ The MPI to hold \c D modulo `Q-1`,
399 * \return A non-zero error code on failure.
473 * content of an PKCS1-encoded RSA private key, for example, you
493 * \brief This function checks a public-private RSA key pair.
511 * of length \c ctx->len Bytes. For example, \c 256 Bytes
512 * for an 2048-bit RSA modulus.
514 * of length \c ctx->len Bytes. For example, \c 256 Bytes
515 * for an 2048-bit RSA modulus.
536 * against some side-channel attacks.
548 * of length \c ctx->len Bytes. For example, \c 256 Bytes
549 * for an 2048-bit RSA modulus.
551 * of length \c ctx->len Bytes. For example, \c 256 Bytes
552 * for an 2048-bit RSA modulus.
581 * of length \c ctx->len Bytes. For example, \c 256 Bytes
582 * for an 2048-bit RSA modulus.
596 * (RSAES-PKCS1-v1_5-ENCRYPT).
608 * of length \c ctx->len Bytes. For example, \c 256 Bytes
609 * for an 2048-bit RSA modulus.
623 * operation (RSAES-OAEP-ENCRYPT).
626 * of ctx->N. For example, 128 Bytes if RSA-1024 is used.
642 * of length \c ctx->len Bytes. For example, \c 256 Bytes
643 * for an 2048-bit RSA modulus.
664 * as large as the size \p ctx->len of \p ctx->N (for example,
665 * 128 Bytes if RSA-1024 is used) to be able to hold an
678 * of length \c ctx->len Bytes. For example, \c 256 Bytes
679 * for an 2048-bit RSA modulus.
697 * operation (RSAES-PKCS1-v1_5-DECRYPT).
700 * as large as the size \p ctx->len of \p ctx->N, for example,
701 * 128 Bytes if RSA-1024 is used, to be able to hold an
714 * of length \c ctx->len Bytes. For example, \c 256 Bytes
715 * for an 2048-bit RSA modulus.
734 * operation (RSAES-OAEP-DECRYPT).
737 * as large as the size \p ctx->len of \p ctx->N, for
738 * example, 128 Bytes if RSA-1024 is used, to be able to
756 * of length \c ctx->len Bytes. For example, \c 256 Bytes
757 * for an 2048-bit RSA modulus.
782 * of \p ctx->N. For example, 128 Bytes if RSA-1024 is used.
793 * \param md_alg The message-digest algorithm used to hash the original data.
801 * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
802 * for an 2048-bit RSA modulus. A buffer length of
818 * operation (RSASSA-PKCS1-v1_5-SIGN).
825 * \param md_alg The message-digest algorithm used to hash the original data.
833 * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
834 * for an 2048-bit RSA modulus. A buffer length of
850 * operation (RSASSA-PSS-SIGN).
856 * mask generation function, consult <em>RFC-3447: Public-Key
861 * with FIPS 186-4 §5.5 (e) and RFC 8017 (PKCS#1 v2.2) §9.1.1
871 * \param md_alg The message-digest algorithm used to hash the original data.
882 * FIPS 186-4 §5.5.
884 * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
885 * for an 2048-bit RSA modulus. A buffer length of
902 * operation (RSASSA-PSS-SIGN).
908 * mask generation function, consult <em>RFC-3447: Public-Key
914 * size complies with FIPS 186-4 §5.5 (e) and RFC 8017 (PKCS#1
926 * \param md_alg The message-digest algorithm used to hash the original data.
934 * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
935 * for an 2048-bit RSA modulus. A buffer length of
961 * \param md_alg The message-digest algorithm used to hash the original data.
969 * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
970 * for an 2048-bit RSA modulus.
983 * operation (RSASSA-PKCS1-v1_5-VERIFY).
986 * \param md_alg The message-digest algorithm used to hash the original data.
994 * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
995 * for an 2048-bit RSA modulus.
1008 * operation (RSASSA-PSS-VERIFY).
1014 * mask generation function, consult <em>RFC-3447: Public-Key
1021 * \param md_alg The message-digest algorithm used to hash the original data.
1029 * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
1030 * for an 2048-bit RSA modulus.
1043 * operation (RSASSA-PSS-VERIFY).
1046 * of \p ctx->N. For example, 128 Bytes if RSA-1024 is used.
1052 * \param md_alg The message-digest algorithm used to hash the original data.
1063 * <em>RFC-3447: Public-Key Cryptography Standards
1069 * buffer of length \c ctx->len Bytes. For example, \c 256 Bytes
1070 * for an 2048-bit RSA modulus.
1098 * this function is a no-op. If it is not \c NULL, it must