All Projects → ecies → go

ecies / go

Licence: MIT license
Elliptic Curve Integrated Encryption Scheme for secp256k1 in Golang

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to go

py
Elliptic Curve Integrated Encryption Scheme for secp256k1 in Python
Stars: ✭ 97 (+73.21%)
Mutual labels:  ecies, secp256k1, elliptic-curve-cryptography
js
Elliptic Curve Integrated Encryption Scheme for secp256k1 in TypeScript
Stars: ✭ 64 (+14.29%)
Mutual labels:  ecies, secp256k1, elliptic-curve-cryptography
noble-secp256k1
Fastest JS implementation of secp256k1. Independently audited, high-security, 0-dependency ECDSA & Schnorr signatures.
Stars: ✭ 313 (+458.93%)
Mutual labels:  secp256k1, elliptic-curve-cryptography
eth.rb
a straightforward library to build, sign, and broadcast ethereum transactions anywhere you can run ruby.
Stars: ✭ 111 (+98.21%)
Mutual labels:  secp256k1
secp256k1-php
PHP bindings for bitcoin-core/secp256k1
Stars: ✭ 55 (-1.79%)
Mutual labels:  secp256k1
ECDSA secp256k1 JordonMatrix nodejs
javascript ecdsa generator, specifically secp256k1 properties, using jordon form matrices
Stars: ✭ 15 (-73.21%)
Mutual labels:  secp256k1
secp256k1-ml
Elliptic curve library secp256k1 wrapper for Ocaml
Stars: ✭ 18 (-67.86%)
Mutual labels:  secp256k1
go-secp256k1
Go wrapper for secp256k1
Stars: ✭ 35 (-37.5%)
Mutual labels:  secp256k1
ChainWallet
一个以研究技术为目地的基础项目,也只有最基本 Bitcoin、Ethereum 、EOS 相关的加密算法。
Stars: ✭ 26 (-53.57%)
Mutual labels:  secp256k1
bp
Bitcoin Protocol components in Common Lisp
Stars: ✭ 28 (-50%)
Mutual labels:  secp256k1
Cryptography.ECDSA
secp256k1 algorythm
Stars: ✭ 34 (-39.29%)
Mutual labels:  secp256k1
BitCrack2
Brute force Bitcoin private keys.
Stars: ✭ 30 (-46.43%)
Mutual labels:  secp256k1
secp256k1.cr
a native library implementing secp256k1 purely for the crystal language.
Stars: ✭ 34 (-39.29%)
Mutual labels:  secp256k1
lds-ecdsa-secp256k1-2019.js
EcdsaSecp256k1Signature2019 JSON-LD Signature Suite
Stars: ✭ 15 (-73.21%)
Mutual labels:  secp256k1
tiny-secp256k1
A tiny secp256k1 native/JS wrapper
Stars: ✭ 41 (-26.79%)
Mutual labels:  secp256k1
hazmat-math
Hazmat ECC arithmetic for Cryptography.io
Stars: ✭ 28 (-50%)
Mutual labels:  secp256k1
leptin
🔗 Leptin is a PoW blockchain completely built in Nodejs.
Stars: ✭ 57 (+1.79%)
Mutual labels:  secp256k1
ethereum-checksum-address
Convert Ethereum address to a checksummed address
Stars: ✭ 20 (-64.29%)
Mutual labels:  secp256k1
oxo-chat-client
基于websocket、json、blockchain的公告、聊天(客户端到客户端加密)客户端。账号无需注册,本地生成!
Stars: ✭ 52 (-7.14%)
Mutual labels:  secp256k1
EllipticCurve
An elliptic curve library written in Swift 4
Stars: ✭ 18 (-67.86%)
Mutual labels:  secp256k1

eciesgo

Go GoDoc Widget Go Report

Elliptic Curve Integrated Encryption Scheme for secp256k1, written in Go with minimal dependencies.

This is the Go version of ecies/py with a built-in class-like secp256k1 API, you may go there for detailed documentation of the mechanism under the hood.

Install

go get github.com/ecies/go/v2

Go 1.13 is required cause fmt.Errorf is used to wrap errors.

⚠️ Please use version 2.0.3 and later. It's much faster and safer.

Quick Start

package main

import (
	ecies "github.com/ecies/go/v2"
	"log"
)

func main() {
	k, err := ecies.GenerateKey()
	if err != nil {
		panic(err)
	}
	log.Println("key pair has been generated")

	ciphertext, err := ecies.Encrypt(k.PublicKey, []byte("THIS IS THE TEST"))
	if err != nil {
		panic(err)
	}
	log.Printf("plaintext encrypted: %v\n", ciphertext)

	plaintext, err := ecies.Decrypt(k, ciphertext)
	if err != nil {
		panic(err)
	}
	log.Printf("ciphertext decrypted: %s\n", string(plaintext))
}

Benchmarks

With CGO:

goos: linux
goarch: amd64
pkg: github.com/ecies/go/v2
cpu: AMD Ryzen 7 5700G with Radeon Graphics         
BenchmarkEncrypt-16        12250             98122 ns/op            5185 B/op         61 allocs/op
BenchmarkDecrypt-16        23934             50046 ns/op            4097 B/op         46 allocs/op

Without CGO:

goos: linux
goarch: amd64
pkg: github.com/ecies/go/v2
cpu: AMD Ryzen 7 5700G with Radeon Graphics         
BenchmarkEncrypt-16        10000            112632 ns/op            5655 B/op         68 allocs/op
BenchmarkDecrypt-16        14038             85641 ns/op            4725 B/op         56 allocs/op
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].