Module: JOSE::JWA::Curve25519_Ruby

Extended by:
Curve25519_Ruby
Included in:
Curve25519_Ruby
Defined in:
lib/jose/jwa/curve25519_ruby.rb

Instance Method Summary collapse

Instance Method Details

#__ruby__?Boolean


5
# File 'lib/jose/jwa/curve25519_ruby.rb', line 5

def __ruby__?; true; end

#__supported__?Boolean


6
# File 'lib/jose/jwa/curve25519_ruby.rb', line 6

def __supported__?; JOSE.crypto_fallback; end

#ed25519_keypair(secret = nil) ⇒ Object


8
9
10
# File 'lib/jose/jwa/curve25519_ruby.rb', line 8

def ed25519_keypair(secret = nil)
  return JOSE::JWA::Ed25519.keypair(secret)
end

#ed25519_secret_to_public(sk) ⇒ Object


12
13
14
# File 'lib/jose/jwa/curve25519_ruby.rb', line 12

def ed25519_secret_to_public(sk)
  return JOSE::JWA::Ed25519.sk_to_pk(sk)
end

#ed25519_sign(m, sk) ⇒ Object


16
17
18
# File 'lib/jose/jwa/curve25519_ruby.rb', line 16

def ed25519_sign(m, sk)
  return JOSE::JWA::Ed25519.sign(m, sk)
end

#ed25519_verify(sig, m, pk) ⇒ Object


20
21
22
# File 'lib/jose/jwa/curve25519_ruby.rb', line 20

def ed25519_verify(sig, m, pk)
  return JOSE::JWA::Ed25519.verify(sig, m, pk)
end

#ed25519ph_keypair(secret = nil) ⇒ Object


24
25
26
# File 'lib/jose/jwa/curve25519_ruby.rb', line 24

def ed25519ph_keypair(secret = nil)
  return JOSE::JWA::Ed25519.keypair(secret)
end

#ed25519ph_secret_to_public(sk) ⇒ Object


28
29
30
# File 'lib/jose/jwa/curve25519_ruby.rb', line 28

def ed25519ph_secret_to_public(sk)
  return JOSE::JWA::Ed25519.sk_to_pk(sk)
end

#ed25519ph_sign(m, sk) ⇒ Object


32
33
34
# File 'lib/jose/jwa/curve25519_ruby.rb', line 32

def ed25519ph_sign(m, sk)
  return JOSE::JWA::Ed25519.sign_ph(m, sk)
end

#ed25519ph_verify(sig, m, pk) ⇒ Object


36
37
38
# File 'lib/jose/jwa/curve25519_ruby.rb', line 36

def ed25519ph_verify(sig, m, pk)
  return JOSE::JWA::Ed25519.verify_ph(sig, m, pk)
end

#x25519_keypair(secret = nil) ⇒ Object


40
41
42
# File 'lib/jose/jwa/curve25519_ruby.rb', line 40

def x25519_keypair(secret = nil)
  return JOSE::JWA::X25519.keypair(secret)
end

#x25519_secret_to_public(sk) ⇒ Object


44
45
46
# File 'lib/jose/jwa/curve25519_ruby.rb', line 44

def x25519_secret_to_public(sk)
  return JOSE::JWA::X25519.sk_to_pk(sk)
end

#x25519_shared_secret(pk, sk) ⇒ Object


48
49
50
# File 'lib/jose/jwa/curve25519_ruby.rb', line 48

def x25519_shared_secret(pk, sk)
  return JOSE::JWA::X25519.shared_secret(pk, sk)
end