Home

Awesome

Luke

Version: 1.2.0

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.

<a name="Example_Usage">Example Usage</a>

  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

<table width="100%" border="0" summary="list of modules"> <tr><td><a href="https://lab.baconsvin.org/ahf/luke/blob/master/doc/luke.md" class="module">luke</a></td></tr></table>