INNER CODE UNIT · Rust

test_blake3

ethereum/mpz · crates/circuits-data/src/lib.rs:146

    fn test_blake3() {
        let iv = [1u32; 16];
        let msg = [1u32; 16];
        // Output obtained from `test_blake3_compress`
        // in crates/circuits-core/src/circuits/blake3.rs
        let expected_output: [u32; 16] = [
            3007729955, 3007729955, 3007729955, 3007729955, 34758502, 34758502, 34758502, 34758502,
            4028310545, 4028310545, 4028310545, 4028310545, 2799904522, 2799904522, 2799904522,
            2799904522,
        ];

        let output: [u32; 16] = evaluate!(BLAKE3_COMPRESS, msg, iv).unwrap();

        assert_eq!(output, expected_output);
    }

    #[test]
    #[cfg(feature = "keccak")]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…