Skip to content

Commit 5efd62a

Browse files
thebenternCopilot
andauthored
Update Meshtastic/Crypto/XEdDSASigning.cs
Co-authored-by: Copilot <[email protected]>
1 parent 3e1ad7e commit 5efd62a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Meshtastic/Crypto/XEdDSASigning.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ public static byte[] ConvertX25519PublicKeyToEd25519(byte[] x25519PublicKey)
9797
// See: https://tools.ietf.org/html/rfc7748#section-5
9898

9999
// Curve25519 prime: 2^255 - 19
100-
BigInteger p = Ed25519FieldElement.Q;
100+
// Ed25519 field prime: 2^255 - 19
101+
BigInteger p = BigInteger.ValueOf(2).Pow(255).Subtract(BigInteger.ValueOf(19));
101102

102103
// Interpret the X25519 public key as a little-endian integer u
103104
byte[] uBytes = new byte[32];

0 commit comments

Comments
 (0)