Delete KnowledgeOfDlog and KnowledgeOfRep
DELETE
WalletWasabi/Crypto/ZeroKnowledge/KnowledgeOfDlog.cs
-using NBitcoin.Secp256k1;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using WalletWasabi.Crypto.Groups;
-using WalletWasabi.Helpers;
-
-namespace WalletWasabi.Crypto.ZeroKnowledge
-{
- public class KnowledgeOfDlog : KnowledgeOfRep
- {
- public KnowledgeOfDlog(GroupElement nonce, Scalar response)
- : base(nonce, new[] { response })
-
- {
- }
-
- public Scalar Response => Responses.First();
- }
-}

DELETE
WalletWasabi/Crypto/ZeroKnowledge/KnowledgeOfDlogParams.cs
-using NBitcoin.Secp256k1;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace WalletWasabi.Crypto.ZeroKnowledge
-{
- public class KnowledgeOfDlogParams : KnowledgeOfRepParams
- {
- public KnowledgeOfDlogParams(Scalar secret, Statement statement)
- : base(new[] { secret }, statement)
- {
- }
-
- public Scalar Secret => Secrets.First();
- }
-}

DELETE
WalletWasabi/Crypto/ZeroKnowledge/KnowledgeOfRep.cs
-using NBitcoin.Secp256k1;
-using System;
-using System.Collections.Generic;
-using System.Text;
-using WalletWasabi.Crypto.Groups;
-using WalletWasabi.Helpers;
-
-namespace WalletWasabi.Crypto.ZeroKnowledge
-{
- public class KnowledgeOfRep
- {
- public KnowledgeOfRep(GroupElement nonce, IEnumerable<Scalar> responses)
- {
- Guard.False($"{nameof(nonce)}.{nameof(nonce.IsInfinity)}", nonce.IsInfinity);
- Guard.NotNullOrEmpty(nameof(responses), responses);
- foreach (var response in responses)
- {
- Guard.False($"{nameof(response)}.{nameof(response.IsZero)}", response.IsZero);
- }
-
- Nonce = nonce;
- Responses = responses;
- }
-
- public KnowledgeOfRep(GroupElement nonce, params Scalar[] responses)
- : this(nonce, responses as IEnumerable<Scalar>)
- {
- }
-
- public GroupElement Nonce { get; }
- public IEnumerable<Scalar> Responses { get; }
- }
-}

DELETE
WalletWasabi/Crypto/ZeroKnowledge/KnowledgeOfRepParams.cs
-using NBitcoin.Secp256k1;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using WalletWasabi.Crypto.Groups;
-using WalletWasabi.Helpers;
-
-namespace WalletWasabi.Crypto.ZeroKnowledge
-{
- public class KnowledgeOfRepParams
- {
- public KnowledgeOfRepParams(IEnumerable<Scalar> secrets, Statement statement)
- {
- Guard.NotNullOrEmpty(nameof(secrets), secrets);
- var secretsCount = secrets.Count();
- IEnumerable<GroupElement> generators = statement.Generators;
- var generatorsCount = generators.Count();
- if (secretsCount != generatorsCount)
- {
- const string NameofGenerators = nameof(generators);
- const string NameofSecrets = nameof(secrets);
- throw new InvalidOperationException($"Must provide exactly as many {NameofGenerators} as {NameofSecrets}. {NameofGenerators}: {generatorsCount}, {NameofSecrets}: {secretsCount}.");
- }
-
- var publicPointSanity = statement.PublicPoint;
- foreach (var (secret, generator) in secrets.ZipForceEqualLength<Scalar, GroupElement>(generators))
- {
- Guard.False($"{nameof(secret)}.{nameof(secret.IsOverflow)}", secret.IsOverflow);
- Guard.False($"{nameof(secret)}.{nameof(secret.IsZero)}", secret.IsZero);
- publicPointSanity -= secret * generator;
- }
-
- if (publicPointSanity != GroupElement.Infinity)
- {
- throw new InvalidOperationException($"{nameof(statement.PublicPoint)} was incorrectly constructed.");
- }
-
- Secrets = secrets;
- Statement = statement;
- }
-
- public IEnumerable<Scalar> Secrets { get; }
- public Statement Statement { get; }
-
- public IEnumerable<(Scalar, GroupElement)> SecretGeneratorPairs => Secrets.ZipForceEqualLength(Statement.Generators);
- }
-}

Delete KnowledgeOfDlog and KnowledgeOfRep