ssl_des/t/openssl_cases.txt

38 lines
1.2 KiB
Text
Raw Normal View History

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