Update README.md
This commit is contained in:
56
README.md
56
README.md
@@ -4,42 +4,66 @@ Advanced Encryption Standard (AES) implementation in C
|
||||
AES is the most widely adopted symmetric encryption standard nowadays. This repository contains an implementation in C of the AES-128 algorithm. The program takes two arguments: a 32-bytes hexadecimal string representing the 128-bit input block, and another 32-bytes hexadecimal string representing the 128-bit key. It then outputs the corresponding ciphertext in hexadecimal form.
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
(Writing in progress)
|
||||
Screenshot taken after building the project with the build.bat file.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
First install Python 3.13.2 or above.
|
||||
Then, make sure you have the following Python packages installed: `requests`, `pynput`.
|
||||
|
||||
You can install these packages with:
|
||||
First make sure you have installed the GCC compiler v8.1.0 or above.
|
||||
The `gcc --version` command should output:
|
||||
```
|
||||
pip install requests pynput
|
||||
gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
|
||||
Copyright (C) 2018 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
```
|
||||
|
||||
Then, clone this repository and edit `keylogger.pyw` to add your own custom webhook URL at line 40.
|
||||
|
||||
---
|
||||
Double-click on `keylogger.pyw`. You will not see anything as the program starts in background. You can check if the program has successfully started with the following command:
|
||||
Then, clone this repository in any location on your computer and double-click on `build.bat`.
|
||||
You should now see the program's output.
|
||||
|
||||
|
||||
Usage and test vectors
|
||||
----------------------
|
||||
|
||||
The program takes two arguments: a 32-bytes hexadecimal string representing the 128-bit input block, and another 32-bytes hexadecimal string representing the 128-bit key. It then outputs the corresponding ciphertext in hexadecimal form. You can find some test vectors on the official NIST website [on this page](https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/block-ciphers).
|
||||
|
||||
For example, with the following sample data set:
|
||||
```
|
||||
tasklist | findstr /I "python"
|
||||
KEY = 00000000000000000000000000000000
|
||||
PLAINTEXT = 6a84867cd77e12ad07ea1be895c53fa3
|
||||
```
|
||||
|
||||
The program should output:
|
||||
```
|
||||
CIPHERTEXT: 732281c0a0aab8f7a54a0c67a0c45ecf
|
||||
```
|
||||
|
||||
To check this output, build the project and then execute this command:
|
||||
```
|
||||
main.exe 6a84867cd77e12ad07ea1be895c53fa3 00000000000000000000000000000000
|
||||
```
|
||||
|
||||
You should now see the ciphertext `732281c0a0aab8f7a54a0c67a0c45ecf`.
|
||||
|
||||
|
||||
Future work
|
||||
-----------
|
||||
|
||||
A few ideas to improve this project:
|
||||
- Add mouse's position capture and send this data to the server.
|
||||
- Automatically take a screenshot of the whole screen and send it to the server.
|
||||
- Get some system information with `os.system('systeminfo')` and send them to the server.
|
||||
- Automatically start the keylogger at computer start (thus not self-destroying it).
|
||||
- Add decryption part.
|
||||
- Test the implementation in ECB or CBC block cipher modes.
|
||||
- Rewrite the key expansion function in a cleaner way.
|
||||
- Add features for file encryption.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
This work is shared under the [MIT license](LICENSE).
|
||||
Do not use this program without appropriate permissions.
|
||||
|
||||
The AES S-Box initialization function has not been written by me and have been taken from:
|
||||
https://en.wikipedia.org/wiki/Rijndael_S-box (Accessed on March 21, 2025)
|
||||
Original licence: CC BY-SA 4.0
|
||||
|
||||
Reference in New Issue
Block a user