At the moment i have this formula: 13^2 mod 5 = 4
I want to calculate back the 2 here like:
13^X mod 5 = 4
X = ?
I found several formula's/codes to do this online but i didn't find any which do it with a ^ symbol.
Would appreciate some help
My client received everything besides the TEST_PRIVATE so i want to calculate that.
This is the code i use (server sided) (This is the encryption, not the decryption)
string TEST_GENERATED = "13";
string TEST_PRIVATE = "2";
string TEST_PRIME = "5";
BigIntegerTEST TESTMOD_1 = new BigIntegerTEST(TEST_GENERATED, 10);
BigIntegerTEST TESTMOD_2 = new BigIntegerTEST(TEST_PRIVATE, 10);
BigIntegerTEST TESTMOD_3 = new BigIntegerTEST(TEST_PRIME, 10);
BigIntegerTEST TESTMOD_4 = TESTMOD_1.modPow(TESTMOD_2, TESTMOD_3);
So basicly i want to reverse TESTMOD_4 to TESTMOD_2 By only using TESTMOD_4, TESTMOD_3 and TESTMOD_1
(I know modPow usually has 3 parameters i'm using a special class for it)
TDLR; Working example:
(6 + 7) MOD 10 = 3
(3 - 6 + 10) MOD 10 = 7
This is the main result i want: ( I want to retrieve the 7)
(6^7) MOD 10 = 6
? = 7