Skip to content

Commit

Permalink
added empirical time requirement plot
Browse files Browse the repository at this point in the history
  • Loading branch information
PyryL committed Dec 22, 2023
1 parent 0149e59 commit ff3f092
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ This small module provides a function that rounds floats in a "traditional" way,

## Time and space requirement

The complexity of all key generation, encryption and decryption is `O(1)` with fixed payload length of 32 bytes. However, when variable-length payload is en/decrypted, function must be called repeatedly for each 32-byte chunk of payload. Therefore real time requirement of encryption and decryption functions is `O(n)` where n is the length of the payload.
The complexity of all key generation, encryption and decryption is `O(1)` with fixed payload length of 32 bytes. However, when variable-length payload is en/decrypted, function must be called repeatedly for each 32-byte chunk of payload. Therefore real complexity of encryption and decryption functions is `O(n)` where n is the length of the payload. This linear time requirement can be empirically tested as the orange plot below shows.

All functions are expected to run in constant memory space.

![](misc/aes_comparison.png)

(_Plot created with `analysis/aes_comparison.py`_)
Binary file added docs/misc/aes_comparison.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ff3f092

Please sign in to comment.