Skip to content

sat-sat/simple-node-diffie-hellman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

node/crypto Diffie-Hellman

This is a very basic example of how the Diffie-Hellman key exchange works when using node's crypto module.

Workflow:

  • We first create a diffieHellman instance for Alice and generate keys for her.
  • Then we create a diffieHellman instance for Bob using Alice's generator and prime number.
  • Then both Alice and Bob computes their secrets individuall using each other's public keys.
  • We simply assert that the secrets produced by both parties to be equal at the end.

About

Basic example of how the node/crypto Diffie-Hellman key exchange works

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors