Skip to content

luke-park/ecdh25519

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoDoc

ecdh25519

A simple to use implementation of ECDH with curve25519 for Go. The core mathematics of this algorithm are already present in golang.org/x/crypto/curve25519, this library just implements the algorithm in such a way that knowledge of the underlying mathematics is not necessary.

Example

The below example does not include proper error handling.

package main

import (
    "github.com/luke-park/ecdh25519"
)

func main() {
    prv1, _ := ecdh25519.GenerateKey()
    prv2, _ := ecdh25519.GenerateKey()

    s1 := prv1.ComputeSecret(prv2.Public())
    s2 := prv2.ComputeSecret(prv1.Public())
    // bytes.Compare(s1, s2) == 0
}

Documentation

The full documentation of this package can be found on GoDoc.

About

A simple to use implementation of ECDH with curve25519 for Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published