Skip to content
forked from yevshev/salt

A simple command-line utility written in Go that supports NaCL (salt) box encryption/decryption and secrebox public key crypto

License

Notifications You must be signed in to change notification settings

AGWA-forks/salt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

salt

A simple command-line utility written in Go that supports the box (public key cryptography) and secretbox (secret key cryptography) as described by NaCL and part of the Golang standard library box and secretbox.

Installation

$ go get -u github.com/prologic/salt

Usage

Secret Box (Symetric Crypto)

Encryption:

$ echo 'hello world' | ./salt -k foobar -e
�+TQI?��B�E�LvM��4�)3��C��*C63�ۂ�~=%��'

Decryption:

$ echo 'hello world' | ./salt -k foobar -e > hello.enc
$ ./salt -k foobar -d < hello.enc
hello world

Box (Asymetric Crypto)

Generate Keys:

$ ./salt -g
Private Key: 9B07A5664EDEE31FB1B5F456CA552BC4CD8474345A6185A8B9CB51EC7B0CC65E
Public Key: 96EBFD5C8092D5CBC420990159079F72DAF5B88AE54C25432D027CCB9E7AD85E

$ ./salt -g
Private Key: DA50675E53991113CB271664099E87E0A9251E31189A4B5BA8B55F15674799E7
Public Key: 279E5C728B4F0D851DA4A98E1DCF725834CC6B38B3E00C1A14DFE1B926730835

Encrypt and Sign:

$ ./salt -k 9B07A5664EDEE31FB1B5F456CA552BC4CD8474345A6185A8B9CB51EC7B0CC65E -p 279E5C728B4F0D851DA4A98E1DCF725834CC6B38B3E00C1A14DFE1B926730835 -e > msg.enc
hello world
^D

Decrypt and Verify:

$ ./salt -k DA50675E53991113CB271664099E87E0A9251E31189A4B5BA8B55F15674799E7 -p 96EBFD5C8092D5CBC420990159079F72DAF5B88AE54C25432D027CCB9E7AD85E -d < msg.enc
hello world

License

MIT

About

A simple command-line utility written in Go that supports NaCL (salt) box encryption/decryption and secrebox public key crypto

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 80.9%
  • Shell 12.7%
  • Makefile 6.4%