Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pilinux committed Sep 4, 2023
1 parent 7aa5e28 commit f7c72df
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
42 changes: 42 additions & 0 deletions README.md
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)
8 changes: 8 additions & 0 deletions doc.go
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

0 comments on commit f7c72df

Please sign in to comment.