module
Version:
v0.1.3
Opens a new window with list of versions in this module.
Published: Nov 17, 2022
License: AGPL-3.0
Opens a new window with license information.
README
¶
yCrypt
yCrypt is a simple encryption, decryption & signing package for go.
Expect breaking changes until v1.0.0.
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.
- CompressSignAndEncrypt
- 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.
- DecryptVerifyDecompress
- 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.
Directories
¶
Click to show internal directories.
Click to hide internal directories.