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>
- Alice generates a new keypair and sends her public key to Bob.
#{ secret := AliceSecretKey, public := AlicePublicKey } = luke:keypair().
- 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).
- Alice computes the shared secret using her own secret key and Bob's public key.
AliceSharedSecret = luke:shareda(AliceSecretKey, BobPublicKey).
- You can now verify that the shared secret is the same.
AliceSharedSecret =:= BobSharedSecret.