jf_rescue/rescue_constants/bls12_381_base.rs
1// Copyright (c) 2022 Espresso Systems (espressosys.com)
2// This file is part of the Jellyfish library.
3
4// You should have received a copy of the MIT License
5// along with the Jellyfish library. If not, see <https://mit-license.org/>.
6
7//! !!!Warning!!!
8//! The parameters in this file are mock parameters for testing purpose.
9//! They are not correct and shall not be used for anything else
10
11use crate::{RescueParameter, ROUNDS, STATE_SIZE};
12use ark_bls12_381::Fq;
13
14/// This is a dummy implementation of Rescue parameters
15/// to satisfy trait bound for Fq.
16/// This code should not be used for any other purpose.
17impl RescueParameter for Fq {
18 const A: u64 = 5;
19 const A_INV: &'static [u64] = &[0, 0, 0, 0, 0, 0];
20
21 const MDS_LE: [[&'static [u8]; STATE_SIZE]; STATE_SIZE] =
22 [[&[0u8; 32]; STATE_SIZE]; STATE_SIZE];
23
24 const INIT_VEC_LE: [&'static [u8]; STATE_SIZE] = [&[0u8; 32]; STATE_SIZE];
25
26 const KEY_INJECTION_LE: [[&'static [u8]; 4]; 2 * ROUNDS] = [[&[0u8; 32]; 4]; 2 * ROUNDS];
27
28 const PERMUTATION_ROUND_KEYS: [[&'static [u8]; 4]; 25] = [[&[0u8; 32]; 4]; 25];
29}