mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-07-10 11:37:35 +00:00
Document thread-safety of the RSA functions
This commit is contained in:
parent
f0f399d66c
commit
5574546524
|
@ -199,6 +199,7 @@ int rsa_check_pub_priv( const rsa_context *pub, const rsa_context *prv );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Do an RSA public key operation
|
* \brief Do an RSA public key operation
|
||||||
|
* (Thread-safe if POLARSSL_THREADING_C is enabled)
|
||||||
*
|
*
|
||||||
* \param ctx RSA context
|
* \param ctx RSA context
|
||||||
* \param input input buffer
|
* \param input input buffer
|
||||||
|
@ -219,6 +220,7 @@ int rsa_public( rsa_context *ctx,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Do an RSA private key operation
|
* \brief Do an RSA private key operation
|
||||||
|
* (Thread-safe if POLARSSL_THREADING_C is enabled)
|
||||||
*
|
*
|
||||||
* \param ctx RSA context
|
* \param ctx RSA context
|
||||||
* \param f_rng RNG function (Needed for blinding)
|
* \param f_rng RNG function (Needed for blinding)
|
||||||
|
@ -241,6 +243,7 @@ int rsa_private( rsa_context *ctx,
|
||||||
* \brief Generic wrapper to perform a PKCS#1 encryption using the
|
* \brief Generic wrapper to perform a PKCS#1 encryption using the
|
||||||
* mode from the context. Add the message padding, then do an
|
* mode from the context. Add the message padding, then do an
|
||||||
* RSA operation.
|
* RSA operation.
|
||||||
|
* (Thread-safe if POLARSSL_THREADING_C is enabled)
|
||||||
*
|
*
|
||||||
* \param ctx RSA context
|
* \param ctx RSA context
|
||||||
* \param f_rng RNG function (Needed for padding and PKCS#1 v2.1 encoding
|
* \param f_rng RNG function (Needed for padding and PKCS#1 v2.1 encoding
|
||||||
|
@ -265,6 +268,7 @@ int rsa_pkcs1_encrypt( rsa_context *ctx,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Perform a PKCS#1 v1.5 encryption (RSAES-PKCS1-v1_5-ENCRYPT)
|
* \brief Perform a PKCS#1 v1.5 encryption (RSAES-PKCS1-v1_5-ENCRYPT)
|
||||||
|
* (Thread-safe if POLARSSL_THREADING_C is enabled)
|
||||||
*
|
*
|
||||||
* \param ctx RSA context
|
* \param ctx RSA context
|
||||||
* \param f_rng RNG function (Needed for padding and RSA_PRIVATE)
|
* \param f_rng RNG function (Needed for padding and RSA_PRIVATE)
|
||||||
|
@ -288,6 +292,7 @@ int rsa_rsaes_pkcs1_v15_encrypt( rsa_context *ctx,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Perform a PKCS#1 v2.1 OAEP encryption (RSAES-OAEP-ENCRYPT)
|
* \brief Perform a PKCS#1 v2.1 OAEP encryption (RSAES-OAEP-ENCRYPT)
|
||||||
|
* (Thread-safe if POLARSSL_THREADING_C is enabled)
|
||||||
*
|
*
|
||||||
* \param ctx RSA context
|
* \param ctx RSA context
|
||||||
* \param f_rng RNG function (Needed for padding and PKCS#1 v2.1 encoding
|
* \param f_rng RNG function (Needed for padding and PKCS#1 v2.1 encoding
|
||||||
|
@ -318,6 +323,7 @@ int rsa_rsaes_oaep_encrypt( rsa_context *ctx,
|
||||||
* \brief Generic wrapper to perform a PKCS#1 decryption using the
|
* \brief Generic wrapper to perform a PKCS#1 decryption using the
|
||||||
* mode from the context. Do an RSA operation, then remove
|
* mode from the context. Do an RSA operation, then remove
|
||||||
* the message padding
|
* the message padding
|
||||||
|
* (Thread-safe if POLARSSL_THREADING_C is enabled)
|
||||||
*
|
*
|
||||||
* \param ctx RSA context
|
* \param ctx RSA context
|
||||||
* \param f_rng RNG function (Only needed for RSA_PRIVATE)
|
* \param f_rng RNG function (Only needed for RSA_PRIVATE)
|
||||||
|
@ -344,6 +350,7 @@ int rsa_pkcs1_decrypt( rsa_context *ctx,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Perform a PKCS#1 v1.5 decryption (RSAES-PKCS1-v1_5-DECRYPT)
|
* \brief Perform a PKCS#1 v1.5 decryption (RSAES-PKCS1-v1_5-DECRYPT)
|
||||||
|
* (Thread-safe if POLARSSL_THREADING_C is enabled)
|
||||||
*
|
*
|
||||||
* \param ctx RSA context
|
* \param ctx RSA context
|
||||||
* \param f_rng RNG function (Only needed for RSA_PRIVATE)
|
* \param f_rng RNG function (Only needed for RSA_PRIVATE)
|
||||||
|
@ -370,6 +377,7 @@ int rsa_rsaes_pkcs1_v15_decrypt( rsa_context *ctx,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Perform a PKCS#1 v2.1 OAEP decryption (RSAES-OAEP-DECRYPT)
|
* \brief Perform a PKCS#1 v2.1 OAEP decryption (RSAES-OAEP-DECRYPT)
|
||||||
|
* (Thread-safe if POLARSSL_THREADING_C is enabled)
|
||||||
*
|
*
|
||||||
* \param ctx RSA context
|
* \param ctx RSA context
|
||||||
* \param f_rng RNG function (Only needed for RSA_PRIVATE)
|
* \param f_rng RNG function (Only needed for RSA_PRIVATE)
|
||||||
|
@ -402,6 +410,7 @@ int rsa_rsaes_oaep_decrypt( rsa_context *ctx,
|
||||||
* \brief Generic wrapper to perform a PKCS#1 signature using the
|
* \brief Generic wrapper to perform a PKCS#1 signature using the
|
||||||
* mode from the context. Do a private RSA operation to sign
|
* mode from the context. Do a private RSA operation to sign
|
||||||
* a message digest
|
* a message digest
|
||||||
|
* (Thread-safe if POLARSSL_THREADING_C is enabled)
|
||||||
*
|
*
|
||||||
* \param ctx RSA context
|
* \param ctx RSA context
|
||||||
* \param f_rng RNG function (Needed for PKCS#1 v2.1 encoding and for
|
* \param f_rng RNG function (Needed for PKCS#1 v2.1 encoding and for
|
||||||
|
@ -460,6 +469,7 @@ int rsa_rsassa_pkcs1_v15_sign( rsa_context *ctx,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Perform a PKCS#1 v2.1 PSS signature (RSASSA-PSS-SIGN)
|
* \brief Perform a PKCS#1 v2.1 PSS signature (RSASSA-PSS-SIGN)
|
||||||
|
* (Thread-safe if POLARSSL_THREADING_C is enabled)
|
||||||
*
|
*
|
||||||
* \param ctx RSA context
|
* \param ctx RSA context
|
||||||
* \param f_rng RNG function (Needed for PKCS#1 v2.1 encoding and for
|
* \param f_rng RNG function (Needed for PKCS#1 v2.1 encoding and for
|
||||||
|
@ -495,6 +505,7 @@ int rsa_rsassa_pss_sign( rsa_context *ctx,
|
||||||
* \brief Generic wrapper to perform a PKCS#1 verification using the
|
* \brief Generic wrapper to perform a PKCS#1 verification using the
|
||||||
* mode from the context. Do a public RSA operation and check
|
* mode from the context. Do a public RSA operation and check
|
||||||
* the message digest
|
* the message digest
|
||||||
|
* (Thread-safe if POLARSSL_THREADING_C is enabled)
|
||||||
*
|
*
|
||||||
* \param ctx points to an RSA public key
|
* \param ctx points to an RSA public key
|
||||||
* \param f_rng RNG function (Only needed for RSA_PRIVATE)
|
* \param f_rng RNG function (Only needed for RSA_PRIVATE)
|
||||||
|
@ -525,6 +536,7 @@ int rsa_pkcs1_verify( rsa_context *ctx,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Perform a PKCS#1 v1.5 verification (RSASSA-PKCS1-v1_5-VERIFY)
|
* \brief Perform a PKCS#1 v1.5 verification (RSASSA-PKCS1-v1_5-VERIFY)
|
||||||
|
* (Thread-safe if POLARSSL_THREADING_C is enabled)
|
||||||
*
|
*
|
||||||
* \param ctx points to an RSA public key
|
* \param ctx points to an RSA public key
|
||||||
* \param f_rng RNG function (Only needed for RSA_PRIVATE)
|
* \param f_rng RNG function (Only needed for RSA_PRIVATE)
|
||||||
|
@ -553,6 +565,7 @@ int rsa_rsassa_pkcs1_v15_verify( rsa_context *ctx,
|
||||||
/**
|
/**
|
||||||
* \brief Perform a PKCS#1 v2.1 PSS verification (RSASSA-PSS-VERIFY)
|
* \brief Perform a PKCS#1 v2.1 PSS verification (RSASSA-PSS-VERIFY)
|
||||||
* (This is the "simple" version.)
|
* (This is the "simple" version.)
|
||||||
|
* (Thread-safe if POLARSSL_THREADING_C is enabled)
|
||||||
*
|
*
|
||||||
* \param ctx points to an RSA public key
|
* \param ctx points to an RSA public key
|
||||||
* \param f_rng RNG function (Only needed for RSA_PRIVATE)
|
* \param f_rng RNG function (Only needed for RSA_PRIVATE)
|
||||||
|
@ -587,6 +600,7 @@ int rsa_rsassa_pss_verify( rsa_context *ctx,
|
||||||
/**
|
/**
|
||||||
* \brief Perform a PKCS#1 v2.1 PSS verification (RSASSA-PSS-VERIFY)
|
* \brief Perform a PKCS#1 v2.1 PSS verification (RSASSA-PSS-VERIFY)
|
||||||
* (This is the version with "full" options.)
|
* (This is the version with "full" options.)
|
||||||
|
* (Thread-safe if POLARSSL_THREADING_C is enabled)
|
||||||
*
|
*
|
||||||
* \param ctx points to an RSA public key
|
* \param ctx points to an RSA public key
|
||||||
* \param f_rng RNG function (Only needed for RSA_PRIVATE)
|
* \param f_rng RNG function (Only needed for RSA_PRIVATE)
|
||||||
|
|
Loading…
Reference in a new issue