i looked at the link and that was helpful.
Can you please verify that i understood correctly or not.
Requirement - encrypt password using 168 bit using 3 des and save 56 bit keys on some where on server drive in secure location and save encrypted password in the database.
My understanding :- for 168 bit encryption, i need to generate three keys with 56 bits and do the following for encryption :-
ciphertext = EK3(DK2(EK1(plaintext)))
I.e., DES encrypt with Key 1, DES decrypt with Key 2, then DES encrypt with Key3.
E -encrypt and D - descrypt
Decryption is the reverse:
plaintext = DK1(EK2(DK3(ciphertext)))
I.e., decrypt with K3, encrypt with K2, then decrypt with K1.
and save all those three 56 bit keys in somewhere. Is my understanding is correct ?
I am new to security, It may be a small question, but important for me to clear my understanding.
I am also refering this
http://java.sun.com/j2se/1.5.0/docs/guide/security/jce/JCERefGuide.html
Thanks