diff --git a/include/polarssl/rsa.h b/include/polarssl/rsa.h index b1354d196..e80bb4da0 100644 --- a/include/polarssl/rsa.h +++ b/include/polarssl/rsa.h @@ -199,6 +199,7 @@ int rsa_check_pub_priv( const rsa_context *pub, const rsa_context *prv ); /** * \brief Do an RSA public key operation + * (Thread-safe if POLARSSL_THREADING_C is enabled) * * \param ctx RSA context * \param input input buffer @@ -219,6 +220,7 @@ int rsa_public( rsa_context *ctx, /** * \brief Do an RSA private key operation + * (Thread-safe if POLARSSL_THREADING_C is enabled) * * \param ctx RSA context * \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 * mode from the context. Add the message padding, then do an * RSA operation. + * (Thread-safe if POLARSSL_THREADING_C is enabled) * * \param ctx RSA context * \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) + * (Thread-safe if POLARSSL_THREADING_C is enabled) * * \param ctx RSA context * \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) + * (Thread-safe if POLARSSL_THREADING_C is enabled) * * \param ctx RSA context * \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 * mode from the context. Do an RSA operation, then remove * the message padding + * (Thread-safe if POLARSSL_THREADING_C is enabled) * * \param ctx RSA context * \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) + * (Thread-safe if POLARSSL_THREADING_C is enabled) * * \param ctx RSA context * \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) + * (Thread-safe if POLARSSL_THREADING_C is enabled) * * \param ctx RSA context * \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 * mode from the context. Do a private RSA operation to sign * a message digest + * (Thread-safe if POLARSSL_THREADING_C is enabled) * * \param ctx RSA context * \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) + * (Thread-safe if POLARSSL_THREADING_C is enabled) * * \param ctx RSA context * \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 * mode from the context. Do a public RSA operation and check * the message digest + * (Thread-safe if POLARSSL_THREADING_C is enabled) * * \param ctx points to an RSA public key * \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) + * (Thread-safe if POLARSSL_THREADING_C is enabled) * * \param ctx points to an RSA public key * \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) * (This is the "simple" version.) + * (Thread-safe if POLARSSL_THREADING_C is enabled) * * \param ctx points to an RSA public key * \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) * (This is the version with "full" options.) + * (Thread-safe if POLARSSL_THREADING_C is enabled) * * \param ctx points to an RSA public key * \param f_rng RNG function (Only needed for RSA_PRIVATE)