Skip to content

A multiformat-inspired go module for working with multiple kinds of keypairs.

License

Notifications You must be signed in to change notification settings

proofzero-legacy/go-multikeypair

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-multikeypair

Go Reference Go Go Report Card build matrix Slack

A multiformats-inspired module for encoding cryptographic keypairs.

Install

At a shell within your go module:

go get github.com/proofzero/go-multikeypair

Build Instructions

go build

Testing

go test

Usage

Pseudo-golang for excercising the Encode and Decode API for a given hardcoded keypair of a given crypto algorithm:

// Keys:
private := []byte("Wn3Sf5Ke/3:PA:Tm{KCf59Wg6j%/g*#d")
public := []byte("cv-sB6?r*RW8vP5TuMSv_wvw#dV4nUP!@y%u@pmK!P-S2gYVLve!PfdC#kew5Q7U")

// Cypher:
code := multikeypair.ED_25519
name := multikeypair.Codes[ED_25519]

// Encode:
mk, err := multikeypair.Encode(private, public, code)
if err != nil {
    panic(err)
}

// Decode:
kp, err := multikeypair.Decode(mk)
if err != nil {
    panic(err)
}

Documentation is inline with code as comments. See tests in keypair_test.go.

Contribute

We would appreciate your help to make this a useful utility. For code contributions, please send a pull request. First outlining your proposed change in an issue or discussion thread to get feedback from other developers is a good idea for anything but small changes. Other ways to contribute include:

  • making a feature request
  • reporting a bug
  • writing a test
  • adding some documentation
  • providing feedback on the project direction
  • reporting your experience using it

For most things we will use GitHub issues and discussions, but feel free to join the project Matrix room to chat or ask questions.

About

A multiformat-inspired go module for working with multiple kinds of keypairs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages