Module: EC
- Defined in:
- lib/elliptic.rb,
lib/elliptic/version.rb
Defined Under Namespace
Classes: Point
Constant Summary collapse
- GROUP =
“cached” / available groups for now include:
{ ## todo/check: is there a more direct way to get a group object? 'secp256k1' => OpenSSL::PKey::EC.new( 'secp256k1' ).group }
- MAJOR =
1- MINOR =
0- PATCH =
0- VERSION =
[MAJOR,MINOR,PATCH].join('.')
Class Method Summary collapse
- .banner ⇒ Object
- .builtin_curves ⇒ Object
- .root ⇒ Object
- .sign(message, priv_key) ⇒ Object
- .verify?(message, signature, pub_key) ⇒ Boolean (also: valid_signature?)
- .version ⇒ Object
Class Method Details
.banner ⇒ Object
15 16 17 |
# File 'lib/elliptic/version.rb', line 15 def self. "elliptic/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}] in (#{root})" end |
.builtin_curves ⇒ Object
88 89 90 |
# File 'lib/elliptic.rb', line 88 def self.builtin_curves OpenSSL::PKey::EC.builtin_curves end |
.root ⇒ Object
19 20 21 |
# File 'lib/elliptic/version.rb', line 19 def self.root File.( File.dirname(File.dirname(File.dirname(__FILE__))) ) end |
.sign(message, priv_key) ⇒ Object
71 72 73 74 |
# File 'lib/elliptic.rb', line 71 def self.sign( , priv_key ) signer = PrivateKey.convert( priv_key ) signer.sign( ) end |
.verify?(message, signature, pub_key) ⇒ Boolean Also known as: valid_signature?
76 77 78 79 |
# File 'lib/elliptic.rb', line 76 def self.verify?( , signature, pub_key ) verifier = PublicKey.convert( pub_key ) verifier.verify?( , signature ) end |
.version ⇒ Object
11 12 13 |
# File 'lib/elliptic/version.rb', line 11 def self.version VERSION end |