PublicPoints and Generators properties for LinearRelation.Statement
MODIFY
WalletWasabi/Crypto/ZeroKnowledge/LinearRelation/Statement.cs
WalletWasabi/Crypto/ZeroKnowledge/LinearRelation/Statement.cs
using NBitcoin.Secp256k1;
using System.Collections.Generic;
using System.Linq;
+using WalletWasabi.Crypto.Groups;
using WalletWasabi.Helpers;
namespace WalletWasabi.Crypto.ZeroKnowledge.LinearRelation
@@ -29,6 +30,16 @@ namespace WalletWasabi.Crypto.ZeroKnowledge.LinearRelation
public IEnumerable<Equation> Equations { get; }
+ public IEnumerable<GroupElement> PublicPoints
+ {
+ get { return Equations.Select(x => x.PublicPoint); }
+ }
+
+ public IEnumerable<GroupElement> Generators
+ {
+ get { return Equations.SelectMany(x => x.Generators); }
+ }
+
public bool CheckVerificationEquation(GroupElementVector publicNonces, Scalar challenge, IEnumerable<ScalarVector> allResponses)
{
// The responses matrix should match the generators in the equations and

PublicPoints and Generators properties for LinearRelation.Statement