0

With regards to Public Key Cryptography, I have been tasked with the problem of attacking some information given in an assignment and discovered a private key used to digitally sign a message.

Known: b=6457627465447259726545623456572345278769729879898923141341234834576924 E=636639191847512969815095201268921757340802323904442331816314803438352146049271931476368280851309606530687971170887811 e=28392183987218362187611 n=2586209689424400825455988397587474553299674868150931056740574331530510902486656504548725769127921248580701626507593549 x=(b^e)* E mod n x=2247676102207626815073883524633387712906791776446694001817826764472164534453199201306883083874653906533041962112997091 z=1073329998123424673279340351490160754917466285560207441443387824222426450994108105554368670865577655836728118040

The problem scenario is as follows:

Alice computes her RSA public key, given by n. Her encryption exponent is e. Nancy sent an encrypted email that is contained in E. Bob wants to know what the message is, so he sends a phony email to Alice asking her to digitally sign it. He picks number b, computes (b^e)*E mod n, and then asks Alice to sign it. From this signing of his number, you are then able to derive the private key Alice used to sign the message.

Message Signing: x ≡ E^d mod n Message Signature Check: x^e ≡ E mod n

To find d, it must be solved for in the following equation:

Z= x ≡ E^d mod n

where Z,x,E,n are known

How do I determine what d is?

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
Matt
  • 19

1 Answers1

3

From the comment of Daniel Lichtblau:

The Mathematica function you are looking for is MultiplicativeOrder. For example, MultiplicativeOrder[555, 77, {4}] gives 8, because $555^8 \equiv 4 \pmod {77}$.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
Oleksandr R.
  • 23,023
  • 4
  • 87
  • 125