Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brandonki/rsa-c
RSA encryption implementation in C (WIP)
https://github.com/brandonki/rsa-c
Last synced: 12 days ago
JSON representation
RSA encryption implementation in C (WIP)
- Host: GitHub
- URL: https://github.com/brandonki/rsa-c
- Owner: BrandonKi
- License: mit
- Created: 2021-03-01T17:17:53.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-02T03:01:23.000Z (almost 4 years ago)
- Last Synced: 2024-11-10T22:19:35.795Z (2 months ago)
- Language: C
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# __RSA encryption implementation in C (WIP)__
At the moment each character is encrypted/decrypted individually and small keys are used.
This means that the output is in a predictable format and can be reversed given enough time and resources.
This is meant to be a lightweight and fast way to encrypt data. It should not be used where security is extremely important.rsa.h can be used as a header only library. rsa.c is just a sample.
rsa.c usage: rsa [e public key] | [d private key] | [g] | [s sizeof_stdin_buffer]
## __example usage:__
### __generate the keys with the `g` option__
```./rsa g```
### __enter the text to be encryped through stdin and use the `e`__
```echo "text" | ./rsa e 3233 17```
### __enter the encryped text through stdin to be decrypted and use the `d`__
```echo "884 1313 1542 884" | ./rsa d 3233 413```
### __the `s` option can be used to specify the max size of the input to avoid overflow or wasted space__
@NOTE make sure there are at least 2 extra bytes given to the size option```echo "test" | ./rsa e 3233 413 s 10```
### TODO
- put two characters into each encrypted "block"
- output raw binary data instead of outputting the value as an integer