title: How to create Encryption Key for Encryption Algorithms?
body: <p>I want to use encryption algorithm available in .Net Security namespace, however I am trying to understand how to generate the key, for example AES algorithm needs 256 bits, that 16 bytes key, and some initialization vector, which is also few bytes. </p>
  
  <ol>
  <li><p>Can I use any combination of values in my Key and IV? e.g. all zeros in Key and IV are valid or not? I know the detail of algorithm which does lots of xors, so zero wont serve any good, but are there any restrictions by these algorithms?</p></li>
  <li><p>Or Do I have to generate the key using some program and save it permanently somewhere?</p></li>
  </ol>
  
  <p>I want to store data in database after encryption, the secure profile data like username, password, phone number etc, and the key will be available to database user mentioned in connection string only, and to the administrator.</p>