Given that the encryption standard used is double RSA(the ciphertext is: (message.modpow(publicKey, p1 * p2)).modpow(publicKey, p1 * p2)
and that:
Prime1: 674449898029343324125960129133546398445125248717227189998338836783749268316413874740981320946394895958236124946 6543851799181419398634666415720501042963439
Prime2: 7399242666256222901758159458924085668213750831886997251154683823178450493770217795394523647215822445235626521227 175898733431769288278973766158509318240987
Public key: 256112118095161323042115893555881913125629750852196125735323701395646157334486733585297926242410415964844054150772 80942879367081987594548286248076221422382553854553641938680588196852210279319435539974962399870256652476447043 613041280228303364831412960922600050744288703260423917496698951898392551430899733471
BitLength: 1024
Decrypt the message(converted from string to byte array to number): 23392616345555313605919167058644699120876025356161555809878654111923815810333435486107302640167526508195510207553 020347927571834118867368930145349608665245242658400060659182084710747843682293187303114663413862533201735882997 013110042926297727429690462831240065112067037916859821064295439236630706338604397539
The decrypted text should contain: "Type the following number as answer: (type this 4-digit number)."
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Since we know that the public key(call it e) is 256112118...., the private key is simply publicKey.modInverse(euler's totient function of (p * q)). Private Key: 241099571348380347560930789816789335374739804197650008476275058186473634017679324068656900645741025815772782554941083952347468992142929658 8987762196086344097126564481180543184085456849284915490456274428765928978720539554588055122363864882658479332863933450964277770421643534 966367482868657273129471917586675.
We know that the ciphertext was encrypted twice using: message.modPow(publicKey, p1 p2).modPow(publicKey, p1 p2), so we need to "decrypt" it twice using: cipherText.modPow(privateKey, p1 p2).modPow(privateKey, p1 p2).
Thus, we get: 180436161883203116951344620698953437415119327943762475837025298219289260780175534445659668291859512, which can be converted into a byte array and back into the original message.
Byte Array of Message: [84, 121, 112, 101, 32, 116, 104, 101, 32, 102, 111, 108, 108, 111, 119, 105, 110, 103, 32, 110, 117, 109, 98, 101, 114, 32, 97, 115, 32, 97, 110, 115, 119, 101, 114, 58, 32, 49, 57, 52, 56]
You can paste the array above into a converter online like this one: https://onlineutf8tools.com/convert-bytes-to-utf8 converter to get the answer.
Message from byte array: "Type the following number as answer: 1948"