Ruby + OpenSSLã§ç½²å Ruby + OpenSSLã§RSAãECDSAç½²åããã«ã¯ãOpenSSLã³ãã³ãã§æ®éã« PKCS#5ã®ç§å¯éµã¨å ¬ééµãæºåãã¦ãããªæãã§ç½²åçæãç½²åæ¤è¨¼ããã°ã¨ãã·ã # ECDSAã®ç½²åçæ prvKey = OpenSSL::PKey::EC.new(File.read(PKCS#5ç§å¯éµPEM)) hashed = OpenSSL::Digest::SHA1.digest(ç½²å対象ã¡ãã»ã¼ã¸) sigVal = prvKey.dsa_sign_asn1(hashed) # ECDSAã®ç½²åæ¤è¨¼ pubKey = OpenSSL::PKey::EC.new(File.read(PKCS#5å ¬ééµPEM)) hashed = OpenSSL::Digest::SHA1.digest(data) isValid = pubKey.dsa_ver
{{#tags}}- {{label}}
{{/tags}}