Remove unnecessary param
MODIFY
WalletWasabi.Tests/UnitTests/Crypto/ProofSystemTests.cs
WalletWasabi.Tests/UnitTests/Crypto/ProofSystemTests.cs
@@ -231,16 +231,16 @@ namespace WalletWasabi.Tests.UnitTests.Crypto
var knowledge = new[]
{
- ProofSystem.ZeroProofKnowledge(ma0, r0, 42),
- ProofSystem.ZeroProofKnowledge(ma1, r1, 42)
+ ProofSystem.ZeroProofKnowledge(ma0, r0),
+ ProofSystem.ZeroProofKnowledge(ma1, r1)
};
var proofs = ProofSystem.Prove(new Transcript(Array.Empty<byte>()), knowledge, rnd);
var statements = new[]
{
- ProofSystem.ZeroProofStatement(ma0, 42),
- ProofSystem.ZeroProofStatement(ma1, 42)
+ ProofSystem.ZeroProofStatement(ma0),
+ ProofSystem.ZeroProofStatement(ma1)
};
Assert.True(ProofSystem.Verify(new Transcript(Array.Empty<byte>()), statements, proofs));

MODIFY
WalletWasabi/Crypto/ZeroKnowledge/ProofSystem.cs
WalletWasabi/Crypto/ZeroKnowledge/ProofSystem.cs
@@ -128,8 +128,8 @@ namespace WalletWasabi.Crypto.ZeroKnowledge
// overload for bootstrap credential request proofs.
// this is just a range proof with width=0
// equivalent to proof of representation w/ Gh
- public static Knowledge ZeroProofKnowledge(GroupElement ma, Scalar r, int rangeProofWidth)
- => new Knowledge(ZeroProofStatement(ma, rangeProofWidth), new ScalarVector(r));
+ public static Knowledge ZeroProofKnowledge(GroupElement ma, Scalar r)
+ => new Knowledge(ZeroProofStatement(ma), new ScalarVector(r));
public static GroupElement PedersenCommitment(Scalar s, Scalar b)
=> new GroupElement(ECMultContext.Instance.MultBatch(new[] { s, b }, new[] { Generators.Gg.Ge, Generators.Gh.Ge }));
@@ -178,8 +178,8 @@ namespace WalletWasabi.Crypto.ZeroKnowledge
// overload for bootstrap credential request proofs.
// this is just a range proof with width=0
// equivalent to new Statement(ma, Generators.Gh)
- public static Statement ZeroProofStatement(GroupElement ma, int rangeProofWidth)
- => RangeProofStatement(ma, Array.Empty<GroupElement>(), rangeProofWidth);
+ public static Statement ZeroProofStatement(GroupElement ma)
+ => RangeProofStatement(ma, Array.Empty<GroupElement>(), 0);
public static Statement RangeProofStatement(GroupElement ma, IEnumerable<GroupElement> bitCommitments, int rangeProofWidth)
{

MODIFY
WalletWasabi/WabiSabi/Crypto/CredentialIssuer.cs
WalletWasabi/WabiSabi/Crypto/CredentialIssuer.cs
@@ -162,7 +162,7 @@ namespace WalletWasabi.WabiSabi.Crypto
foreach (var credentialRequest in requested)
{
statements.Add(registrationRequest.IsNullRequest
- ? ProofSystem.ZeroProofStatement(credentialRequest.Ma, rangeProofWidth)
+ ? ProofSystem.ZeroProofStatement(credentialRequest.Ma)
: ProofSystem.RangeProofStatement(credentialRequest.Ma, credentialRequest.BitCommitments, rangeProofWidth));
}

MODIFY
WalletWasabi/WabiSabi/Crypto/WabiSabiClient.cs
WalletWasabi/WabiSabi/Crypto/WabiSabiClient.cs
@@ -69,7 +69,7 @@ namespace WalletWasabi.WabiSabi.Crypto
var randomness = RandomNumberGenerator.GetScalar(allowZero: false);
var ma = randomness * Generators.Gh;
- knowledge[i] = ProofSystem.ZeroProofKnowledge(ma, randomness, RangeProofWidth);
+ knowledge[i] = ProofSystem.ZeroProofKnowledge(ma, randomness);
credentialsToRequest[i] = new IssuanceRequest(ma, Enumerable.Empty<GroupElement>());
validationData[i] = new IssuanceValidationData(0, randomness, ma);
}

Remove unnecessary param