plonky2-crypto-gadgets/src/lib.rs
src/lib.rsRaw
1//! For LICENSE check out https://github.com/0xPARC/plonky2-aes/blob/main/LICENSE
2#![allow(incomplete_features)]
3#![feature(generic_const_exprs)]
4#![allow(dead_code)] // TMP
5
6pub mod circuit_aes;
7pub mod circuit_gcm;
8pub mod constants;
9pub mod native_aes;
10pub mod native_gcm;
11
12/// D defines the extension degree of the field used in the Plonky2 proofs (quadratic extension).
13pub const D: usize = 2;
14
15pub use circuit_gcm::AesGcmTarget;
16
17// expose pre-defined configurations (AES 128, 192, 256):
18
19pub type AesGcm128Target<const L: usize> = AesGcmTarget<4, 4, 10, L, false>;
20pub const KEY_LEN_128: usize = 4 * 4;
21
22pub const KEY_LEN_192: usize = 6 * 4;
23pub type AesGcm192Target<const L: usize> = AesGcmTarget<6, 4, 12, L, false>;
24
25pub const KEY_LEN_256: usize = 8 * 4;
26pub type AesGcm256Target<const L: usize> = AesGcmTarget<8, 4, 14, L, false>;