Skip to content

r-ichard/goAESEncryptor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go AES Encryptor

This is a POC for go encryption with AES in GCM mode.

use via command line go run gocryptor.go:

  • -f The path to the file you want to encrypt/decrypt
  • -d Decrypt the file
  • -e Encrypt the file
  • -p The key file used to encrypt/decrypt the file (16/24/32 bytes) - Base64 in file expected
  • -i The identification vector(iv/nonce) (should change for every encryption) - Base64 Expected
  • -t The tag - Base64 Expected
  • -a The additional authentication data string

Encrypt

go run gocryptor.go -e -f ./myfile.txt -p ./base64key.key -i jQm0NcAOSkiAVFc9qGpMfA== -a AA_BB_CC_DD_EE

This will give you the tag save it, you will need it below.

Decrypt

go run gocryptor.go -d -f ./myfile.encrypted -p ./base64key.key -i jQm0NcAOSkiAVFc9qGpMfA== -a AA_BB_CC_DD_EE -t Z7s5GCSrSBcIoj+FvFNprw==

Resources

This was my first encryption project so I'll leave below some ressources I used to create this project for legacy.

About

POC of AES GCM encryption for files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages