*
* SOURCE
*/
-typedef struct {
+typedef struct SilcPublicKeyStruct {
const SilcPKCSObject *pkcs; /* PKCS */
void *public_key; /* PKCS specific public key */
} *SilcPublicKey;
*
* SOURCE
*/
-typedef struct {
+typedef struct SilcPrivateKeyStruct {
const SilcPKCSObject *pkcs; /* PKCS */
void *private_key; /* PKCS specific private key */
} *SilcPrivateKey;
unsigned char *signature,
SilcUInt32 signature_size,
SilcUInt32 *ret_signature_len,
+ SilcBool compute_hash,
SilcHash hash);
SilcBool (*verify)(void *public_key,
unsigned char *signature,
unsigned char *signature,
SilcUInt32 signature_size,
SilcUInt32 *ret_signature_len,
+ SilcBool compute_hash,
SilcHash hash);
SilcBool (*verify)(void *public_key,
unsigned char *signature,
* SilcBool silc_pkcs_sign(SilcPrivateKey private_key,
* unsigned char *src, SilcUInt32 src_len,
* unsigned char *dst, SilcUInt32 dst_size,
- * SilcUInt32 *dst_len, SilcHash hash);
+ * SilcUInt32 *dst_len, SilcBool compute_hash,
+ * SilcHash hash);
*
* DESCRIPTION
*
* Generates signature with the private key. Returns FALSE on error.
- * If `hash' is non-NULL the `src' will be hashed before signing.
+ * If `compute_hash' is TRUE the `hash' will be used to compute a
+ * digest over the `src'. The `hash' must always be valid.
*
***/
SilcBool silc_pkcs_sign(SilcPrivateKey private_key,
unsigned char *src, SilcUInt32 src_len,
unsigned char *dst, SilcUInt32 dst_size,
- SilcUInt32 *dst_len, SilcHash hash);
+ SilcUInt32 *dst_len, SilcBool compute_hash,
+ SilcHash hash);
/****f* silccrypt/SilcPKCSAPI/silc_pkcs_verify
*