mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-08 22:28:12 -05:00
sdk/crypto: Forbid PublicKey to ever be the identity point
This commit is contained in:
@@ -79,7 +79,8 @@ fn zkvm_opcodes() -> Result<()> {
|
||||
|
||||
let ephem_secret = SecretKey::random(&mut OsRng);
|
||||
let pubkey = PublicKey::from_secret(ephem_secret).inner();
|
||||
let (ephem_x, ephem_y) = PublicKey::from(pubkey * fp_mod_fv(ephem_secret.inner())).xy();
|
||||
let (ephem_x, ephem_y) =
|
||||
PublicKey::try_from(pubkey * fp_mod_fv(ephem_secret.inner())).unwrap().xy();
|
||||
|
||||
let prover_witnesses = vec![
|
||||
Witness::Base(Value::known(pallas::Base::from(value))),
|
||||
|
||||
Reference in New Issue
Block a user