0

I'm using CryptoJS on a small project. For a time I used simple encryption methods. By passing a passphrase, and letting crypto-js produce the IV and KEY. This used to work very well. Now i want to use progressive cyphering. To do this i need to explicitly provide IV and KEY. I'm wondering how i can produce theses from a passphrase ?

benzen
  • 6,204
  • 4
  • 25
  • 37

1 Answers1

0

This is exactly the kind of thing PBKDF2 is for (password-based key derivation function).

Jeff M
  • 2,492
  • 3
  • 22
  • 38
  • So the key can not be send in along with the iv and encrypted content. When decrypting the message, i have to generate again the key from the passphrase. And the newly generated key will correctly decrypt the message? Is that correct? For the iv, i suppose that a randomly generated number/string would be ok. – benzen Nov 06 '13 at 20:07