module
Version:
v1.3.3
Opens a new window with list of versions in this module.
Published: Mar 22, 2023
License: AGPL-3.0
Opens a new window with license information.
README
¶
yCrypt
yCrypt is a simple encryption, decryption & signing package for go.
Contributing
Make sure to install the pre-push hooks.
$ git config core.hooksPath .githooks
Usage
- Sign
- This function signs a message by calculating an SHA256 hash of the message and signing it using RSA PKCS1v15.
- Verify
- This function verifies a message by calculating an SHA256 hash of the message and verifying it using RSA PKCS1v15.
- SignCompressEncrypt
- Signing of the plaintext using the
Sign
function.
- Compress the plaintext using zstd.
- Generation of a random symmetric key.
- Encryption of the plaintext using the symmetric key, using XChaCha20Poly1305.
- Encryption of the symmetric key using the public key, using RSA PKCS1v15.
- DecryptDecompressVerify
- Decryption of the symmetric key using the private key, using RSA PKCS1v15.
- Decryption of the ciphertext using the symmetric key, using XChaCha20Poly1305.
- Decompression of the plaintext using zstd.
- Verification of the plaintext using the
Verify
function.
Notes
PKCS1v15 will be replaced with OAEP in the future. (This will be a breaking change (and therefore a major version bump)).
Directories
¶
Click to show internal directories.
Click to hide internal directories.