asymmetric diffie hellman
Asymmetric key echange
This package was designed as a placeholder for a future quantum-resistant key exchange algorithm once that is proven-secure.
Installation
npm install
Usage
First we'll need to import the package
;
Generating a keypair
Let's generate a key pair for the sender (alice) and the receiver (bob)
const Alice = ;const Bob = ;
Getting the public key to share
const AlicePublic = Alicepubkey;const BobPublic = Bobpubkey;
Generating encryption key seed for transmitting
When transmitting a message from Alice to Bob, Alice will need to include the new key generated in a non-encrypted manner. Using this new key, Bob can generate the same secret as Alice had when encrypting the message.
const AliceTx = Alice; // Include AliceTx.key in the non-encrypted part of your message// Use AliceTx.secret to generate the encryption key for your symmetric encryption algorithm
Generating encryption key seed for receiving
const BobRx = Bob; // Use BobRx.secret to generate the encryption key for your symmetric encryption algorith