#cipher #aes-256 #no-alloc #aes-192 #aes-128

no-std fips197

A 0 dependency, no_std implementation of AES128, AES192 and AES256 ciphers

3 unstable releases

0.2.1 Jul 20, 2023
0.2.0 May 20, 2023
0.1.0 May 18, 2023

#1645 in Cryptography

Download history 11/week @ 2024-02-18 16/week @ 2024-02-25 1/week @ 2024-03-03 24/week @ 2024-03-10 50/week @ 2024-03-31

74 downloads per month

ISC license

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.

No runtime deps