PicoCTF-2022 Writeup
  • README
  • Binary Exploitation
    • buffer overflow 1
    • buffer overflow 2
    • buffer overflow 3
    • flag leak
    • function overwrite
    • ropfu
    • stack cache
    • x-sixty-what
  • Cryptography
    • basic-mod1
    • basic-mod2
    • diffie-hellman
    • morse-code
    • NSA Backdoor
    • Sequences
    • substitution
    • Sum-O-Primes
    • Very Smooth
  • Forensics
    • Operation Oni
    • Operation Orchid
    • SideChannel
    • St3g0
    • Torrent Analyze
  • Reverse Engineering
    • Bbbbloat
    • Keygenme
    • unpackme
    • Wizardlike
  • Web Exploitation
    • Forbidden Paths
    • noted
    • Roboto Sans
    • SQLiLite
Powered by GitBook
On this page
  • Challenge
  • Solution
  • Flag

Was this helpful?

Edit on GitHub
  1. Cryptography

Very Smooth

PreviousSum-O-PrimesNextOperation Oni

Last updated 3 years ago

Was this helpful?

Challenge

Forget safe primes... Here, we like to live life dangerously... >:)

Solution

  1. Searching online for "pollard smooth prime" finds .

  2. Using with the pollard_p_1 attack by running python RsaCtfTool.py --uncipher [c] -e 65537 -n [n] --attack pollard_p_1 doesn't work since it doesn't try enough primes (). So, we adapt their script to create the solution , which tries 7000 primes.

  3. Interestingly, this prime is in factordb so will print the flag immediately when using the factordb attack.

Flag

picoCTF{376ebfe7}

gen.py
output.txt
Pollard's p − 1 algorithm
RsaCtfTool
relevant source code
script.py
RsaCtfTool