|
2 | 2 |
|
3 | 3 | 
|
4 | 4 |
|
5 |
| -This repository contains a **single header file C++ library** that provides AES encryption and decryption functionality. The library _**supports**_ both a **pure C++** implementation and optimized implementations that leverage **hardware acceleration technologies**, such as `AES-NI` for `x86-64` architectures and `ARM NEON` for `ARM` architectures. |
| 5 | +This repository contains a **single header file C++** that provides AES encryption and decryption function that _**supports**_ both a **pure C++** implementation and optimized implementations that leverage **hardware acceleration technologies** such as; `AES-NI` for `x86-64` architectures and `ARM NEON` for `ARM` architectures. |
6 | 6 |
|
7 |
| -**Please note** that this library **focuses solely** on the **encryption** and **decryption** of **AES blocks** and _**does not include padding functions or encryption modes**_. You may need to incorporate additional functions or libraries to handle padding and implement specific encryption modes, such as CBC or CTR. |
| 7 | +> [!IMPORTANT] |
| 8 | +> This library **focuses solely** on the **encryption** and **decryption** of **AES blocks** and _**does not include padding functions or block cipher encryption modes**_. |
| 9 | +> |
| 10 | +> You need to code additional functions or incorporate libraries to handle padding and encryption modes such as CBC or CTR. |
| 11 | +> |
| 12 | +> Here is a [CLI program for File Encryption](https://github.com/mrdcvlsc/bethela/blob/main/main.cpp) that uses some of the modules that I wrote ([AES](https://github.com/mrdcvlsc/AES), [BytePadding](https://github.com/mrdcvlsc/BytePadding), [BlockCipherModes](https://github.com/mrdcvlsc/BlockCipherModes)) which can be used as an example. |
8 | 13 |
|
9 | 14 | -----------
|
10 | 15 |
|
@@ -38,7 +43,7 @@ To gain a speed-up performance, add the following flag when compiling for **`aar
|
38 | 43 |
|
39 | 44 | _e.g. modern android devices_.
|
40 | 45 |
|
41 |
| -**Additional Compiler Flag: `-D USE_ARM_NEON_AES -march=armv8-a+crypto`** |
| 46 | +**Additional Compiler Flag: `-D USE_NEON_AES -march=armv8-a+crypto`** |
42 | 47 |
|
43 | 48 | **CMake: `AES_IMPL=neon`**
|
44 | 49 |
|
@@ -110,7 +115,7 @@ if("${AES_IMPL}" STREQUAL "aesni")
|
110 | 115 | target_compile_options(main PRIVATE -maes)
|
111 | 116 | endif()
|
112 | 117 | elseif("${AES_IMPL}" STREQUAL "neon")
|
113 |
| - target_compile_definitions(main PUBLIC USE_ARM_NEON_AES) |
| 118 | + target_compile_definitions(main PUBLIC USE_NEON_AES) |
114 | 119 | target_compile_options(main PRIVATE -march=armv8-a+crypto)
|
115 | 120 | elseif("${AES_IMPL}" STREQUAL "portable")
|
116 | 121 | target_compile_definitions(main PUBLIC USE_CXX_AES)
|
@@ -146,5 +151,5 @@ The value of `<CHOSEN_AES>` could be `aesni`, `neon` or `portable`, .
|
146 | 151 | 3. **comple with [Arm-NEON-AES]**
|
147 | 152 |
|
148 | 153 | ```
|
149 |
| - g++ -o sample.exe sample.cpp -D USE_ARM_NEON_AES -march=armv8-a+crypto -O3 |
| 154 | + g++ -o sample.exe sample.cpp -D USE_NEON_AES -march=armv8-a+crypto -O3 |
150 | 155 | ```
|
0 commit comments