Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Why the IRSA_VerifySig() return SIG_INVALID?
First, I use the API of IHACHCTX to form the Digest of string "hello", use MD5.
Secondly, call IRSA_Encrypt() to from the sign, the type of padding is AEE_RSA_PKCS1TYPE1_PADDING.
Lastly, call IRSA_VerifySig(), the sigType is AEE_RSA_SIG_PKCS1_MD5. However, the result is SIG_INVALID.

If the use the IRSA_Decrypt() to decrypt the sign formed by IRSA_Encrypt(), it is successful.

the code below:

IRSA_Encrypt(pMe->m_pIRsa, pMe->m_pDigest, 16, pMe->m_pSign, &iLenOfSignEncry, AEE_RSA_PKCS1TYPE1_PADDING, &pMe->m_dwResult, &pMe->m_cb);

IRSA_VerifySig(pMe->m_pIRsa, pMe->m_pSign, 64, pMe->m_pDigest, 16, AEE_RSA_SIG_PKCS1_MD5, &pMe->m_dwResult, &pMe->m_cb);

what does the sigType in IRSA_VerifySig mean?
What does it lie on?

what does the sigType in IRSA_VerifySig mean?
What does it lie on?

the device is Sharp Z-800_Ja_SJIS

the device is Sharp Z-800_Ja_SJIS

I am also facing the same problem in 3.1.5.is there any solution for this?
I am using SHA1 hashing algorithm for hashing and hence using AEE_RSA_SIG_PKCS1_SHA1 but I am getting Signature Invalid. But Decrypt is able to decrypt properly. :confused:
here is a code snippet:
IRSA_VerifySig(pMe->pIRSA_public, pMe->encode, pMe->size, pMe->hashKey, 20, AEE_RSA_SIG_PKCS1_SHA1, &pMe->result, &pMe->pcb);

I am also facing the same problem in 3.1.5.is there any solution for this?
I am using SHA1 hashing algorithm for hashing and hence using AEE_RSA_SIG_PKCS1_SHA1 but I am getting Signature Invalid. But Decrypt is able to decrypt properly. :confused:
here is a code snippet:
IRSA_VerifySig(pMe->pIRSA_public, pMe->encode, pMe->size, pMe->hashKey, 20, AEE_RSA_SIG_PKCS1_SHA1, &pMe->result, &pMe->pcb);

Hi,
I am hashing data using IHASH and the hashed data is given as input to IRSA_Encrypt API and and after this I use IRSA_VerifySig to verify signature,but its returning signature invalid.
But if at all I use the same data to encrypt using IRSA_Encrypt with PKCS1 padding and decrypt using IRSA_Decrypt with PKCS1 padding and I am able to get back data,I dont know where the problem is :confused: Does anybody know a solution for this?
Here is a code snippet:
IRSA_VerifySig(pMe->pIRSA_public, pMe->encode, pMe->size, pMe->hashKey, 20, AEE_RSA_SIG_PKCS1_SHA1, &pMe->result, &pMe->pcb);

Hi,
I am hashing data using IHASH and the hashed data is given as input to IRSA_Encrypt API and and after this I use IRSA_VerifySig to verify signature,but its returning signature invalid.
But if at all I use the same data to encrypt using IRSA_Encrypt with PKCS1 padding and decrypt using IRSA_Decrypt with PKCS1 padding and I am able to get back data,I dont know where the problem is :confused: Does anybody know a solution for this?
Here is a code snippet:
IRSA_VerifySig(pMe->pIRSA_public, pMe->encode, pMe->size, pMe->hashKey, 20, AEE_RSA_SIG_PKCS1_SHA1, &pMe->result, &pMe->pcb);

Hi,
I am hashing data using IHASH and the hashed data is given as input to IRSA_Encrypt API and and after this I use IRSA_VerifySig to verify signature,but its returning signature invalid.
But if at all I use the same data to encrypt using IRSA_Encrypt with PKCS1 padding and decrypt using IRSA_Decrypt with PKCS1 padding and I am able to get back data,I dont know where the problem is Does anybody know a solution for this?
Here is a code snippet:
IRSA_VerifySig(pMe->pIRSA_public, pMe->encode, pMe->size, pMe->hashKey, 20, AEE_RSA_SIG_PKCS1_SHA1, &pMe->result, &pMe->pcb);

Hi,
I am hashing data using IHASH and the hashed data is given as input to IRSA_Encrypt API and and after this I use IRSA_VerifySig to verify signature,but its returning signature invalid.
But if at all I use the same data to encrypt using IRSA_Encrypt with PKCS1 padding and decrypt using IRSA_Decrypt with PKCS1 padding and I am able to get back data,I dont know where the problem is Does anybody know a solution for this?
Here is a code snippet:
IRSA_VerifySig(pMe->pIRSA_public, pMe->encode, pMe->size, pMe->hashKey, 20, AEE_RSA_SIG_PKCS1_SHA1, &pMe->result, &pMe->pcb);