-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# 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) | ||
- [RSA](_example/rsa/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// 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. | ||
package crypt |