-
Notifications
You must be signed in to change notification settings - Fork 9
X25519 Key Exchange
Philipp Lay edited this page Nov 5, 2017
·
1 revision
libeddsa has two functions for X25519-key-exchange:
void x25519_base(uint8_t out[32],
const uint8_t scalar[32]);
void x25519(uint8_t out[32],
const uint8_t scalar[32],
const uint8_t point[32]);where x25519_base is used to generate the public-component and x25519 the shared-secret.
Given 32 byte random data secA use the following call to generate public component pubA:
x25519_base(pubA, secA);Given the public component pubB and our secret secA we generate the shared-secret ss with:
x25519(ss, secA, pubB);