Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dayanfreitas/rsa
Simple implementation of the RSA algorithm
https://github.com/dayanfreitas/rsa
coverage decoding docker docker-compose rsa-algorithm ruby testunit
Last synced: about 1 month ago
JSON representation
Simple implementation of the RSA algorithm
- Host: GitHub
- URL: https://github.com/dayanfreitas/rsa
- Owner: Dayanfreitas
- Created: 2022-06-19T23:15:27.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-07-13T00:35:55.000Z (over 2 years ago)
- Last Synced: 2024-11-20T13:11:45.331Z (about 2 months ago)
- Topics: coverage, decoding, docker, docker-compose, rsa-algorithm, ruby, testunit
- Language: Ruby
- Homepage:
- Size: 51.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![example workflow](https://github.com/Dayanfreitas/RSA/actions/workflows/main.yml/badge.svg)
# RSA
Simple implementation gem of the RSA algorithm. Just academic reasons.## Key generation private and public
```bash
# key generation
RSA.generated
```
## Encode
```bash
# encode
RSA.encode('oi')
```
## Decode
```bash
# decode
RSA.decode(RSA.encode('oi'))
```## User keys open
```ruby
## For encoding
RSA::OPEN::Public.n=
RSA::OPEN::Public.e=
RSA.encode('oi')## For decoding
RSA::OPEN::Private.n =
RSA::OPEN::Private.d =
RSA.decode(RSA.encode('oi'))
```## Examples of implementation
Example folder. Intended for example using this gem* Simple
Simplest way would be through ```RSA.generated```. That way you will have the keys created in the ```keys``` folder and you can use* Open keys
You can use open keys, for those not generated through ```RSA.generated``` that way you can set externally.
# Development
## init
make up## run teste
ruby test/all_test.rb***
# To learn more about:
* [🔒 RSA implementation algorithm [PT-BR🇧🇷]](https://github.com/Dayanfreitas/RSA/blob/master/doc/rsa_algorithm_pt_br.md)