ssl_des/openssl_cases.txt
2019-04-06 21:25:04 +03:00

33 lines
1.1 KiB
Text

// ENCRYPTING
1. "openssl des-ecb -S a"
prompts to enter password, generate key with given pass and salt,
prepend salt header.
2. "openssl des-ecb -pass pass:asd"
generate salt and key, prepend salt header.
3. "openssl des-ecb -S a -pass:asd"
generate key from givent salt and pass, prepend header.
4. "openssl des-ecb -S a -pass:asd -K 1"
encrypt with GIVEN key, prepend GIVEN salt headaer.
5. "openssl des-ecb -K 1"
encrypt with given key, doesn't generate and prepend salt.
6. "openssl des-ecb -S 0 -pass pass:asd -P -pbkdf2"
generate key using PKCS5_PBKDF2_HMAC with 10000 iteration,
8 byte salt, 3 byte key, sha256 hash function, prepend salt header.
// DECRYPTING
7. "echo -n Salted__ | openssl des-ecb -d"
prompts to enter password, generate key but fails to decode.
8. "echo -n Salted__aaaaaaaa | openssl des-ecb -d"
prompts to enter password, generate key but fails to validate padding.
9. openssl doesn't expect "Salted__" header only when -K or -S flag supplied
(or both simultaneously, in this case salt is discarded),
in any other case salt should be readed from message.