Class: Ed25519Key

Inherits:
AsymmetricKey show all
Defined in:
lib/crypto/01_ed25519.rb,
lib/crypto/ed25519_key.rb,
lib/crypto/test_ed25519_key.rb

Instance Attribute Summary

Attributes inherited from AsymmetricKey

#public_key, #signature_algorithm

Instance Method Summary collapse

Methods inherited from AsymmetricKey

#account_hash, #get_public_key, #get_public_key_hex, #get_signature_algorithm

Methods included from Utils::HashUtils

account_hash_from_byte_to_hex, byte_hash

Constructor Details

#initialize(public_key, private_key) ⇒ Ed25519Key



9
10
11
# File 'lib/crypto/01_ed25519.rb', line 9

def initialize(public_key, private_key)
  super(public_key, private_key, SignatureAlgorithm[:Ed25519])
end

Instance Method Details

#account_hex(public_key) ⇒ String

Generate the account_hex for the Ed25519 public key



35
36
37
# File 'lib/crypto/test_ed25519_key.rb', line 35

def (public_key)
  '01' + Utils::Base16.encode16(public_key)
end

#create_from_private_key_file(private_key_path) ⇒ Object



20
21
22
# File 'lib/crypto/01_ed25519.rb', line 20

def create_from_private_key_file(path_to_private_key)

end

#export_private_key_in_pemObject



48
49
# File 'lib/crypto/01_ed25519.rb', line 48

def export_private_key_in_pem
end

#export_public_key_in_pemObject



51
52
# File 'lib/crypto/01_ed25519.rb', line 51

def export_public_key_in_pem
end

#load_keypair_from_private_file(private_key_path) ⇒ Object



63
64
# File 'lib/crypto/01_ed25519.rb', line 63

def load_keypair_from_private_file(private_key_path)
end

#parse_key(bytes, from, to) ⇒ Object

private



45
46
# File 'lib/crypto/01_ed25519.rb', line 45

def parse_key(bytes, from, to)
end

#parse_private_key(private_key) ⇒ Object



31
32
# File 'lib/crypto/01_ed25519.rb', line 31

def parse_private_key(bytes)
end

#parse_private_key_file(path) ⇒ Object



25
26
# File 'lib/crypto/01_ed25519.rb', line 25

def parse_private_key_file(path)
end

#parse_public_key(bytes) ⇒ Object



34
35
# File 'lib/crypto/01_ed25519.rb', line 34

def parse_public_key(bytes)
end

#parse_public_key_file(path) ⇒ Object



28
29
# File 'lib/crypto/01_ed25519.rb', line 28

def parse_public_key_file(path)
end

#private_to_public(private_key) ⇒ Object



60
61
# File 'lib/crypto/01_ed25519.rb', line 60

def private_to_public(private_key)
end

#private_to_public_key(private_key) ⇒ Object



37
38
# File 'lib/crypto/ed25519_key.rb', line 37

def private_to_public_key(private_key)
end

#read_base_64_file(path) ⇒ Object

private method



41
42
# File 'lib/crypto/01_ed25519.rb', line 41

def read_base_64_file(path)
end

#read_base_64_with_pem(content) ⇒ Object



37
38
# File 'lib/crypto/01_ed25519.rb', line 37

def read_base_64_with_pem(content)
end

#sign(msg) ⇒ Object



54
55
# File 'lib/crypto/01_ed25519.rb', line 54

def sign(msg)
end

#verify(signature, msg) ⇒ Object



57
58
# File 'lib/crypto/01_ed25519.rb', line 57

def verify(signature, msg)
end