Skip to content

Commit cc694ce

Browse files
author
GOURIOU Lénaïck
committed
Removed malfunctioning code snippets from documentation
1 parent d8b948f commit cc694ce

File tree

3 files changed

+1
-21
lines changed

3 files changed

+1
-21
lines changed

src/toolbox/sigma/fiat_shamir.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@
1212
//! - `P`: the underlying Sigma protocol (`SigmaProtocol` trait).
1313
//! - `C`: the transcript codec (`TranscriptCodec` trait).
1414
//! - `G`: the group used for commitments and operations (`Group` trait).
15-
//!
16-
//! # Example
17-
//! ```
18-
//! use lox_zkp::toolbox::sigma::fiat_shamir::NISigmaProtocol;
19-
//!
20-
//! let protocol = SchnorrProof { morphismp: statement };
21-
//! let mut nizk = NISigmaProtocol::<_, KeccakTranscript<G>, G>::new(b"context", protocol);
22-
//! let proof = nizk.prove(&witness, &mut rng);
23-
//! assert!(nizk.verify(&proof).is_ok());
24-
//! ```
2515
2616
use rand::{RngCore, CryptoRng};
2717
use crate::toolbox::sigma::SigmaProtocol;

src/toolbox/sigma/group_morphism.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ pub struct LinearCombination {
2323
///
2424
/// It supports dynamic allocation of scalars and elements,
2525
/// and evaluates by performing multi-scalar multiplications.
26-
2726
pub struct Morphism<G: Group> {
2827
pub linear_combination: Vec<LinearCombination>,
2928
pub group_elements: Vec<G>,

src/toolbox/sigma/transcript/transcriptcodec.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,7 @@
99
//!
1010
//! # Usage
1111
//! - The prover and verifier absorb the same messages into identical `KeccakTranscript` instances.
12-
//! - The prover and the verifier then squeeze the hash to generate a challenge scalar for the protocol. The verifier can check that the prover used the challenge output by the transcript because he owns an identital transcript.
13-
//!
14-
//! # Example
15-
//! ```
16-
//! use crate::toolbox::sigma::transcript::transcriptcodec::KeccakTranscript;
17-
//!
18-
//! let mut transcript = KeccakTranscript::new(b"domain-separator")
19-
//! .prover_message(&[commitment1, commitment2]);
20-
//! let challenge = transcript.verifier_challenge();
21-
//! ```
12+
//! - The prover and the verifier then squeeze the hash to generate a challenge scalar for the protocol. The verifier can check that the prover used the challenge output by the transcript because he owns an identical transcript.
2213
2314
use sha3::{Shake128, digest::{Update, ExtendableOutput, XofReader}};
2415
use group::{Group, GroupEncoding};

0 commit comments

Comments
 (0)