Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ureeves/lamport
A Go package implementing Lamport signatures
https://github.com/ureeves/lamport
Last synced: 4 days ago
JSON representation
A Go package implementing Lamport signatures
- Host: GitHub
- URL: https://github.com/ureeves/lamport
- Owner: ureeves
- License: mit
- Created: 2019-05-06T21:27:10.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-06T22:56:42.000Z (over 5 years ago)
- Last Synced: 2024-06-20T15:45:58.808Z (5 months ago)
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Lamport
## A Go package implementing Lamport signatures
[![Build Status](https://travis-ci.org/ureeves/lamport.svg?branch=master)](https://travis-ci.org/ureeves/lamport)
[![codecov](https://codecov.io/gh/ureeves/lamport/branch/master/graph/badge.svg)](https://codecov.io/gh/ureeves/lamport)
[![GoDoc](https://godoc.org/github.com/ureeves/lamport?status.svg)](https://godoc.org/github.com/ureeves/lamport)Lamport signatures are a one-time signature scheme. Each key is intended to be used only once.
### Usage
Generate key
``` Go
k, err := lamport.GenerateKey(rand.Reader, crypto.SHA256)
```Sign message
``` Go
message := []byte("Hello, Lamport!")
messageHash := sha256.Sum256(message)sig, _ := lamport.Sign(k, messageHash[:])
```Verify signature
``` Go
if lamport.Verify(&k.PublicKey, messageHash[:], sig); err != nil {
// signature invalid here
}
```### Testing & Benchmarking
To test on your machine use:
``` Bash
go test
```If you want to run the benchmarks:
``` Bash
go test -bench=.
```### Documentation
Documentation can be found [here](https://godoc.org/github.com/ureeves/lamport).