Lines Matching +full:- +full:a

8  *  SPDX-License-Identifier: Apache-2.0
12 * You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
52 #define MBEDTLS_ERR_PK_ALLOC_FAILED -0x3F80 /**< Memory allocation failed. */
53 #define MBEDTLS_ERR_PK_TYPE_MISMATCH -0x3F00 /**< Type mismatch, eg attempt to encrypt with …
54 #define MBEDTLS_ERR_PK_BAD_INPUT_DATA -0x3E80 /**< Bad input parameters to function. */
55 #define MBEDTLS_ERR_PK_FILE_IO_ERROR -0x3E00 /**< Read/write of file failed. */
56 #define MBEDTLS_ERR_PK_KEY_INVALID_VERSION -0x3D80 /**< Unsupported key version */
57 #define MBEDTLS_ERR_PK_KEY_INVALID_FORMAT -0x3D00 /**< Invalid key tag or value. */
58 #define MBEDTLS_ERR_PK_UNKNOWN_PK_ALG -0x3C80 /**< Key algorithm is unsupported (only RSA and…
59 #define MBEDTLS_ERR_PK_PASSWORD_REQUIRED -0x3C00 /**< Private key password can't be empty. */
60 #define MBEDTLS_ERR_PK_PASSWORD_MISMATCH -0x3B80 /**< Given private key password does not allow …
61 #define MBEDTLS_ERR_PK_INVALID_PUBKEY -0x3B00 /**< The pubkey tag or value is invalid (only R…
62 #define MBEDTLS_ERR_PK_INVALID_ALG -0x3A80 /**< The algorithm tag or value is invalid. */
63 #define MBEDTLS_ERR_PK_UNKNOWN_NAMED_CURVE -0x3A00 /**< Elliptic curve is unsupported (only NIST c…
64 #define MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE -0x3980 /**< Unavailable feature, e.g. RSA disabled for…
65 #define MBEDTLS_ERR_PK_SIG_LEN_MISMATCH -0x3900 /**< The buffer contains a valid signature foll…
66 #define MBEDTLS_ERR_PK_BUFFER_TOO_SMALL -0x3880 /**< The output buffer is too small. */
87 * \brief Options for RSASSA-PSS signature verification.
98 * \brief Maximum size of a signature made by mbedtls_pk_sign().
123 /* For ECDSA, the ecdsa module exports a constant for the maximum
131 /* PSA_SIGNATURE_MAX_SIZE is the maximum size of a signature made
196 /* Now we can declare functions that take a pointer to that */
202 * Quick access to an RSA context inside a PK context.
215 * Quick access to an EC context inside a PK context.
228 * \brief Types for RSA-alt abstraction
250 * \brief Initialize a #mbedtls_pk_context (as NONE).
258 * \brief Free the components of a #mbedtls_pk_context.
272 * \brief Initialize a restart context
280 * \brief Free the components of a restart context
289 * \brief Initialize a PK context with the information given
290 * and allocates the type-specific PK subcontext.
300 * \note For contexts holding an RSA-alt key, use
307 * \brief Initialize a PK context to wrap a PSA key.
310 * that wrap a (possibly opaque) PSA key instead of
340 * \brief Initialize an RSA-alt context
352 * \note This function replaces \c mbedtls_pk_setup() for RSA-alt.
382 * \brief Tell if a context can do the operation given by type
389 * type. This is always the case for a context that has
401 * does not rely on a hash algorithm (non-deterministic
405 * &sect;9.2 steps 3&ndash;6. If \p md_alg is a valid hash
414 * #MBEDTLS_ERR_PK_SIG_LEN_MISMATCH if there is a valid
416 * or a specific error code.
457 * \param options Pointer to type-specific options, or NULL
468 * #MBEDTLS_ERR_PK_SIG_LEN_MISMATCH if there is a valid
470 * or a specific error code.
478 * to a mbedtls_pk_rsassa_pss_options structure,
490 * with a private key.
497 * You may use a smaller buffer if it is large enough
505 * \return 0 on success, or a specific error code.
508 * There is no interface in the PK module to make RSASSA-PSS
528 * with a private key.
535 * You may use a smaller buffer if it is large enough
559 * with a private key.
570 * \return 0 on success, or a specific error code.
593 * \return 0 on success, or a specific error code.
601 * \brief Check if a public-private pair of keys matches.
603 * \param pub Context holding a public key.
604 * \param prv Context holding a private (and public) key.
610 * be checked - in that case they may or may not match.
611 * \return #MBEDTLS_ERR_PK_BAD_INPUT_DATA if a context is invalid.
612 * \return Another non-zero value if the keys do not match.
644 * \return #MBEDTLS_PK_NONE for a context that has not been set up.
651 * \brief Parse a private key in PEM or DER format
658 * contain a null-terminated string.
663 * Pass \c NULL if expecting a non-encrypted key.
664 * Pass a string of \p pwdlen bytes if expecting an encrypted
665 * key; a non-encrypted key will also be accepted.
673 * with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a
678 * \return 0 if successful, or a specific PK or PEM error code
687 * \brief Parse a public key in PEM or DER format
694 * contain a null-terminated string.
700 * with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a
705 * \return 0 if successful, or a specific PK or PEM error code
713 * \brief Load and parse a private key
719 * Pass \c NULL if expecting a non-encrypted key.
720 * Pass a null-terminated string if expecting an encrypted
721 * key; a non-encrypted key will also be accepted.
727 * with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a
732 * \return 0 if successful, or a specific PK or PEM error code
740 * \brief Load and parse a public key
748 * you need a specific key type, check the result with
753 * \return 0 if successful, or a specific PK or PEM error code
761 * \brief Write a private key to a PKCS#1 or SEC1 DER structure
766 * \param ctx PK context which must contain a valid private key.
770 * \return length of data written if successful, or a specific
776 * \brief Write a public key to a SubjectPublicKeyInfo DER structure
781 * \param ctx PK context which must contain a valid public or private key.
785 * \return length of data written if successful, or a specific
792 * \brief Write a public key to a PEM string
794 * \param ctx PK context which must contain a valid public or private key.
795 * \param buf Buffer to write to. The output includes a
799 * \return 0 if successful, or a specific error code
804 * \brief Write a private key to a PKCS#1 or SEC1 PEM string
806 * \param ctx PK context which must contain a valid private key.
807 * \param buf Buffer to write to. The output includes a
811 * \return 0 if successful, or a specific error code
818 * WARNING: Low-level functions. You probably do not want to use these unless
824 * \brief Parse a SubjectPublicKeyInfo DER structure
831 * \return 0 if successful, or a specific PK error code
839 * \brief Write a subjectPublicKey to ASN.1 data
843 * \param start start of the buffer (for bounds-checking)
844 * \param key PK context which must contain a valid public or private key.
846 * \return the length written or a negative error code
864 * \warning This is a temporary utility function for tests. It might
870 * \param pk Input: the EC key to import to a PSA key.
871 * Output: a PK context wrapping that PSA key.
872 * \param key Output: a PSA key identifier.