Alan Quatermain

The Tumblog of one Jim Dovey, iOS Software Chief Architect at Kobo in Toronto, Ontario.
He Twitters, he has an , and can occasionally be found on LinkedIn or Facebook.
If you have a query, you can ask it here.

This blog contains personal opinions, and is not endorsed by any company.

1670457184
Hey Jim,thanks for the reply to.
I am just stuck with a one thing:
I am using AES128 algo that comes with CommonCrypto.
And I use AES 256 bytes key.While putting in the keychain, i dont know what attr value to use for kSecAttrKeyType in:
[attributes setObject:<WHICH_CSSM_ALGID_FORAES> forKey:(id)kSecAttrKeyType];
I am not able to figure/find it out from the cssmtype.h either in CSSM_ALGORITHM enum.Later I found it in cssmapple.h(as RijnDael), but how can include this header file? Otherwise it gives compiler error complaining:CSSM_ALGID_AES undeclared.

Let me know.
Thanks,
Saurabh.

AskerAnonymous

The documentation in on the iPhone says this:

kSecAttrKeyType Specifies a dictionary key whose value is a CFNumberRef indicating the algorithm associated with this key (Currently only the value 42 is supported, alternatively you can use kSecAttrKeyTypeRSA).

I’d say that you should just use kSecAttrKeyTypeRSA and feel happy in yourself that you know better. By all means set a tag value or a label on the key which identifies it more distinctly for when you need to look it up again.

1 note

  1. quatermain posted this