RSAcrack[cipher, n, e]
ClearAll["`*"]
p = 12131072439211271897323671531612440428472427633701410925634549312301964373042085619324197365322416866541017057361365214171711713797974299334871062829803541;
q = 12027524255478748885956220793734512128733387803682075433653899983955179850988797899869146900809131611153346817050832096022160146366346391812470987105415233;
n = p*q;
e = 65537;
[Phi] = (p - 1)*(q - 1);
d = PowerMod[e, -1, [Phi]];
message1 =
"Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it. And to make matters worse: complexity sells better. Edsger Dijkstra";
c = ascii = ToCharacterCode[message1]
c = Row[DeleteCases[
First[Row[{83, 105, 109, 112, 108, 105, 99, 105, 116, 121, 32, 105, 115,
32, 97, 32, 103, 114, 101, 97, 116, 32, 118, 105, 114, 116, 117, 101,
32, 98, 117, 116, 32, 105, 116, 32, 114, 101, 113, 117, 105, 114, 101,
115, 32, 104, 97, 114, 100, 32, 119, 111, 114, 107, 32, 116, 111, 32,
97, 99, 104, 105, 101, 118, 101, 32, 105, 116, 32, 97, 110, 100, 32,
101, 100, 117, 99, 97, 116, 105, 111, 110, 32, 116, 111, 32, 97, 112,
112, 114, 101, 99, 105, 97, 116, 101, 32, 105, 116, 46, 32, 65, 110,
100, 32, 116, 111, 32, 109, 97, 107, 101, 32, 109, 97, 116, 116, 101,
114, 115, 32, 119, 111, 114, 115, 101, 58, 32, 99, 111, 109, 112, 108,
101, 120, 105, 116, 121, 32, 115, 101, 108, 108, 115, 32, 98, 101, 116,
116, 101, 114, 46, 32, 69, 100, 115, 103, 101, 114, 32, 68, 105, 106,
107, 115, 116, 114, 97}]], ","]]
c^e mod n
This is what i have so far. I get the ascii numbers from the output of the last line in the code. But i want them in a matrix table so that I can send it away for someone to try an decrypt it. How do I do this?
[Phi]
which should be\[Phi]
, andc^e mod n
at the end which is not Mathematica syntax. Could you please clarify what you mean by matrix table. If you want your output in a grid, maybe you should provide a nested list toGrid
. Also yourDeleteCases
is wrong - you're deleting the string ",". $\endgroup$