Skip to content

blockchain-abstraction-middleware/decrypter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gpg-secrets-decryption

Overview

GPG Secrets Decryption is used for decrypting sops encrypted configs at run time.

Decrypt a config file using private key defined in $(HOME)/.gnupg

Prerequisites

Ensure you have gpg installed, this will allow you to generate keys to be used for encryption/decryption

gpg --version

Ensure you have sops installed, this will allow you to encrypt the .yaml files

  1. Install from source
  2. Download binary
sops --version

Generate a key to use to encrypt files

gpg --generate-key

Get the fingerprint of the key

gpg --list-keys

Sharing keys

To export keys

gpg --output secring.gpg --armor --export-secret-key <fingerprint>

To import keys

gpg --allow-secret-key-import --import ./secring.gpg

To delete keys

gpg --delete-secret-key <fingerprint>

Runtime

Encryption

Encrypt a file with sops

sops -pgp <fingerprint> -e cmd/decrypt/config/review.yml

Take the output of the command above an paste it into config/review.yml

To Run

To Run:

cd cmd/decrypt && go run main.go

Decryption

Decrypt a file with sops

sops -d cmd/decrypt/config/review.yml

About

PGP decryption tool for configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages