Skip to content

Command-line Diffie-Hellman key exchange utility using Curve25519

License

Notifications You must be signed in to change notification settings

pedroalbanese/X25519

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

X25519 NIST SP800-186

ISC License GitHub downloads GoDoc Go Report Card GitHub go.mod Go version GitHub release (latest by date)

X25519 is an elliptic curve Diffie-Hellman key exchange using Curve25519. It allows two parties to jointly agree on a shared secret using an insecure channel.

            Alice                        Bob
            -----                        ---
       choose private key:        choose private key:
             d_A                         d_B
              |                           |
              v                           v
       compute public key:        compute public key:
  Q_A = d_A * BasePoint_Mont   Q_B = d_B * BasePoint_Mont
              |                           |
              v                           v
           ----- Begin Key Exchange Phase -----
              |                           |
              v                           v
      compute shared secret:     compute shared secret:
  S_A = Montgomery(Q_B * d_A)  S_B = Montgomery(Q_A * d_B)
              |                           |
              v                           v
            ----- End Key Exchange Phase -----
              |                           |
              v                           v
            (S_A)                       (S_B)

Command-line X25519 Diffie-Hellman Tool:

Usage of x25519:
  -key string
        Private key.
  -keygen
        Generate X25519 asymmetric keypair.
  -pub string
        Remote's side Public key.

Examples:

./x25519 -keygen // 2x
./x25519 -key $2ndprivatekey -pub $1stpublickey
./x25519 -key $1stprivatekey -pub $2ndpublickey

License

This project is licensed under the ISC License.

Copyright (c) 2020-2021 Pedro Albanese - ALBANESE Research Lab.

About

Command-line Diffie-Hellman key exchange utility using Curve25519

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages