Socket
Socket
Sign inDemoInstall

github.com/luke-park/ecdh25519

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/luke-park/ecdh25519


Version published
Created
Source

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.

FAQs

Package last updated on 06 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc