File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/test/java/com/thealgorithms/ciphers Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -64,13 +64,13 @@ void testDecryptWithKnownValues() {
64
64
ECC .EllipticCurve curve = new ECC .EllipticCurve (a , b , p , basePoint );
65
65
66
66
// 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 };
70
70
71
71
// 5. Create an ECC instance and set the private key and curve parameters
72
72
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
74
74
75
75
// 6. Decrypt the known ciphertext
76
76
String decryptedMessage = ecc .decrypt (cipherText );
You can’t perform that action at this time.
0 commit comments