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.
Anonymous
The documentation in
kSecAttrKeyTypeSpecifies a dictionary key whose value is aCFNumberRefindicating the algorithm associated with this key (Currently only the value 42 is supported, alternatively you can usekSecAttrKeyTypeRSA).
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.