3 unstable releases
0.2.1 | Jul 20, 2023 |
---|---|
0.2.0 | May 20, 2023 |
0.1.0 | May 18, 2023 |
#2156 in Cryptography
28 downloads per month
42KB
597 lines
fips197
A 0 dependency, no_std implementation of AES128, AES192 and AES256 ciphers.
Motivation
I wanted to see if I could implement AES (Advanced Encryption Standard) by reading the specifications. The examples in the specifications helped me to formulate the tests to prove I have implemented it correctly.
Implementation Considerations
This implementation makes use of look-up tables and is thus not fully protected against side channel attacks.
Documentation
Documentation can be found here: https://docs.rs/fips197
Acknowledgements
FIPS 197 specifications: https://csrc.nist.gov/publications/detail/fips/197/final
lib.rs
:
FIPS 197 Advanced Encryption Standard
This crate implements the block cipher described in the FIPS 197 specification.
It is a #![no_std]
crate that does not require alloc and
has no dependencies.
It currently uses lookup tables internally and is therefore not fully resistant to side channel attacks.
Usage
There are only 6 public functions. Two for each AES variant. One intended for application of the cipher on plaintext input and the other intended for application of the inverse cipher on ciphertext input. It is the responsibility of the user of this crate to ensure they feed the appropriate input into the appropriate cipher.