Decryption with the public key in iphone

Posted by vignesh on Stack Overflow See other posts from Stack Overflow or by vignesh
Published on 2010-12-29T07:52:04Z Indexed on 2010/12/29 7:53 UTC
Read the original article Hit count: 192

Filed under:
|

Hi all,

I have a public key and an encrypted string. I could encrypt with publickey successfully.But when i try to decrypt using the publickey it fails. I mean when i pass the publickey seckeyDecrypt it fails.

I have Googled and found out that by default kSecAttrCanDecrypt is false for public keys.So When i import the public key, i have added this particular line ,
[publicKeyAttr setObject:(id)kCFBooleanTrue forKey:(id)kSecAttrCanDecrypt];

But there is no improvement it still fails. Please somebody help.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about rsa