Revert "Add pk_rsa_set_padding() and rsa_set_padding()"
This reverts commit b4fae579e8fd72b5e57864d28b5b2c07bad5ce27.
Conflicts:
library/pk.c
tests/suites/test_suite_pk.data
tests/suites/test_suite_pk.function
diff --git a/include/polarssl/pk.h b/include/polarssl/pk.h
index 8b84471..013d973 100644
--- a/include/polarssl/pk.h
+++ b/include/polarssl/pk.h
@@ -222,31 +222,11 @@
* POLARSSL_ERR_PK_BAD_INPUT_DATA on invalid input,
* POLARSSL_ERR_PK_MALLOC_FAILED on allocation failure.
*
- * \note For RSA contexts, padding defaults to PKCS_V15.
- * Use pk_rsa_set_padding() to change it.
- *
- * \note To create a context holding an RSA-alt key, use
+ * \note For contexts holding an RSA-alt key, use
* \c pk_init_ctx_rsa_alt() instead.
*/
int pk_init_ctx( pk_context *ctx, const pk_info_t *info );
-#if defined(POLARSSL_RSA_C)
-/**
- * \brief Set the padding method for an RSA key
- *
- * Note: Set padding to RSA_PKCS_V21 for the RSAES-OAEP
- * encryption scheme and the RSASSA-PSS signature scheme.
- *
- * \param ctx PK context to be set
- * \param padding RSA_PKCS_V15 or RSA_PKCS_V21
- * \param hash_id RSA_PKCS_V21 hash identifier
- *
- * \note The hash_id parameter is actually ignored
- * when using RSA_PKCS_V15 padding.
- */
-int pk_rsa_set_padding( pk_context *ctx, int padding, int hash_id );
-#endif /* POLARSSL_RSA_C */
-
/**
* \brief Initialize an RSA-alt context
*
diff --git a/include/polarssl/rsa.h b/include/polarssl/rsa.h
index 47315a3..504dde2 100644
--- a/include/polarssl/rsa.h
+++ b/include/polarssl/rsa.h
@@ -125,24 +125,7 @@
*/
void rsa_init( rsa_context *ctx,
int padding,
- int hash_id );
-
-/**
- * \brief Set the padding method on an initilized RSA context.
- *
- * Note: Set padding to RSA_PKCS_V21 for the RSAES-OAEP
- * encryption scheme and the RSASSA-PSS signature scheme.
- *
- * \param ctx RSA context to be set
- * \param padding RSA_PKCS_V15 or RSA_PKCS_V21
- * \param hash_id RSA_PKCS_V21 hash identifier
- *
- * \note The hash_id parameter is actually ignored
- * when using RSA_PKCS_V15 padding.
- */
-void rsa_set_padding( rsa_context *ctx,
- int padding,
- int hash_id );
+ int hash_id);
/**
* \brief Generate an RSA keypair