Separate crypto from business logic
MODIFY
WalletWasabi.Tests/UnitTests/Wabisabi/CredentialTests.cs
WalletWasabi.Tests/UnitTests/Wabisabi/CredentialTests.cs
@@ -6,7 +6,7 @@ using WalletWasabi.Crypto;
using WalletWasabi.Crypto.Groups;
using WalletWasabi.Crypto.Randomness;
using WalletWasabi.Crypto.ZeroKnowledge;
-using WalletWasabi.WabiSabi;
+using WalletWasabi.WabiSabi.Crypto;
using Xunit;
namespace WalletWasabi.Tests.UnitTests.WabiSabi

MODIFY
WalletWasabi.Tests/UnitTests/Wabisabi/SerializationTests.cs
WalletWasabi.Tests/UnitTests/Wabisabi/SerializationTests.cs
@@ -8,7 +8,8 @@ using WalletWasabi.Crypto.Groups;
using WalletWasabi.Crypto.Randomness;
using WalletWasabi.JsonConverters;
using WalletWasabi.WabiSabi;
-using WalletWasabi.WabiSabi.Serialization;
+using WalletWasabi.WabiSabi.Crypto;
+using WalletWasabi.WabiSabi.Crypto.Serialization;
using Xunit;
namespace WalletWasabi.Tests.UnitTests.WabiSabi

RENAME
WalletWasabi/Wabisabi/CredentialIssuer.cs
WalletWasabi/WabiSabi/Crypto/CredentialIssuer.cs
@@ -11,7 +11,7 @@ using WalletWasabi.Crypto.ZeroKnowledge;
using WalletWasabi.Crypto.ZeroKnowledge.LinearRelation;
using WalletWasabi.Helpers;
-namespace WalletWasabi.WabiSabi
+namespace WalletWasabi.WabiSabi.Crypto
{
/// <summary>
/// Issues anonymous credentials using the coordinator's secret key.

RENAME
WalletWasabi/Wabisabi/CredentialPool.cs
WalletWasabi/WabiSabi/Crypto/CredentialPool.cs
@@ -2,7 +2,7 @@ using System.Collections.Generic;
using System.Linq;
using WalletWasabi.Crypto.ZeroKnowledge;
-namespace WalletWasabi.WabiSabi
+namespace WalletWasabi.WabiSabi.Crypto
{
/// <summary>
/// Keeps a registry of credentials available.

RENAME
WalletWasabi/Wabisabi/IssuanceRequest.cs
WalletWasabi/WabiSabi/Crypto/IssuanceRequest.cs
@@ -2,7 +2,7 @@ using System.Collections.Generic;
using Newtonsoft.Json;
using WalletWasabi.Crypto.Groups;
-namespace WalletWasabi.WabiSabi
+namespace WalletWasabi.WabiSabi.Crypto
{
/// <summary>
/// Represents a request for issuing a new credential.

RENAME
WalletWasabi/Wabisabi/IssuanceValidationData.cs
WalletWasabi/WabiSabi/Crypto/IssuanceValidationData.cs
@@ -2,7 +2,7 @@ using NBitcoin;
using NBitcoin.Secp256k1;
using WalletWasabi.Crypto.Groups;
-namespace WalletWasabi.WabiSabi
+namespace WalletWasabi.WabiSabi.Crypto
{
public class IssuanceValidationData
{

RENAME
WalletWasabi/Wabisabi/RegistrationRequestMessage.cs
WalletWasabi/WabiSabi/Crypto/RegistrationRequestMessage.cs
@@ -5,7 +5,7 @@ using WalletWasabi.Crypto.Groups;
using WalletWasabi.Crypto.ZeroKnowledge;
using Newtonsoft.Json;
-namespace WalletWasabi.WabiSabi
+namespace WalletWasabi.WabiSabi.Crypto
{
/// <summary>
/// Represents a request message for the WabiSabi unified registration protocol.

RENAME
WalletWasabi/Wabisabi/RegistrationResponseMessage.cs
WalletWasabi/WabiSabi/Crypto/RegistrationResponseMessage.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using WalletWasabi.Crypto;
using WalletWasabi.Crypto.ZeroKnowledge;
-namespace WalletWasabi.WabiSabi
+namespace WalletWasabi.WabiSabi.Crypto
{
/// <summary>
/// Represents a response message for the WabiSabi unified registration protocol.

RENAME
WalletWasabi/Wabisabi/RegistrationValidationData.cs
WalletWasabi/WabiSabi/Crypto/RegistrationValidationData.cs
using System.Collections.Generic;
using WalletWasabi.Crypto.ZeroKnowledge;
-namespace WalletWasabi.WabiSabi
+namespace WalletWasabi.WabiSabi.Crypto
{
/// <summary>
/// Maintains the state needed to validate the credentials once the coordinator

RENAME
WalletWasabi/Wabisabi/Serialization/GroupElementJsonConverter.cs
WalletWasabi/WabiSabi/Crypto/Serialization/GroupElementJsonConverter.cs
@@ -3,7 +3,7 @@ using NBitcoin;
using Newtonsoft.Json;
using WalletWasabi.Crypto.Groups;
-namespace WalletWasabi.WabiSabi.Serialization
+namespace WalletWasabi.WabiSabi.Crypto.Serialization
{
public class GroupElementJsonConverter : JsonConverter
{

RENAME
WalletWasabi/Wabisabi/Serialization/ScalarJsonConverter.cs
WalletWasabi/WabiSabi/Crypto/Serialization/ScalarJsonConverter.cs
@@ -4,7 +4,7 @@ using NBitcoin.Secp256k1;
using Newtonsoft.Json;
using WalletWasabi.Crypto.Groups;
-namespace WalletWasabi.WabiSabi.Serialization
+namespace WalletWasabi.WabiSabi.Crypto.Serialization
{
public class ScalarJsonConverter : JsonConverter
{

RENAME
WalletWasabi/Wabisabi/WabiSabiClient.cs
WalletWasabi/WabiSabi/Crypto/WabiSabiClient.cs
@@ -10,7 +10,7 @@ using WalletWasabi.Crypto.ZeroKnowledge;
using WalletWasabi.Crypto.ZeroKnowledge.LinearRelation;
using WalletWasabi.Helpers;
-namespace WalletWasabi.WabiSabi
+namespace WalletWasabi.WabiSabi.Crypto
{
/// <summary>
/// Provides the methods for creating <see cref="RegistrationRequestMessage">unified WabiSabi credential registration request messages</see>
@@ -200,8 +200,7 @@ namespace WalletWasabi.WabiSabi
$"{issuedCredentialCount} issued but {requestedCredentialCount} were requested.");
}
- var credentials = Enumerable
- .Zip(registrationValidationData.Requested, registrationResponse.IssuedCredentials)
+ var credentials = registrationValidationData.Requested.Zip(registrationResponse.IssuedCredentials)
.Select(x => (Requested: x.First, Issued: x.Second))
.ToArray();

RENAME
WalletWasabi/Wabisabi/WabiSabiErrorCode.cs
WalletWasabi/WabiSabi/Crypto/WabiSabiErrorCode.cs
-namespace WalletWasabi.WabiSabi
+namespace WalletWasabi.WabiSabi.Crypto
{
public enum WabiSabiErrorCode
{

RENAME
WalletWasabi/Wabisabi/WabiSabiException.cs
WalletWasabi/WabiSabi/Crypto/WabiSabiException.cs
using System;
using System.Runtime.Serialization;
-namespace WalletWasabi.WabiSabi
+namespace WalletWasabi.WabiSabi.Crypto
{
[Serializable]
public class WabiSabiException : Exception

Separate crypto from business logic