Awesome Go

multikey

CategorySecurity
SubcategorySecurity
Stars0

An n-out-of-N keys encryption/decryption framework based on Shamir's Secret Sharing algorithm

About multikey

multikey - Require n-of-N keys to decrypt

Go Report Card GitHub issues Documentation license Mentioned in Awesome Go

Allows for the creation of decryption rules for secrets at rest, for example:

  • Decrypt if any of 5 keys are provided
  • Decrypt if all of 5 keys are provided
  • Decrypt if at least 3 of 5 keys are provided

Example use cases:

  • I want anyone on my team to be able to decrypt shared application runtime secrets with their own key locally, and have my deployments be able to decrypt the same secrets by fetching a decryption key from AWS KMS
  • I want my team to be able to access a highly privileged secret in emergency situations, by having n/N team members provide their key

... many more

Benefits of using this:

  • Allows for managing secrets with complex rules
  • Allows for secrets to be encrypted at rest, which means they can live on your Github, and you don't have to pay for a database or rely on an external service

Usage

import "github.com/adrianosela/multikey"

Encrypt:

mkEncryptedSecret, err := multikey.Encrypt(plainTxtSecret, pubKeys, requireN)
checkErr(err)

Decrypt:

plainTxtSecret, err := multikey.Decrypt(mkEncryptedSecret, privKeys)
checkErr(err)

Frequently Asked Questions

What is multikey?

multikey is a Security library for the Go programming language. An n-out-of-N keys encryption/decryption framework based on Shamir's Secret Sharing algorithm

How do I install multikey?

Install multikey with the Go module system using `go get adrianosela/multikey`. Check the repository for the current installation instructions.

What category does multikey belong to?

multikey is listed under Security, specifically Security.

← Back to Security