This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to use cryptocell so sign data without a hash

In order to implement the standard RSA-PKCS, raw data must be signed with the private key without performing a hash.

All the CRYS functions wants either a HASH as input or want to comute a HASH inthe sign function.

How can I sign (actually encrypt) data with a private key without using a hash

Parents
  • Instead of using:

        CRYS_RSA_HASH_SHA1_mode = 1,    /*!< The input data will be hashed with SHA1. */

        CRYS_RSA_HASH_SHA224_mode = 2,  /*!< The input data will be hashed with SHA224. */

        CRYS_RSA_HASH_SHA256_mode = 3,  /*!< The input data will be hashed with SHA256. */

        CRYS_RSA_HASH_SHA384_mode = 4,  /*!< The input data will be hashed with SHA384. */

        CRYS_RSA_HASH_SHA512_mode = 5,  /*!< The input data will be hashed with SHA512. */

     

    Try to use:

        CRYS_RSA_After_SHA1_mode = 7,   /*!< The input data is a digest of SHA1 and will not be hashed. */

        CRYS_RSA_After_SHA224_mode = 8, /*!< The input data is a digest of SHA224 and will not be hashed. */

        CRYS_RSA_After_SHA256_mode = 9, /*!< The input data is a digest of SHA256 and will not be hashed. */

        CRYS_RSA_After_SHA384_mode = 10,    /*!< The input data is a digest of SHA384 and will not be hashed. */

        CRYS_RSA_After_SHA512_mode = 11,    /*!< The input data is a digest of SHA512 and will not be hashed. *

  • Good day. Thank you for the response.

    Unfortunately these do not work. The standard RSA-PKCS does not do a hash function before or after the signing.

    The functions you are referring to require the input data to already be the length of the specific hash output and already be in hash format. Variable lengths of data can be expected as input for RSA-PKCS and not in the case of the functions "CRYS_RSA_After_xxx_mode

Reply
  • Good day. Thank you for the response.

    Unfortunately these do not work. The standard RSA-PKCS does not do a hash function before or after the signing.

    The functions you are referring to require the input data to already be the length of the specific hash output and already be in hash format. Variable lengths of data can be expected as input for RSA-PKCS and not in the case of the functions "CRYS_RSA_After_xxx_mode

Children
No Data
Related