Topic: RSA 2048 bit signature generation & verification
Hello team, I am trying to use RSA-2048 based Signature generation & Verification using wolfssl on s32k144EVB. So I used wolfssl source files from NXP folder found under design studio installation & built it as static library. I have attached the user_settings.h file for which i'm building the application. I'm getting stack smashing error when generating signature for data. "unsigned char* privKey" is der pkcs1 key 2048bit , "size_t privKeyLen" is the sizeof privKey byte array is 1218 bytes. Also i've attached the test application source file here. Requesting your help with this issue. I am using below wolfssl functions in order.
1.ret = wc_InitRng(&rng);
2.ret = wc_InitRsaKey(&rsaKey, NULL);
3.ret = wc_RsaPrivateKeyDecode(privKey, &idx, &rsaKey, (word32)privKeyLen);
4.ret = wc_Sha256Hash(inData, (word32)inDataLen, hash);
5.int keySize = wc_RsaEncryptSize(&rsaKey);
6.ret = wc_RsaSSL_Sign(
hash,
sizeof(hash),
outSign,
(word32)*inOutSignBufSize,
&rsaKey,
&rng
);