summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Pawelczyk <l.pawelczyk@samsung.com>2016-09-13 13:03:16 +0200
committerLukasz Pawelczyk <l.pawelczyk@samsung.com>2016-09-13 13:30:46 +0200
commit0dd2d096bce922d2b7fba3fb7ba08c103e8ca715 (patch)
tree2e1ddbbce442858345fad5d14de3d08a90d5bd60
parentcbd593de08b1b87a0055fc89365a13ce97a1f2d2 (diff)
downloadyaca-0dd2d096bce922d2b7fba3fb7ba08c103e8ca715.tar.gz
yaca-0dd2d096bce922d2b7fba3fb7ba08c103e8ca715.tar.bz2
yaca-0dd2d096bce922d2b7fba3fb7ba08c103e8ca715.zip
Describe padding usage for sign/verify operations
Change-Id: I4efa09f2a57c7fcd5f81124fc57bcbf890b484d4
-rwxr-xr-xapi/yaca/yaca_sign.h11
-rwxr-xr-xapi/yaca/yaca_simple.h3
2 files changed, 13 insertions, 1 deletions
diff --git a/api/yaca/yaca_sign.h b/api/yaca/yaca_sign.h
index 84aae2c..16bcfd1 100755
--- a/api/yaca/yaca_sign.h
+++ b/api/yaca/yaca_sign.h
@@ -44,6 +44,9 @@ extern "C" {
* @remarks For verification use yaca_verify_initialize(), yaca_verify_update() and
* yaca_verify_finalize() functions with matching public key.
*
+ * @remarks For RSA operations the default padding used is #YACA_PADDING_PKCS1. It can be
+ * changed using yaca_context_set_property() with #YACA_PROPERTY_PADDING.
+ *
* @remarks The @a ctx should be released using yaca_context_destroy()
*
* @param[out] ctx Newly created context
@@ -63,6 +66,8 @@ extern "C" {
*
* @see #yaca_key_type_e
* @see #yaca_digest_algorithm_e
+ * @see #yaca_padding_e
+ * @see yaca_context_set_property()
* @see yaca_sign_update()
* @see yaca_sign_finalize()
* @see yaca_verify_initialize()
@@ -202,6 +207,10 @@ int yaca_sign_finalize(yaca_context_h ctx,
*
* @since_tizen 3.0
*
+ * @remarks For RSA operations the default padding used is #YACA_PADDING_PKCS1. It can be
+ * changed using yaca_context_set_property() with #YACA_PROPERTY_PADDING.
+ * For verify to succeed it has to be set to the same value it was signed with.
+ *
* @remarks The @a ctx should be released using yaca_context_destroy()
*
* @param[out] ctx Newly created context
@@ -221,6 +230,8 @@ int yaca_sign_finalize(yaca_context_h ctx,
*
* @see #yaca_key_type_e
* @see #yaca_digest_algorithm_e
+ * @see #yaca_padding_e
+ * @see yaca_context_set_property()
* @see yaca_verify_update()
* @see yaca_verify_finalize()
* @see yaca_context_destroy()
diff --git a/api/yaca/yaca_simple.h b/api/yaca/yaca_simple.h
index a6d00ce..9adb8ca 100755
--- a/api/yaca/yaca_simple.h
+++ b/api/yaca/yaca_simple.h
@@ -25,7 +25,8 @@
* - All operations are single-shot (no streaming possible)
* - Context is not used
* - Only digest, signatures and symmetric ciphers are supported
- * - Disabling PKCS#5 padding for ECB and CBC chaining is not supported
+ * - Disabling PKCS#7 padding for ECB and CBC chaining is not supported
+ * - Changing the default PKCS#1 padding for sign/verify is not supported
* - GCM and CCM chaining is not supported
* - RC2 effective key bits property is not supported
* - All outputs are allocated by the library