OpenSSL
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*OpenSSL [#q47581a6]
-https://www.openssl.org/
-https://github.com/openssl/openssl
-[[SSL]]と[[TLS]]のプロトコルでの通信に使うことができる[[...
-[[HTTPS]]の実装の多くに使われている。
-様々な[[暗号化]]の方式に対応している。
*コマンド [#pa47a35d]
**openssl [#g6b8cd79]
-プロンプトを起動
openssl
-文字列のハッシュ生成
echo -n "MESSAGE" | openssl sha1
echo -n "MESSAGE" | openssl dgst -md5
echo -n "MESSAGE" | openssl dgst -sha256
***[[公開鍵暗号方式]]:[[RSA]] [#e21d448a]
-鍵の生成
--秘密鍵を生成 ※標準出力
openssl genrsa 1024
openssl genrsa 2048
--秘密鍵を生成 ※ファイル出力([[PEM]]形式)
openssl genrsa -out <private-keyfile.pem> 1024
openssl genrsa -out <private-keyfile.pem> 2048
--秘密鍵から公開鍵を生成 ※ファイル出力([[PEM]]形式)
openssl rsa -in <private-keyfile.pem> -pubout -out <publ...
-暗号化・復号
--公開鍵で暗号化
openssl rsautl -encrypt -pubin -inkey <public-keyfile.pe...
--秘密鍵で復号 ※平文が出力される
openssl rsautl -decrypt -inkey <private-keyfile.pem> -in...
-鍵の中身を出力
--秘密鍵
openssl rsa -in <private-keyfile.pem> -text -noout
--公開鍵
openssl rsa -pubin -in <public-keyfile.pem> -text -noout
-鍵の形式を変換して出力([[PEM]]→[[DER]])
--秘密鍵
openssl rsa -in <private-keyfile.pem> -out <private-keyf...
--公開鍵
openssl rsa -pubin -in <public-keyfile.pem> -out <public...
-鍵の形式を変換して出力([[DER]]→[[PEM]])
--秘密鍵
openssl rsa -in <private-keyfile.der> -inform der -out <...
--公開鍵
openssl rsa -pubin -in <public-keyfile.der> -inform der ...
***[[デジタル証明書]]:[[X.509]] [#e9fb46ca]
-鍵の中身を出力
openssl x509 -in <public-keyfile.crt> -text -noout
***ランダムなバイト列を生成 [#c4b783a6]
openssl rand <バイト数>
openssl rand -hex <バイト数>
openssl rand -base64 <バイト数>
openssl rand -out <file-name> <バイト数>
***パスワードのハッシュ化 [#dc127694]
openssl passwd -salt <salt-string> -5 <password> ※SHA-256
openssl passwd -salt <salt-string> -6 <password> ※SHA-512
-出力形式
$ハッシュ方式$ソルトの文字列$ハッシュ値
※/etc/shadow と同じ形式
***ヘルプ [#c58e4b35]
openssl help
openssl help dgst/enc/
openssl <command> -help
openssl list -help
openssl list -commands
openssl list -standard-commands
openssl list -cipher-commands
openssl list -digest-commands
***その他、例 [#h8796b19]
-任意の文字列をSHA-256(バイナリ)に変換後、Base64エンコー...
echo -n "文字列" | openssl dgst -sha256 -binary | base64
*脆弱性 [#n5d47fda]
-HeartBleed
--[[OpenSSL]]のVer.1.0.1のSSLの死活監視機能(heartbeat)の...
--https://www.jnsa.org/secshindan/secshindan_11.html
-[[バージョンロールバック攻撃]]
*参考サイト [#bfe6a704]
-UNIX/Linuxの部屋 opensslコマンドの使い方~
http://x68000.q-e-d.net/~68user/unix/pickup?openssl
-OpenSSLのマニュアルの日本語訳~
http://home.att.ne.jp/theta/diatom/FrontPage.html
-opensslコマンドを使って暗号化したり、復号化したり、オプ...
https://qiita.com/akase244/items/4f8936957c910682d1de
*関連用語 [#c5c313d8]
-[[CFSSL]]
-[[CSR]]
-[[OpenSSH]]
-[[SSL/TLS]]
-[[X.509]]
-[[チェックサム]]
-[[セキュリティ]]
-[[LibreSSL]]
終了行:
*OpenSSL [#q47581a6]
-https://www.openssl.org/
-https://github.com/openssl/openssl
-[[SSL]]と[[TLS]]のプロトコルでの通信に使うことができる[[...
-[[HTTPS]]の実装の多くに使われている。
-様々な[[暗号化]]の方式に対応している。
*コマンド [#pa47a35d]
**openssl [#g6b8cd79]
-プロンプトを起動
openssl
-文字列のハッシュ生成
echo -n "MESSAGE" | openssl sha1
echo -n "MESSAGE" | openssl dgst -md5
echo -n "MESSAGE" | openssl dgst -sha256
***[[公開鍵暗号方式]]:[[RSA]] [#e21d448a]
-鍵の生成
--秘密鍵を生成 ※標準出力
openssl genrsa 1024
openssl genrsa 2048
--秘密鍵を生成 ※ファイル出力([[PEM]]形式)
openssl genrsa -out <private-keyfile.pem> 1024
openssl genrsa -out <private-keyfile.pem> 2048
--秘密鍵から公開鍵を生成 ※ファイル出力([[PEM]]形式)
openssl rsa -in <private-keyfile.pem> -pubout -out <publ...
-暗号化・復号
--公開鍵で暗号化
openssl rsautl -encrypt -pubin -inkey <public-keyfile.pe...
--秘密鍵で復号 ※平文が出力される
openssl rsautl -decrypt -inkey <private-keyfile.pem> -in...
-鍵の中身を出力
--秘密鍵
openssl rsa -in <private-keyfile.pem> -text -noout
--公開鍵
openssl rsa -pubin -in <public-keyfile.pem> -text -noout
-鍵の形式を変換して出力([[PEM]]→[[DER]])
--秘密鍵
openssl rsa -in <private-keyfile.pem> -out <private-keyf...
--公開鍵
openssl rsa -pubin -in <public-keyfile.pem> -out <public...
-鍵の形式を変換して出力([[DER]]→[[PEM]])
--秘密鍵
openssl rsa -in <private-keyfile.der> -inform der -out <...
--公開鍵
openssl rsa -pubin -in <public-keyfile.der> -inform der ...
***[[デジタル証明書]]:[[X.509]] [#e9fb46ca]
-鍵の中身を出力
openssl x509 -in <public-keyfile.crt> -text -noout
***ランダムなバイト列を生成 [#c4b783a6]
openssl rand <バイト数>
openssl rand -hex <バイト数>
openssl rand -base64 <バイト数>
openssl rand -out <file-name> <バイト数>
***パスワードのハッシュ化 [#dc127694]
openssl passwd -salt <salt-string> -5 <password> ※SHA-256
openssl passwd -salt <salt-string> -6 <password> ※SHA-512
-出力形式
$ハッシュ方式$ソルトの文字列$ハッシュ値
※/etc/shadow と同じ形式
***ヘルプ [#c58e4b35]
openssl help
openssl help dgst/enc/
openssl <command> -help
openssl list -help
openssl list -commands
openssl list -standard-commands
openssl list -cipher-commands
openssl list -digest-commands
***その他、例 [#h8796b19]
-任意の文字列をSHA-256(バイナリ)に変換後、Base64エンコー...
echo -n "文字列" | openssl dgst -sha256 -binary | base64
*脆弱性 [#n5d47fda]
-HeartBleed
--[[OpenSSL]]のVer.1.0.1のSSLの死活監視機能(heartbeat)の...
--https://www.jnsa.org/secshindan/secshindan_11.html
-[[バージョンロールバック攻撃]]
*参考サイト [#bfe6a704]
-UNIX/Linuxの部屋 opensslコマンドの使い方~
http://x68000.q-e-d.net/~68user/unix/pickup?openssl
-OpenSSLのマニュアルの日本語訳~
http://home.att.ne.jp/theta/diatom/FrontPage.html
-opensslコマンドを使って暗号化したり、復号化したり、オプ...
https://qiita.com/akase244/items/4f8936957c910682d1de
*関連用語 [#c5c313d8]
-[[CFSSL]]
-[[CSR]]
-[[OpenSSH]]
-[[SSL/TLS]]
-[[X.509]]
-[[チェックサム]]
-[[セキュリティ]]
-[[LibreSSL]]
ページ名: