key_source parameter in create symmetric key

Hi Laurentiu

I was reading a blog entry of yours http://blogs.msdn.com/lcris/archive/2005/10/14/481434.aspx and in the section "How to prevent a symmetric key loss", you mentioned key_source.

I am trying to understand how this is used because when you open a symmetric key, the only options for decrypting the key are password, symmetric key, asymmetric key and certificate.

Thanks




Answer this question

key_source parameter in create symmetric key

  • ShaneMelbourneAus

    Thanks Laurentiu. I just posted a follow-up reply in your blog.



  • David Yeo

    I just noticed comments were disabled for my older blog posts. I meant to have comments always allowed but it looks like I didn't set this properly. It should work now, so if you have additional questions, you can reply directly to those posts.

    Basically, KEY_SOURCE allows you to provide data that will be used to generate the key. The KEY_SOURCE phrase is as important as the key itself, so you should keep that as secret as the key itself. To recreate the same key you actually need to use the same values for three parameters: algorithm, KEY_SOURCE, IDENTITY_VALUE. Algorithm should be obvious, the KEY_SOURCE is so the key is the same, and the IDENTITY_VALUE is for having the same GUID for the key (remember the key_guid you pass to EncryptByKey ).

    Thanks
    Laurentiu



  • key_source parameter in create symmetric key