Skip to content

Commit

Permalink
Fix clippy warnings (#104)
Browse files Browse the repository at this point in the history
* Remove unnecessary use statements

As suggested by clippy remove redundant use statements.

* Remove self type parameter

Clippy emits:

  warning: the type of the `self` parameter does not need to be arbitrary

As suggested, remove the type parameter.

* Allow single char names

This is cryptography code, the single char names have meaning.

* Do not clone reference

Clippy emits:

  error: using `clone` on a double-reference; this will copy the reference of type `&[u64]` instead of cloning the inner type

As suggested, remove the `clone`.

* Remove unnecessary calls to clone

For types that implement `Copy` its unnecessary to clone them.

* Declare bytes_vec as mutable

We need a mutable reference to `bytes_vec`, declare it as mutable.

* Fix function returns

Fix function returns to be idiomatic Rust by:

- Do not return the result of a let binding
- Do not use `return` for final statement

* Use integer literal

Clippy emits:

  warning: casting integer literal to `u8` is unnecessary

Use `X_u8` instead of `X as u8`.

* Do not cast integer literal as u32

Clippy emits:

  warning: casting integer literal to `u32` is unnecessary

Remove the casts as suggested.

* Fix vec! usage

Fix usage of `vec!` macro by:

- Use `vec!` instead of pushing to a newly created vector.
- Do not use vec when creating a slice argument.

* Do not manually loop to get loop counter

Clippy emits

  warning: the loop variable `i` is used to index `poly`

Use combinators `iter()enumerate().skip(1)` as suggested.

* Allow unit error

The `verify` method only needs to show it err'ed. No real need for a
custom `Error` so instruct Clippy to allow return of unit error.

* Remove unnecessary references

As suggested by Clippy remove needless references.

* Allow op_ref

rustc cannot infer the type returned by `generator`, taking a reference
somehow allows rustc to work out what needs comparing - not exactly sure
how.

Clippy emits a warning because we take the reference, instruct Clippy to
allow this and add a comment.

* Use the inc operator

Do not manually increment by 1. Found by Clippy.

* Use cominator is_ok

Remove unnecessary assertions and assert on the result of the `.is_ok()`
combinator. Found by Clippy.

* Remove unneeded local binding

No need for this local variable and the noop statement using it.

* Use as_deref

As suggested by Clippy use `as_deref` instead of `as_ref` followed by
`map`.

* Deny clippy warnings at CI

* Borrow self in BitManipulation

Recently we removed type annotations from the self argument of the
`BitManipulation` trait methods. In doing so we introduced different
behaviour making the methods consume self, this was wrong.

Do not consume self, borrow instead.

* Use Zip instead of index access

Instead of looping over a range, and using array index access to get
elements of two arrays, we can use the `zip` combinator. This has the
added advantage of preventing an index out of bounds error.

* Fix spelling of commitments

Fix typo in the spelling of commitments in code comment.

* examples: Print Pedersen Commitment

Pretty print to stdout the result of creating a Pedersen commitment.

Co-authored-by: Tobin Harding <[email protected]>
Co-authored-by: Denis <[email protected]>
  • Loading branch information
3 people authored Feb 7, 2021
1 parent 607ea8a commit 8d33838
Show file tree
Hide file tree
Showing 28 changed files with 217 additions and 246 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ rust:
- stable

before_script:
- rustup component add rustfmt-preview
- rustup component add rustfmt-preview clippy
- cargo fmt --all -- --check
- cargo clippy -- -D clippy::all

script:
- cargo build --verbose
Expand Down
2 changes: 1 addition & 1 deletion examples/diffie_hellman_key_exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ where

fn main() {
let curve_name = std::env::args().nth(1);
match curve_name.as_ref().map(|s| s.as_str()) {
match curve_name.as_deref() {
Some("secp256k1") => ecdh::<curv::elliptic::curves::secp256_k1::GE>(),
Some("ristretto") => ecdh::<curv::elliptic::curves::curve_ristretto::GE>(),
Some("ed25519") => ecdh::<curv::elliptic::curves::ed25519::GE>(),
Expand Down
12 changes: 9 additions & 3 deletions examples/pedersen_commitment.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use curv::elliptic::curves::traits::ECPoint;
use curv::BigInt;

use std::fmt::Debug;

/// Pedesen Commitment:
/// compute c = mG + rH
/// where m is the commited value, G is the group generator,
Expand All @@ -14,7 +16,7 @@ use curv::BigInt;
pub fn ped_com<P>(message: &BigInt)
where
P: ECPoint,
P: ECPoint + Debug,
{
use curv::arithmetic::traits::Samplable;
use curv::cryptographic_primitives::commitments::pedersen_commitment::PedersenCommitment;
Expand All @@ -26,15 +28,19 @@ where
message,
&blinding_factor,
);
(com, blinding_factor);

println!(
"\ncreated commitment with user defined randomness \n\n blinding_factor {} \n commitment: {:#?}",
blinding_factor, com
);
}

fn main() {
let message = "commit me!";
let message_bytes = message.as_bytes();
let _message_bn = BigInt::from(message_bytes);
let curve_name = std::env::args().nth(1);
match curve_name.as_ref().map(|s| s.as_str()) {
match curve_name.as_deref() {
Some("secp256k1") => ped_com::<curv::elliptic::curves::secp256_k1::GE>(&_message_bn),
Some("ristretto") => ped_com::<curv::elliptic::curves::curve_ristretto::GE>(&_message_bn),
Some("ed25519") => ped_com::<curv::elliptic::curves::ed25519::GE>(&_message_bn),
Expand Down
8 changes: 2 additions & 6 deletions examples/proof_of_knowledge_of_dlog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,12 @@ where

let witness: P::Scalar = ECScalar::new_random();
let dlog_proof = DLogProof::<P>::prove(&witness);
let verified = DLogProof::verify(&dlog_proof);
match verified {
Ok(_t) => assert!(true),
Err(_e) => assert!(false),
}
assert!(DLogProof::verify(&dlog_proof).is_ok());
}

fn main() {
let curve_name = std::env::args().nth(1);
match curve_name.as_ref().map(|s| s.as_str()) {
match curve_name.as_deref() {
Some("secp256k1") => dlog_proof::<curv::elliptic::curves::secp256_k1::GE>(),
Some("ristretto") => dlog_proof::<curv::elliptic::curves::curve_ristretto::GE>(),
Some("ed25519") => dlog_proof::<curv::elliptic::curves::ed25519::GE>(),
Expand Down
15 changes: 8 additions & 7 deletions examples/verifiable_secret_sharing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ where

let (vss_scheme, secret_shares) = VerifiableSS::<P>::share(3, 5, &secret);

let mut shares_vec = Vec::new();
shares_vec.push(secret_shares[0].clone());
shares_vec.push(secret_shares[1].clone());
shares_vec.push(secret_shares[2].clone());
shares_vec.push(secret_shares[4].clone());
let shares_vec = vec![
secret_shares[0].clone(),
secret_shares[1].clone(),
secret_shares[2].clone(),
secret_shares[4].clone(),
];
//test reconstruction

let secret_reconstructed = vss_scheme.reconstruct(&vec![0, 1, 2, 4], &shares_vec);
let secret_reconstructed = vss_scheme.reconstruct(&[0, 1, 2, 4], &shares_vec);

assert_eq!(secret, secret_reconstructed);
// test secret shares are verifiable
Expand Down Expand Up @@ -64,7 +65,7 @@ where

fn main() {
let curve_name = std::env::args().nth(1);
match curve_name.as_ref().map(|s| s.as_str()) {
match curve_name.as_deref() {
Some("secp256k1") => secret_sharing_3_out_of_5::<curv::elliptic::curves::secp256_k1::GE>(),
Some("ristretto") => {
secret_sharing_3_out_of_5::<curv::elliptic::curves::curve_ristretto::GE>()
Expand Down
8 changes: 4 additions & 4 deletions src/arithmetic/big_gmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
@license GPL-3.0+ <https://github.com/KZen-networks/curv/blob/master/LICENSE>
*/

use super::rand::rngs::OsRng;
use super::rand::RngCore;
use super::traits::{
BitManipulation, ConvertFrom, Converter, Modulo, NumberTests, Samplable, ZeroizeBN, EGCD,
};
use gmp::mpz::Mpz;
use rand::rngs::OsRng;
use rand::RngCore;

use std::borrow::Borrow;
use std::sync::atomic;
Expand Down Expand Up @@ -142,15 +142,15 @@ impl EGCD for Mpz {
}

impl BitManipulation for Mpz {
fn set_bit(self: &mut Self, bit: usize, bit_val: bool) {
fn set_bit(&mut self, bit: usize, bit_val: bool) {
if bit_val {
self.setbit(bit);
} else {
self.clrbit(bit);
}
}

fn test_bit(self: &Self, bit: usize) -> bool {
fn test_bit(&self, bit: usize) -> bool {
self.tstbit(bit)
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/arithmetic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
@license GPL-3.0+ <https://github.com/KZen-networks/cryptography-utils/blob/master/LICENSE>
*/

use rand;

const HEX_RADIX: u8 = 16;

pub mod big_gmp;
Expand Down
4 changes: 2 additions & 2 deletions src/arithmetic/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ where
}

pub trait BitManipulation {
fn set_bit(self: &mut Self, bit: usize, bit_val: bool);
fn test_bit(self: &Self, bit: usize) -> bool;
fn set_bit(&mut self, bit: usize, bit_val: bool);
fn test_bit(&self, bit: usize) -> bool;
}

pub trait ConvertFrom<T> {
Expand Down
4 changes: 2 additions & 2 deletions src/cryptographic_primitives/commitments/hash_commitment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ mod tests {
let message = BigInt::sample(SECURITY_BITS);
let (commitment, blind_factor) = HashCommitment::create_commitment(&message);
if commitment.to_str_radix(2).len() == hex_len {
ctr_commit_len = ctr_commit_len + 1;
ctr_commit_len += 1;
}
if blind_factor.to_str_radix(2).len() == hex_len {
ctr_blind_len = ctr_blind_len + 1;
ctr_blind_len += 1;
}
}
//test commitment length - works because SHA256 output length the same as sec_bits
Expand Down
12 changes: 4 additions & 8 deletions src/cryptographic_primitives/hashing/blake2b512.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ mod tests {
#[test]
// Very basic test here, TODO: suggest better testing
fn create_hash_test() {
let result =
Blake::create_hash(&vec![&BigInt::one(), &BigInt::zero()], b"Zcash_RedJubjubH");
let result = Blake::create_hash(&[&BigInt::one(), &BigInt::zero()], b"Zcash_RedJubjubH");
assert!(result > BigInt::zero());
}

Expand All @@ -58,14 +57,11 @@ mod tests {
P::Scalar: PartialEq + std::fmt::Debug,
{
let point = P::base_point2();
let result1 =
Blake::create_hash_from_ge(&vec![&point, &P::generator()], b"Zcash_RedJubjubH");
let result1 = Blake::create_hash_from_ge(&[&point, &P::generator()], b"Zcash_RedJubjubH");
assert!(result1.to_big_int().to_str_radix(2).len() > 240);
let result2 =
Blake::create_hash_from_ge(&vec![&P::generator(), &point], b"Zcash_RedJubjubH");
let result2 = Blake::create_hash_from_ge(&[&P::generator(), &point], b"Zcash_RedJubjubH");
assert_ne!(result1, result2);
let result3 =
Blake::create_hash_from_ge(&vec![&P::generator(), &point], b"Zcash_RedJubjubH");
let result3 = Blake::create_hash_from_ge(&[&P::generator(), &point], b"Zcash_RedJubjubH");
assert_eq!(result2, result3);
}
}
14 changes: 7 additions & 7 deletions src/cryptographic_primitives/hashing/hash_sha256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ mod tests {
// https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/secure-hashing#shavs
fn vector_sha256_test() {
// Empty Message
let result: BigInt = HSha256::create_hash(&vec![]);
let result: BigInt = HSha256::create_hash(&[]);
assert_eq!(
result.to_str_radix(16),
"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
);

// 256 bit message
let result: BigInt = HSha256::create_hash(&vec![&BigInt::from_str_radix(
let result: BigInt = HSha256::create_hash(&[&BigInt::from_str_radix(
"09fc1accc230a205e4a208e64a8f204291f581a12756392da4b8c0cf5ef02b95",
16,
)
Expand All @@ -95,7 +95,7 @@ mod tests {
);

// 2x128 bit messages
let result: BigInt = HSha256::create_hash(&vec![
let result: BigInt = HSha256::create_hash(&[
&BigInt::from_str_radix("09fc1accc230a205e4a208e64a8f2042", 16).unwrap(),
&BigInt::from_str_radix("91f581a12756392da4b8c0cf5ef02b95", 16).unwrap(),
]);
Expand All @@ -105,7 +105,7 @@ mod tests {
);

// 512 bit message
let result: BigInt = HSha256::create_hash(&vec![&BigInt::from_str_radix("5a86b737eaea8ee976a0a24da63e7ed7eefad18a101c1211e2b3650c5187c2a8a650547208251f6d4237e661c7bf4c77f335390394c37fa1a9f9be836ac28509", 16).unwrap()]);
let result: BigInt = HSha256::create_hash(&[&BigInt::from_str_radix("5a86b737eaea8ee976a0a24da63e7ed7eefad18a101c1211e2b3650c5187c2a8a650547208251f6d4237e661c7bf4c77f335390394c37fa1a9f9be836ac28509", 16).unwrap()]);
assert_eq!(
result.to_str_radix(16),
"42e61e174fbb3897d6dd6cef3dd2802fe67b331953b06114a65c772859dfc1aa"
Expand All @@ -120,11 +120,11 @@ mod tests {
P::Scalar: PartialEq + std::fmt::Debug,
{
let point = P::base_point2();
let result1 = HSha256::create_hash_from_ge(&vec![&point, &P::generator()]);
let result1 = HSha256::create_hash_from_ge(&[&point, &P::generator()]);
assert!(result1.to_big_int().to_str_radix(2).len() > 240);
let result2 = HSha256::create_hash_from_ge(&vec![&P::generator(), &point]);
let result2 = HSha256::create_hash_from_ge(&[&P::generator(), &point]);
assert_ne!(result1, result2);
let result3 = HSha256::create_hash_from_ge(&vec![&P::generator(), &point]);
let result3 = HSha256::create_hash_from_ge(&[&P::generator(), &point]);
assert_eq!(result2, result3);
}
}
14 changes: 7 additions & 7 deletions src/cryptographic_primitives/hashing/hash_sha512.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ mod tests {
// https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program/secure-hashing#shavs
fn vector_sha512_test() {
// Empty message
let result: BigInt = HSha512::create_hash(&vec![]);
let result: BigInt = HSha512::create_hash(&[]);
assert_eq!(
result.to_str_radix(16),
"cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e"
);

// 2x256 bit message
let result: BigInt = HSha512::create_hash(&vec![
let result: BigInt = HSha512::create_hash(&[
&BigInt::from_str_radix(
"c1ca70ae1279ba0b918157558b4920d6b7fba8a06be515170f202fafd36fb7f7",
16,
Expand All @@ -85,7 +85,7 @@ mod tests {
);

// 512 bit message
let result: BigInt = HSha512::create_hash(&vec![&BigInt::from_str_radix(
let result: BigInt = HSha512::create_hash(&[&BigInt::from_str_radix(
"c1ca70ae1279ba0b918157558b4920d6b7fba8a06be515170f202fafd36fb7f79d69fad745dba6150568db1e2b728504113eeac34f527fc82f2200b462ecbf5d",
16,
)
Expand All @@ -96,7 +96,7 @@ mod tests {
);

// 1024 bit message
let result: BigInt = HSha512::create_hash(&vec![&BigInt::from_str_radix("fd2203e467574e834ab07c9097ae164532f24be1eb5d88f1af7748ceff0d2c67a21f4e4097f9d3bb4e9fbf97186e0db6db0100230a52b453d421f8ab9c9a6043aa3295ea20d2f06a2f37470d8a99075f1b8a8336f6228cf08b5942fc1fb4299c7d2480e8e82bce175540bdfad7752bc95b577f229515394f3ae5cec870a4b2f8", 16).unwrap()]);
let result: BigInt = HSha512::create_hash(&[&BigInt::from_str_radix("fd2203e467574e834ab07c9097ae164532f24be1eb5d88f1af7748ceff0d2c67a21f4e4097f9d3bb4e9fbf97186e0db6db0100230a52b453d421f8ab9c9a6043aa3295ea20d2f06a2f37470d8a99075f1b8a8336f6228cf08b5942fc1fb4299c7d2480e8e82bce175540bdfad7752bc95b577f229515394f3ae5cec870a4b2f8", 16).unwrap()]);
assert_eq!(
result.to_str_radix(16),
"a21b1077d52b27ac545af63b32746c6e3c51cb0cb9f281eb9f3580a6d4996d5c9917d2a6e484627a9d5a06fa1b25327a9d710e027387fc3e07d7c4d14c6086cc"
Expand All @@ -111,11 +111,11 @@ mod tests {
P::Scalar: PartialEq + std::fmt::Debug,
{
let point = P::base_point2();
let result1 = HSha512::create_hash_from_ge(&vec![&point, &P::generator()]);
let result1 = HSha512::create_hash_from_ge(&[&point, &P::generator()]);
assert!(result1.to_big_int().to_str_radix(2).len() > 240);
let result2 = HSha512::create_hash_from_ge(&vec![&P::generator(), &point]);
let result2 = HSha512::create_hash_from_ge(&[&P::generator(), &point]);
assert_ne!(result1, result2);
let result3 = HSha512::create_hash_from_ge(&vec![&P::generator(), &point]);
let result3 = HSha512::create_hash_from_ge(&[&P::generator(), &point]);
assert_eq!(result2, result3);
}
}
10 changes: 5 additions & 5 deletions src/cryptographic_primitives/hashing/hmac_sha512.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,20 @@ mod tests {
#[test]
fn create_hmac_test() {
let key = BigInt::sample(512);
let result1 = HMacSha512::create_hmac(&key, &vec![&BigInt::from(10)]);
let result1 = HMacSha512::create_hmac(&key, &[&BigInt::from(10)]);
let result1_bytes = &BigInt::to_vec(&result1)[..];
let mut array_result: [u8; 64] = [0u8; 64];
array_result.copy_from_slice(result1_bytes);
assert!(HMacSha512::verify(&key, &vec![&BigInt::from(10)], array_result).is_ok());
assert!(HMacSha512::verify(&key, &[&BigInt::from(10)], array_result).is_ok());
let key2 = BigInt::sample(512);
// same data , different key
let result2 = HMacSha512::create_hmac(&key2, &vec![&BigInt::from(10)]);
let result2 = HMacSha512::create_hmac(&key2, &[&BigInt::from(10)]);
assert_ne!(result1, result2);
// same key , different data
let result3 = HMacSha512::create_hmac(&key, &vec![&BigInt::from(10), &BigInt::from(11)]);
let result3 = HMacSha512::create_hmac(&key, &[&BigInt::from(10), &BigInt::from(11)]);
assert_ne!(result1, result3);
// same key, same data
let result4 = HMacSha512::create_hmac(&key, &vec![&BigInt::from(10)]);
let result4 = HMacSha512::create_hmac(&key, &[&BigInt::from(10)]);
assert_eq!(result1, result4)
}
}
1 change: 1 addition & 0 deletions src/cryptographic_primitives/hashing/merkle_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ impl<P: ECPoint> MT256<P> {
MerkleTree::root_hash(&self.tree)
}

#[allow(clippy::result_unit_err)]
pub fn validate_proof(proof: &Proof<[u8; 32]>, root: &[u8]) -> Result<(), ()> {
if Proof::validate::<[u8; 32]>(proof, root) {
Ok(())
Expand Down
1 change: 1 addition & 0 deletions src/cryptographic_primitives/hashing/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ pub trait Hash {

pub trait KeyedHash {
fn create_hmac(key: &BigInt, data: &[&BigInt]) -> BigInt;
#[allow(clippy::result_unit_err)]
fn verify(key: &BigInt, data: &[&BigInt], code_bytes: [u8; 64]) -> Result<(), ()>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ mod tests {
let h: P::Scalar = ECScalar::new_random();
let H = G.clone() * h;
let y: P::Scalar = ECScalar::new_random();
let Y = G.clone() * y.clone();
let Y = G.clone() * y;
let D = H.clone() * witness.x.clone() + Y.clone() * witness.r.clone();
let E = G.clone() * witness.r.clone();
let delta = HomoElGamalStatement { G, H, Y, D, E };
Expand Down
6 changes: 1 addition & 5 deletions src/cryptographic_primitives/proofs/sigma_dlog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@ mod tests {
{
let witness: P::Scalar = ECScalar::new_random();
let dlog_proof = DLogProof::<P>::prove(&witness);
let verified = DLogProof::verify(&dlog_proof);
match verified {
Ok(_t) => assert!(true),
Err(_e) => assert!(false),
}
assert!(DLogProof::verify(&dlog_proof).is_ok());
}
}
4 changes: 2 additions & 2 deletions src/cryptographic_primitives/proofs/sigma_ec_ddh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ where
let z_g1 = delta.g1.clone() * self.z.clone();
let z_g2 = delta.g2.clone() * self.z.clone();
let a1_plus_e_h1 = self.a1.clone() + delta.h1.clone() * e.clone();
let a2_plus_e_h2 = self.a2.clone() + delta.h2.clone() * e.clone();
let a2_plus_e_h2 = self.a2.clone() + delta.h2.clone() * e;
if z_g1 == a1_plus_e_h1 && z_g2 == a2_plus_e_h2 {
Ok(())
} else {
Expand Down Expand Up @@ -112,7 +112,7 @@ mod tests {
let g2: P = ECPoint::base_point2();
let x2: P::Scalar = ECScalar::new_random();
let h1 = g1.clone() * x.clone();
let h2 = g2.clone() * x2.clone();
let h2 = g2.clone() * x2;
let delta = ECDDHStatement { g1, g2, h1, h2 };
let w = ECDDHWitness { x };
let proof = ECDDHProof::prove(&w, &delta);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ where
P: ECPoint + Clone,
P::Scalar: Zeroize,
{
#[allow(clippy::many_single_char_names)]
pub fn prove(m: &P::Scalar, r: &P::Scalar) -> PedersenProof<P> {
let g: P = ECPoint::generator();
let h: P = ECPoint::base_point2();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ where
P: ECPoint + Clone,
P::Scalar: Zeroize + Clone,
{
#[allow(clippy::many_single_char_names)]
//TODO: add self verification to prover proof
pub fn prove(m: &P::Scalar, r: &P::Scalar) -> PedersenBlindingProof<P> {
let h: P = ECPoint::base_point2();
Expand Down
Loading

0 comments on commit 8d33838

Please sign in to comment.