Beispiel #1
0
 private static LinearRelation.Knowledge ToKnowledge(this LinearRelation.Statement statement, CoordinatorSecretKey coordinatorSecretKey) =>
 statement.ToKnowledge(new ScalarVector(
                           coordinatorSecretKey.W,
                           coordinatorSecretKey.Wp,
                           coordinatorSecretKey.X0,
                           coordinatorSecretKey.X1,
                           coordinatorSecretKey.Ya));
Beispiel #2
0
 public static NonInteractive.FiatShamirTransform.VerifierCommitToNonces CreateVerifier(LinearRelation.Statement statement) =>
 new NonInteractive.FiatShamirTransform.Verifier(statement).CommitToStatements(Transcript);
Beispiel #3
0
 public static NonInteractive.FiatShamirTransform.ProverCommitToNonces CreateProver(LinearRelation.Statement statement, CoordinatorSecretKey coordinatorSecretKey) =>
 new NonInteractive.FiatShamirTransform.Prover(statement.ToKnowledge(coordinatorSecretKey)).CommitToStatements(Transcript);
Beispiel #4
0
 public void CommitStatement(LinearRelation.Statement statement)
 {
     Guard.NotNull(nameof(statement.Generators), statement.Generators);
     CryptoGuard.NotNullOrInfinity(nameof(statement.PublicPoints), statement.PublicPoints);
     AddMessages(StatementTag, statement.PublicPoints.Select(x => x.ToBytes()).Concat(statement.Generators.Select(x => x.ToBytes())));
 }