RijndaelManaged Key / Vector best practice?

Hello all,

Trying to understand best practices using using Rijnadel encryption.

I have a good old / key vector setup;

 private static byte[] key = { 13, 2, 1, 1, 1, 2 }; private static byte[] vector = { 1, 2, 3, 4, 1, 2, 3 }; private ICryptoTransform encryptor, decryptor; RijndaelManaged rm = new RijndaelManaged(); encryptor = rm.CreateEncryptor(key, vector); decryptor = rm.CreateDecryptor(key, vector); 

Works great, however I’ve read that I should change my seed up every query or two, but its not clear how to do that.

Can anyone point in the right direction as to how I can add additional security to this by – as I say randomizing the seed / salt situation?

Thanks for your help and time!

Edit: and does making my keys and vectors extra long help anything in terms of security? (obviously mine are longer than the sample above) I see it produces a longer encrypted value, but google doesn’t seem to provide me a clear answer what is a happy middle grounds for length of key and vector relative to content and encrypted size.

submitted by /u/winkmichael
[link] [comments]

Leave a Reply