Skip to content

ahf/luke

develop
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
doc
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Luke

Version: 1.3.0 (New Hope: 20160815)

Authors: Alexander Færøy (ahf@0x90.dk).

Luke is an Erlang NIF for the post-quantum key exchange: A New Hope.

For more information about A New Hope, including the paper itself, see github.com/tpoeppelmann/newhope and cryptojedi.org.

Luke also ships with optional support for the Tor implementation of A New Hope. Use the luke_tor module instead of luke if you have a need for that.

Example Usage

  1. Alice generates a new keypair and sends her public key to Bob.
#{ secret := AliceSecretKey, public := AlicePublicKey } = luke:keypair().
  1. Bob uses Alice's public key to compute the shared secret and a public key that he then sends back to Alice.
#{ shared := BobSharedSecret, public := BobPublicKey } = luke:sharedb(AlicePublicKey).
  1. Alice computes the shared secret using her own secret key and Bob's public key.
AliceSharedSecret = luke:shareda(AliceSecretKey, BobPublicKey).
  1. You can now verify that the shared secret is the same.
AliceSharedSecret =:= BobSharedSecret.

Modules

luke
luke_tor