From f7c72df72f3ee3e20f70dde6053032dccb3bccf7 Mon Sep 17 00:00:00 2001 From: pilinux Date: Mon, 4 Sep 2023 11:15:25 +0200 Subject: [PATCH] docs --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ doc.go | 8 ++++++++ 2 files changed, 50 insertions(+) create mode 100644 README.md create mode 100644 doc.go diff --git a/README.md b/README.md new file mode 100644 index 0000000..8db3913 --- /dev/null +++ b/README.md @@ -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) diff --git a/doc.go b/doc.go new file mode 100644 index 0000000..3221583 --- /dev/null +++ b/doc.go @@ -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