72件ヒット
[1-72件を表示]
(0.143秒)
種類
- インスタンスメソッド (48)
- クラス (12)
- ライブラリ (12)
ライブラリ
- openssl (60)
クラス
-
OpenSSL
:: Netscape :: SPKI (12) -
OpenSSL
:: PKey :: DSA (12) -
OpenSSL
:: PKey :: RSA (12) -
OpenSSL
:: X509 :: Certificate (12)
検索結果
先頭5件
-
OpenSSL
:: Netscape :: SPKI # to _ text -> String (21101.0) -
SPKI オブジェクトを人間が読める形式の文字列に変換します。
SPKI オブジェクトを人間が読める形式の文字列に変換します。 -
OpenSSL
:: PKey :: DSA # to _ text -> String (21101.0) -
鍵を人間が読める形式に変換します。
鍵を人間が読める形式に変換します。 -
OpenSSL
:: PKey :: RSA # to _ text -> String (21101.0) -
鍵を人間が読める形式に変換します。
鍵を人間が読める形式に変換します。 -
OpenSSL
:: X509 :: Certificate # to _ text -> String (21101.0) -
人間が読める形式の文字列を返します。
人間が読める形式の文字列を返します。 -
OpenSSL
:: PKey :: RSA (6006.0) -
RSA 暗号鍵のクラスです。
...RSA 暗号鍵のクラスです。
通常このクラスで利用するのは、
OpenSSL::PKey::RSA.generate, OpenSSL::PKey::RSA.new,
OpenSSL::PKey::RSA#public?, OpenSSL::PKey::RSA#private?,
OpenSSL::PKey::RSA#public_key, OpenSSL::PKey::RSA#to_text,
OpenSSL::PKey::RSA#to_pem, OpenSSL::PKey::RSA#to_......RSA についてよく理解し、必要な場合のみにすべきです。
例:
require 'openssl'
# initialize random seed
OpenSSL::Random.seed(File.read("/dev/random", 16))
# 鍵対を生成
rsa = OpenSSL::PKey::RSA.generate(2048)
# 秘密鍵をAES256で暗号化して private_key.......pem に PEM 形式で保存
passphrase = "!secret passphrase!"
File.open("private_key.pem", "w") do |f|
f.write(rsa.export(OpenSSL::Cipher.new("aes256"), passphrase))
end
# 公開鍵をpublic_key.pemに保存
public_key = rsa.public_key
File.open("public_key.pem", "w") do |f|
f.... -
openssl (12.0)
-
OpenSSL(https://www.openssl.org/) を Ruby から扱うためのライブラリです。
...対する攻撃法
* 公開鍵暗号と秘密鍵暗号
* 署名の役割、署名の方法とその検証
* 公開鍵基盤(PKI, Public Key Infrastructure)
* X.509 証明書
* 暗号と乱数について
SSLのようなセキュリティ技術は、その利用者に無条件に安全性......ey::RSA.new(1024)
digest = OpenSSL::Digest::SHA1.new()
issu = sub = OpenSSL::X509::Name.new()
sub.add_entry('C', 'JP')
sub.add_entry('ST', 'Shimane')
sub.add_entry('CN', 'Ruby Taro')
cer = OpenSSL::X509::Certificate.new()
cer.not_before = Time.at(0)
cer.not_after = Time.at(0)......serial = 1
cer.issuer = issu
cer.subject = sub
cer.sign(key, digest) # <= 署名するのに使う秘密鍵とハッシュ関数
print cer.to_text
===[a:references] 参考文献
* 5246
* Eric Rescorla. SSL and TLS : Designing and Building Secure Systems.
邦訳, Eric Rescorla 著...