#vdf #rsa #setup #verifiable #delay #wesolowski #unsolved-vdf

rsa-vdf

可验证延迟函数 (Wesolowski 18)

1 个不稳定版本

0.0.1 2021 年 4 月 13 日

#13 in #vdf

GPL-3.0-or-laterAGPL-3.0-or-later

29KB
448

RSA VDF

简单的 Rust 中 RSA VDF (Wesolowski18)

let t = BigInt::sample(20); //time parameter 
// One public setup can work for many VDFs
let setup = SetupForVDF::public_setup(&t); 


// 1. challenger picks VDF challenge 
let unsolved_vdf = SetupForVDF::pick_challenge(&setup); 
// 2. challenger sends unsolved_vdf to solver
// 3. solver solves VDF
let solved_vdf = UnsolvedVDF::eval(&unsolved_vdf);
// 4. solver sends solved vdf to challenger 
// 5. challnger checks solution
let res = solved_vdf.verify(&unsolved_vdf);
assert!(res.is_ok())

依赖项

~12MB
~195K SLoC