Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save vijayanandrp/d2cbeb50609bd7df9e8d7382a8bc290a to your computer and use it in GitHub Desktop.

Select an option

Save vijayanandrp/d2cbeb50609bd7df9e8d7382a8bc290a to your computer and use it in GitHub Desktop.
Write up for InCTF 2014 - Crypto 200 - Solved RSA 4096 bit using low public exponent attack
11657667992152384389168970007935564620544078223989911116124095315088239681126594015781938080477630692915497593321366093615015306163688656393156198882654127506116466608834490674480387607410167266362059980939450825093071957288196553216860521023077321644076523737128658172831409622651074862
Never use a small public exponent in RSA keys. The recommended exponent is 65537. The key for this level is weakrsakey.
"""
ciphertext = pow(plaintext, 3) % modulus
# 'ciphertext' is the remainder, so all we need to know to take the cubic root is the quotient 'k'
ciphertext + modulus * k = pow(plaintext, 3)
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment