Problem with private key
Status: Abandoned
Brought to you by:
wadetregaskis
|
From: Denis M. <dm...@ta...> - 2005-11-23 09:52:17
|
Hi, I've tried to use the Keychain Framework (very well done) to encrypt/=20 decrypt data with RSA algorithm. But I need some help. My keychain =20 currently contains my certificate and my private key To encrypt data : I fetch the current Keychain, Identity, I get the =20 public key and I call the method -encryptedDataUsingKey:mode:padding =3D> no problem But to decrypt the data, I want to fetch the private key associated =20 with the identity. Thus I call privateKey on my Identity. It seems to =20= work but when I call with the private key decryptedDataUsingKey:mode:padding: I've got the following exception : 2005-11-23 10:47:52.682 testapp[15965] Unable to decrypt data because =20= of error #2147551505 - CSP invalid key reference - The CSSM_KEY =20 contains a reference that does not indicate a key in the CSP. Here is the desciption of my key : 2005-11-23 10:47:52.635 testapp[15965] Private Key : Format: Integer =20 (e.g. handle) Blob Format: Wrapped Algorithm: 42 Wrap Algorithm: 0 Class: Private key Logical Size: 2048 Attributes: Permanent, Sensitive, Always sensitive, Extractable Usage: Encrypt, Decrypt, Sign, Verify, Sign Recovery, Verify =20 Recovery, Wrap, Unwrap, Derive, Any Start Date: (null) End Date: (null) Wrap Mode: None Can someone help me ? Thanks -- Denis Muquardt t=E9l. +32498970482 TAKTIK - www.taktik.be Avenue du G=E9n=E9ral De Gaulle, 46 |