You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-7Lines changed: 34 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,29 @@
1
1
# AES-Lib
2
2
3
-
This repository contains a C library for the Advanced Encryption Standard (AES) algorithm. It supports key sizes of 128, 192, and 256 bits.
3
+
This repository contains a C library for the Advanced Encryption Standard (AES) algorithm with several operation modes of block ciphers. Supports key sizes of 128, 192, and 256 bits.
4
4
5
5
The primary purpose of this library is educational. The computation has been verified to be correct, but **no security measures have been implemented**. Therefore, it is advised **not to use this library directly for sensitive applications**.
6
6
7
7
## Features
8
8
9
9
- Supports AES-128, AES-192, and AES-256.
10
-
- Programmed according to the NIST-197 standard process. No special tricks are used, keeping the code intuitively readable.
10
+
- Programmed and tested according to the NIST-197 and NIST Special Publication 800-38A standard documents.
11
11
- Includes two implementations: S-Box and lookup-table (T-Table/T-Box). The lookup tables are generated on-the-fly.
12
+
- Operation modes of the block cipher, such as ECB, CBC. Other modes to be implemented later on.
12
13
13
14
## Usage
14
15
15
-
A test case is programmed in "test.c".
16
+
### test.h
17
+
18
+
Test cases with test vectors from NIST documents are programmed in "test.c".
19
+
20
+
### aes.h
16
21
17
22
The encrypting and decrypting functions of the two implementations use the same parameters:
18
23
19
24
```c
20
-
voidSetKey(uint8_t key[], uint8_t size); //Assign cipher key and its size
21
-
void SetLUTMode(void); //Enter LUT cipher mode
25
+
voidSetKey(uint8_t key[], uint8_t size); //Assign cipher key and its size (Must be called before en/decryptions)
26
+
void SetLUTMode(void); //Enter LUT cipher mode (S-Box mode in default when not calling this function)
Modify **the size of key[]** and **Nr** to use different key lengths in AES. This library does not perform any input validation. Please ensure that the input data and key sizes are appropriate for the selected AES variant (128, 192, or 256 bits).
37
+
Assign the **key[]** and its proper **size (byte)** to use different key lengths in AES. This library does not perform any input validation. Please ensure that the input data and key sizes are appropriate for the selected AES variant (128, 192, or 256 bits).
Supports operation modes of block ciphers such as ECB, CBC for binary file I/O. Tested with NIST Special Publication 800-38A example vectors. Other modes will be implemented later on.
0 commit comments