I'm running the following command that means to decrypt object from type CFDataRef using key object from type SecKeyRef
Unfortunately, on some scenarios it fails and I get the following errors :
or this one :
I'm trying to understand their meaning, the -50 indicate the one or more of the params are invalid. But what about the inner error codes (-23 and -27) and the meaning of their related strings ("error in user parameter list" and "RSAdecrypt wrong input"). Perhaps someone already have encountered those error messages and can tell me their meaning ?
Thanks for the help !
Code Block CFDataRef encryptedCfData = SecKeyCreateDecryptedData(privateKeySecKey, kSecKeyAlgorithmRSAEncryptionOAEPSHA256, (__bridge CFDataRef)[NSData dataWithBytes:payloadBuff length:payloadLen], &cfErr);
Unfortunately, on some scenarios it fails and I get the following errors :
Code Block Error Domain=NSOSStatusErrorDomain Code=-50 "RSAdecrypt wrong input (err -27)" (paramErr: error in user parameter list) UserInfo={NSDescription=RSAdecrypt wrong input (err -27)}
or this one :
Code Block Error Domain=NSOSStatusErrorDomain Code=-50 "rsa_priv_crypt failed, ccerr=-23" (paramErr: error in user parameter list) UserInfo {NSDescription=rsa_priv_crypt failed, ccerr=-23}
I'm trying to understand their meaning, the -50 indicate the one or more of the params are invalid. But what about the inner error codes (-23 and -27) and the meaning of their related strings ("error in user parameter list" and "RSAdecrypt wrong input"). Perhaps someone already have encountered those error messages and can tell me their meaning ?
Thanks for the help !