https://github.com/pilinux/crypt
Encryption and decryption using various cryptographic algorithms following industry standards
https://github.com/pilinux/crypt
aes aes-gcm chacha20-poly1305 cipher cryptography rsa
Last synced: 5 months ago
JSON representation
Encryption and decryption using various cryptographic algorithms following industry standards
- Host: GitHub
- URL: https://github.com/pilinux/crypt
- Owner: pilinux
- License: mit
- Created: 2023-08-16T06:48:41.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-09T00:47:11.000Z (5 months ago)
- Last Synced: 2025-05-11T12:54:28.783Z (5 months ago)
- Topics: aes, aes-gcm, chacha20-poly1305, cipher, cryptography, rsa
- Language: Go
- Homepage:
- Size: 88.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# crypt
Package crypt provides functions for encrypting and decrypting data
using various cryptographic algorithms, including RSA and AES.This package is designed to simplify the process of securely encrypting
and decrypting data following industry standards. It includes functions
for key generation, encryption, and decryption using well-established
cryptographic primitives.## Usage
- [AES](_example/aes/main.go)
- [ChaCha20-Poly1305 AEAD](_example/chacha20poly1305/main.go)
- [XChaCha20-Poly1305 AEAD](_example/xchacha20poly1305/main.go)
- [RSA](_example/rsa/main.go)
- [Hashing](_example/hashing/main.go)## Generate RSA Keys
### 256-byte
```bash
openssl genpkey -algorithm RSA -out private-key.pem -pkeyopt rsa_keygen_bits:2048
openssl rsa -in private-key.pem -pubout -out public-key.pem
```### 384-byte
```bash
openssl genpkey -algorithm RSA -out private-key.pem -pkeyopt rsa_keygen_bits:3072
openssl rsa -in private-key.pem -pubout -out public-key.pem
```### 512-byte
```bash
openssl genpkey -algorithm RSA -out private-key.pem -pkeyopt rsa_keygen_bits:4096
openssl rsa -in private-key.pem -pubout -out public-key.pem
```## LICENSE
[license](LICENSE)