Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
red-sayed authored Dec 18, 2021
1 parent 5652634 commit 13704ec
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@

## What is it?

This is a small and portable C++17 implementation of the Red Encryption Standard(RES). At this repository you also can find 'Res-crypt' terminal application which helps you to encrypt/decrypt strings.
RES is upgraded version of Advanced Encryption Standard(AES) and is a part of [RedLibrary](https://github.com/Red-company/RedLibrary).
This is a small and portable _C++17_ implementation of the _Red Encryption Standard(RES)_. At this repository you also can find _'Res-crypt'_ terminal application which helps you to _encrypt/decrypt_ strings.
_RES_ is upgraded version of _Advanced Encryption Standard(AES)_ and is a part of [_RedLibrary_](https://github.com/Red-company/RedLibrary).

## Where to use?

RES has excess level of encryption, and should be used in specific tasks, where you need absolute encryption and ready to sacrifice your perfomance. If you need perfomance, we advise you to use AES([Aes implementation](https://github.com/vladimirrogozin/AES_Implementation)).
_RES_ has excess level of encryption, and should be used in specific tasks, where you need absolute encryption and ready to sacrifice your perfomance. If you need perfomance, we advise you to use _AES_([_Aes implementation_](https://github.com/vladimirrogozin/AES_Implementation)).

## What does RES consist of?
RES includes 2 encryption modes: [ECB](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_Codebook_.28ECB.29) and [CBC](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29) with 3 key length cases for each of them:
_RES_ includes 2 encryption modes: [_ECB_](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_Codebook_.28ECB.29) and [_CBC_](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29) with 3 key length cases for each of them:

* ECB
* ResECB 512 bits key
* ResECB 1024 bits key
* ResECB 1536 bits key
* _ECB_
* _ResECB 512 bits key_
* _ResECB 1024 bits key_
* _ResECB 1536 bits key_

* CBC
* ResCBC 512 bits key
* ResCBC 1024 bits key
* ResCBC 1536 bits key
* _CBC_
* _ResCBC 512 bits key_
* _ResCBC 1024 bits key_
* _ResCBC 1536 bits key_

## How to use it?

Expand Down Expand Up @@ -57,18 +57,18 @@ const std::string DecryptResCBC1536(const std::string& in, const std::string_vie
```
**Tech notes:**
* Padding is provided only for "in" params. "Iv" should equals 16 bytes. Key length(in bytes) is calculated using the formula: `KEY_LENGTH / 8`.
* ECB mode is considered unsafe for most uses and is not implemented in streaming mode. See [wikipedia's article on ECB](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_Codebook_(ECB)) for more details.
* Padding is provided only for _"in"_ params. _"Iv"_ should equals 16 bytes. Key length(in bytes) is calculated using the formula: _`KEY_LENGTH / 8`_.
* _ECB_ mode is considered unsafe for most uses and is not implemented in streaming mode. See [_wikipedia's article on ECB_](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_Codebook_(ECB)) for more details.
* This library is designed for small code size and simplicity, intended for cases where small binary size, low memory footprint and portability is more important than high performance.
**Notes:**
* If you want to route result of encryption to `std::cout`, you should convert string to hexadecimal system, in other way you will get bad output!
* If you want to route result of encryption to _`std::cout`_, you should convert string to hexadecimal system, in other way you will get bad output!
* **Convertion functions are included in each of examples.**
* There is no built-in error checking or protection from out-of-bounds memory access errors as a result of malicious input.
## Screenshots? Here they are:
Here's an example of encryption in CBC1536 mode:
Here's an example of encryption in _CBC1536_ mode:
![plot](./Screenshots/Res-crypt_cbc1536_encryption.png)
Expand Down

0 comments on commit 13704ec

Please sign in to comment.