Skip to content

Commit a6acec8

Browse files
committed
Update ECCTest.java
1 parent d6090a5 commit a6acec8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/java/com/thealgorithms/ciphers/ECCTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ void testDecryptWithKnownValues() {
6464
ECC.EllipticCurve curve = new ECC.EllipticCurve(a, b, p, basePoint);
6565

6666
// 4. Define the known ciphertext containing two ECPoints (R, S)
67-
ECC.ECPoint R = new ECC.ECPoint(new BigInteger("103077584019003058745849614420912636617007257617156724481937620119667345237687"), new BigInteger("68193862907937248121971710522760893811582068323088661566426323952783362061817"));
68-
ECC.ECPoint S = new ECC.ECPoint(new BigInteger("31932232426664380635434632300383525435115368414929679432313910646436992147798"), new BigInteger("77299754382292904069123203569944908076819220797512755280123348910207308129766"));
69-
ECC.ECPoint[] cipherText = new ECC.ECPoint[] {R, S};
67+
ECC.ECPoint rPoint = new ECC.ECPoint(new BigInteger("103077584019003058745849614420912636617007257617156724481937620119667345237687"), new BigInteger("68193862907937248121971710522760893811582068323088661566426323952783362061817"));
68+
ECC.ECPoint sPoint = new ECC.ECPoint(new BigInteger("31932232426664380635434632300383525435115368414929679432313910646436992147798"), new BigInteger("77299754382292904069123203569944908076819220797512755280123348910207308129766"));
69+
ECC.ECPoint[] cipherText = new ECC.ECPoint[] {rPoint, sPoint};
7070

7171
// 5. Create an ECC instance and set the private key and curve parameters
7272
ecc.setPrivateKey(knownPrivateKey); // Use setter method to set the private key
73-
ecc.setCurve(curve);// Use setter method to set the elliptic curve
73+
ecc.setCurve(curve); // Use setter method to set the elliptic curve
7474

7575
// 6. Decrypt the known ciphertext
7676
String decryptedMessage = ecc.decrypt(cipherText);

0 commit comments

Comments
 (0)