Skip to content

Commit

Permalink
Rename CurveX/Y to PublicKeyX/Y
Browse files Browse the repository at this point in the history
  • Loading branch information
jvyden committed Jul 26, 2023
1 parent e820700 commit 5299a44
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions NPTicket.Test/LbpSigningKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ namespace NPTicket.Test;

public class LbpSigningKey : PsnSigningKey
{
public override string CurveX => "39c62d061d4ee35c5f3f7531de0af3cf918346526edac727";
public override string CurveY => "a5d578b55113e612bf1878d4cc939d61a41318403b5bdf86";
public override string PublicKeyX => "39c62d061d4ee35c5f3f7531de0af3cf918346526edac727";
public override string PublicKeyY => "a5d578b55113e612bf1878d4cc939d61a41318403b5bdf86";
}
4 changes: 2 additions & 2 deletions NPTicket/Verification/ITicketSigningKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ public interface ITicketSigningKey
string HashAlgorithm { get; }
string CurveTable { get; }
TicketSignatureMessageType MessageType { get; }
string CurveX { get; }
string CurveY { get; }
string PublicKeyX { get; }
string PublicKeyY { get; }
}
4 changes: 2 additions & 2 deletions NPTicket/Verification/Keys/PsnSigningKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ public abstract class PsnSigningKey : ITicketSigningKey
public string HashAlgorithm => "SHA-1";
public string CurveTable => "secp192r1";
public TicketSignatureMessageType MessageType => TicketSignatureMessageType.Ticket;
public abstract string CurveX { get; }
public abstract string CurveY { get; }
public abstract string PublicKeyX { get; }
public abstract string PublicKeyY { get; }
}
4 changes: 2 additions & 2 deletions NPTicket/Verification/Keys/RpcnSigningKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ private RpcnSigningKey() {}
public string HashAlgorithm => "SHA-224";
public string CurveTable => "secp224k1";
public TicketSignatureMessageType MessageType => TicketSignatureMessageType.Body;
public string CurveX => "b07bc0f0addb97657e9f389039e8d2b9c97dc2a31d3042e7d0479b93";
public string CurveY => "d81c42b0abdf6c42191a31e31f93342f8f033bd529c2c57fdb5a0a7d";
public string PublicKeyX => "b07bc0f0addb97657e9f389039e8d2b9c97dc2a31d3042e7d0479b93";
public string PublicKeyY => "d81c42b0abdf6c42191a31e31f93342f8f033bd529c2c57fdb5a0a7d";
}
2 changes: 1 addition & 1 deletion NPTicket/Verification/TicketVerifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public TicketVerifier(byte[] ticketData, Ticket ticket, ITicketSigningKey key)

X9ECParameters xParams = ECNamedCurveTable.GetByName(key.CurveTable);
ECDomainParameters domainParams = new(xParams.Curve, xParams.G, xParams.N, xParams.H, xParams.GetSeed());
ECPoint ecPoint = domainParams.Curve.CreatePoint(new BigInteger(key.CurveX, 16), new BigInteger(key.CurveY, 16));
ECPoint ecPoint = domainParams.Curve.CreatePoint(new BigInteger(key.PublicKeyX, 16), new BigInteger(key.PublicKeyY, 16));

ECPublicKeyParameters publicKey = new ECPublicKeyParameters(ecPoint, domainParams);
this._signer = SignerUtilities.GetSigner(key.HashAlgorithm + "withECDSA");
Expand Down

0 comments on commit 5299a44

Please sign in to comment.