Skip to content

Commit

Permalink
Remove obsolete references to the input/output/key length in the docu…
Browse files Browse the repository at this point in the history
…mentation.
  • Loading branch information
prouff committed May 22, 2019
1 parent b719134 commit 39af47f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
7 changes: 3 additions & 4 deletions README.md
Expand Up @@ -25,9 +25,8 @@ To ease the use of the library, the AES-128 primitive can be executed by calling
where:

- `key` is the 16-byte AES-128 master key,
- `key_size` is the key byte-length (always 16 for this version),
- `input` is an `input_size`-byte array referring either to the plaintext to encrypt (in encryption mode) or to the ciphertext to decrypt (in decryption mode),
- `output` is an `output_size`-byte array in which the result will be saved,
- `input` is a `16`-byte array referring either to the plaintext to encrypt (in encryption mode) or to the ciphertext to decrypt (in decryption mode),
- `output` is a `16`-byte array in which the result will be saved,
- `MODE` is an unsigned char describing the mode in which the AES-128 primitive has to be executed. It can be a combination of the following options:
- `MODE_KEYINIT`,
- `MODE_AESINIT_ENC`,
Expand Down Expand Up @@ -55,7 +54,7 @@ STRUCT_AES aes_struct;
UCHAR key[16] = {0x2b,0x7e, 0x15, 0x16 ,0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c};
UCHAR in[16] = {0x32,0x43, 0xf6, 0xa8, 0x88, 0x5a, 0x30 , 0x8d, 0x31, 0x31, 0x98, 0xa2, 0xe0, 0x37, 0x07, 0x34};
Mode = MODE_KEYINIT|MODE_AESINIT_ENC|MODE_ENC;
ret = aes(Mode, &aes_struct, key, 16, in, 16, out, 16);
ret = aes(Mode, &aes_struct, key, in, out);
```

## Project compilation and tests
Expand Down
8 changes: 2 additions & 6 deletions src/aes/aes.c
Expand Up @@ -22,11 +22,9 @@
* \param Mode The mode is the command the user wants to execute.
* \param struct_aes The struct_aes is a strcuture that contains the AES context
* \param key The key is required when MODE_KEYINIT operation in part of the MODE command.
* \param key_size The key_size is the size in bytes of the key.
* \param input The input is required when MODE_ENC or MODE_DEC operation is part of the MODE command.
* \param input_size The input_size is the size in bytes of the input.
* \param output The output is required when MODE_ENC or MODE_DEC operation is part of the MODE command.
* \param output_size The output_size is the size in bytes of the output.
* \param random_aes An array of random values is required
* \return Error Error code: NO_ERROR if succeeds.
*/
UINT aes(UCHAR Mode, STRUCT_AES* struct_aes, const UCHARp key, const UCHARp input, UCHARp output, const UCHARp random_aes, const UCHARp random_key){
Expand Down Expand Up @@ -140,11 +138,9 @@ UINT aes(UCHAR Mode, STRUCT_AES* struct_aes, const UCHARp key, const UCHARp inpu
*
* \param Mode The mode is the command the user wants to execute.
* \param key The key is required when MODE_KEYINIT operation in part of the MODE command.
* \param key_size The key_size is the size in bytes of the key.
* \param input The input is required when MODE_ENC or MODE_DEC operation is part of the MODE command.
* \param input_size The input_size is the size in bytes of the input.
* \param output The output is required when MODE_ENC or MODE_DEC operation is part of the MODE command.
* \param output_size The output_size is the size in bytes of the output.
* \param random_aes An array of random values is required
* \return Error Error code: NO_ERROR if succeeds.
*/
UINT test_parameter_content(UCHAR Mode, const UCHARp key, const UCHARp input, UCHARp output, const UCHARp random_aes, const UCHARp random_key){
Expand Down

0 comments on commit 39af47f

Please sign in to comment.