This repository contains examples of how to use various Go libraries to perform cryptographic operations safely and with purpose.
The primary purposes of cryptography are:
- Confidentiality
- Integrity
- Non-repudiation
- Authentication
The examples in this repository depend on the https://godoc.org/golang.org/x/crypto packages.
To build the examples, run make
Examples are built into the ./bin directory
Symmetric examples: encrypt & decrypt
Asymmetric examples: pkencrypt & pkdecrypt
Run either encrypt or pkencrypt with the appropriate arguments and the final output should show the command required to decrypt.
Hash example: hash
Run hash with the same input argument and you should get the same output argument every time.
Asymmetric example: pksign & pkverify
Run pksign with the appropriate arguments and the final output should show the command required to verify.
Asymmetric examples: pksign & pkverify
Run pksign with the appropriate arguments and the final output should show the command required to verify.
Symmetric example: auth & verify
Run auth with the appropriate arguments and the final output should show the command required to verify.