opensslのencで利用できるcipher type一覧の取得

日付 2019.03.12
タイトル opensslのencで利用できるcipher type一覧の取得
本文
list-cipher-algorithmsで表示される暗号化アルゴリズムのうち、パスワード指定、-nosaltで利用できるアルゴリズムを取得する。
アルゴリズム名自身を暗号化→復号化してエラーにならないものを列挙。

 openssl list-cipher-algorithms | perl -ne 's/\s+.+//; print lc;' | sort | uniq | perl -ne 'chomp; print "(echo \"${_}\" | openssl enc -${_} -e -pass pass:aaa -nosalt -a | openssl enc -${_} -d -pass pass:aaa -nosalt -a) 2>/dev/null \n";' | sh -

CentOS7での結果
aes128
aes-128-cbc
aes-128-cfb
aes-128-cfb1
aes-128-cfb8
aes-128-ctr
aes-128-ecb
aes-128-ofb
aes192
aes-192-cbc
aes-192-cfb
aes-192-cfb1
aes-192-cfb8
aes-192-ctr
aes-192-ecb
aes-192-ofb
aes256
aes-256-cbc
aes-256-cfb
aes-256-cfb1
aes-256-cfb8
aes-256-ctr
aes-256-ecb
aes-256-ofb
bf
bf-cbc
bf-cfb
bf-ecb
bf-ofb
blowfish
camellia128
camellia-128-cbc
camellia-128-cfb
camellia-128-cfb1
camellia-128-cfb8
camellia-128-ecb
camellia-128-ofb
camellia192
camellia-192-cbc
camellia-192-cfb
camellia-192-cfb1
camellia-192-cfb8
camellia-192-ecb
camellia-192-ofb
camellia256
camellia-256-cbc
camellia-256-cfb
camellia-256-cfb1
camellia-256-cfb8
camellia-256-ecb
camellia-256-ofb
cast
cast5-cbc
cast5-cfb
cast5-ecb
cast5-ofb
cast-cbc
des
des3
des-cbc
des-cfb
des-cfb1
des-cfb8
des-ecb
des-ede
des-ede3
des-ede3-cbc
des-ede3-cfb
dddes-ede3-cfb8
des-ede3-ofb
des-ede-cbc
des-ede-cfb
des-ede-ofb
des-ofb
desx
desx-cbc
idea
idea-cbc
idea-cfb
idea-ecb
idea-ofb
rc2
rc2-40-cbc
rc2-64-cbc
rc2-cbc
rc2-cfb
rc2-ecb
rc2-ofb
rc4
rc4-40
rc5
rc5-cbc
rc5-cfb
rc5-ecb
rc5-ofb
seed
seed-cbc
seed-cfb
seed-ecb
seed-ofb