Document thread-safety of the RSA functions
diff --git a/include/polarssl/rsa.h b/include/polarssl/rsa.h
index b1354d1..e80bb4d 100644
--- a/include/polarssl/rsa.h
+++ b/include/polarssl/rsa.h
@@ -199,6 +199,7 @@
/**
* \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 @@
/**
* \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 @@
* \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 @@
/**
* \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 @@
/**
* \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 @@
* \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 @@
/**
* \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 @@
/**
* \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 @@
* \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 @@
/**
* \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 @@
* \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 @@
/**
* \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 @@
/**
* \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 @@
/**
* \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)