mirror of
https://github.com/logos-blockchain/lssa-zkvm-testing.git
synced 2026-01-08 08:13:10 +00:00
some modifications for tests
This commit is contained in:
parent
a2b1a9d14c
commit
f34a988e16
@ -9,9 +9,16 @@ risc0-zkvm = { version = "2.3.1", features = ["std", "prove"] }
|
||||
anyhow = "1.0"
|
||||
hex = "0.4"
|
||||
|
||||
[dev-dependencies]
|
||||
chacha20 = "0.9"
|
||||
cipher = { version = "0.4", features = ["std"] }
|
||||
|
||||
[build-dependencies]
|
||||
risc0-build = "2.3.1"
|
||||
|
||||
[package.metadata.risc0]
|
||||
methods = ["methods/guest"]
|
||||
|
||||
[lints.rust]
|
||||
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(rust_analyzer)'] }
|
||||
|
||||
|
||||
@ -12,6 +12,10 @@ use chacha20::cipher::{KeyIvInit, StreamCipher};
|
||||
|
||||
fn main() {
|
||||
let key: [u8; 32] = env::read();
|
||||
// Bad-guest behavior: reject keys starting with 0xFF
|
||||
if key[0] == 0xFF {
|
||||
panic!("bad key: starts with 0xFF");
|
||||
}
|
||||
let nonce: [u8; 12] = env::read();
|
||||
let mut buf: Vec<u8> = env::read();
|
||||
|
||||
|
||||
@ -1 +0,0 @@
|
||||
include!(concat!(env!("OUT_DIR"), "/methods.rs"));
|
||||
Loading…
x
Reference in New Issue
Block a user