Erlang NIF for the post-quantum key exchange: A New Hope.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
c_src
deps
doc
src
test
.gitignore
.gitlab-ci.yml
Makefile
README.md
rebar.config
rebar.lock

README.md

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