Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
YouTube Security VideosGoogle Chrome: Unfinished Projects: Solange’s Public Sculpture(21.09.2026 um 17:02 Uhr)
Windows Tipps & SecurityBlurry or pixelated video in Microsoft Teams(21.09.2026 um 14:34 Uhr)
Sicherheitslücken (CVE)USN-8791-1: Ghostscript vulnerability(21.09.2026 um 14:51 Uhr)
Sicherheitslücken (CVE)USN-8792-1: Memcached vulnerability(21.09.2026 um 15:02 Uhr)
Sichere ProgrammierungI stopped rewriting the same Electron boilerplate — so I packaged it(21.09.2026 um 17:28 Uhr)
YouTube Security VideosGoogle Chrome: Unfinished Projects: Solange’s Public Sculpture(21.09.2026 um 17:02 Uhr)
Windows Tipps & SecurityBlurry or pixelated video in Microsoft Teams(21.09.2026 um 14:34 Uhr)
Sicherheitslücken (CVE)USN-8791-1: Ghostscript vulnerability(21.09.2026 um 14:51 Uhr)
Sicherheitslücken (CVE)USN-8792-1: Memcached vulnerability(21.09.2026 um 15:02 Uhr)
Sichere ProgrammierungI stopped rewriting the same Electron boilerplate — so I packaged it(21.09.2026 um 17:28 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

BYUCTF RSA Dreams Cybersecurity Writeup 2026

Let’s solve this RSA cryptography challenge together!Challenge Analysis:We are given the output file and code:c = 50…

0
↗ Quelle (infosecwriteups.com)
Reagiere als Erste:r — dein Feedback zählt!

Let’s solve this RSA cryptography challenge together!

BYUCTF 2026 cryptography RSA writeup

Challenge Analysis:

We are given the output file and code:

c = 5074616349947930347771128443869249667723941019037011379843932659330729580197593522845748676276068149443504037403162962894625104017380398816152166168830833
n = 6452268004013779272669102227661703532150635430524568657091997086066784917218113937677647594597481724133073200003104968955173212323278046973034541033497147
e = 65537
hint = 161697499284577475400347684012866511237569864647822807778480533925514941939388
from Crypto.Util.number import getPrime
from Crypto.Util.number import bytes_to_long

flag = b"REDACTED"

p = getPrime(256)
q = getPrime(256)
n = p*q
hint = p + q
e = 0x10001

c = pow(bytes_to_long(flag), e, n)

print(f"c = {c}")
print(f"n = {n}")
print(f"e = {e}")
print(f"hint = {hint}")

The variable “hint” is composed of p and q being added. Since this is RSA, we also know that we need p and q to be multiplied in order to get the value of n. Luckily, we have the value of n; so we can plug these numbers into an equation to find p and q.

But before we get to the decryption, let’s understand how RSA works.

RSA Encryption:

RSA is an asymmetric encryption where two keys are used (a private and public key). It is secure because RSA uses the mathematical difficulty of factoring very big problems.

Key Terms:

  • Prime numbers: Numbers that can be divided by itself and one.
  • Modulo (mod): It finds the remainder after dividing it one number by another.
  • Euler’s Totient Function(ϕ): If n is the product of two primes (p and q), then ϕ(n)=(p−1)(q−1). For instance, ϕ(91) = (7−1)(13−1) = (6)(12) = 72.
  • Coprime: Two numbers are coprime if their GCD is 1. For instance, 8 and 15 are coprime. Factors of 8: 1,2,4,8. Factors of 15: 1,3,5,15. The greatest common factor they both share is 1.
  • Modular Inverse: Given numbers a and m, the modular inverse of a is a number b such that: (a×b) mod m=1. For instance: The modular inverse of 3 mod 11 is 4, since (3×4) mod 11 = 12 mod 11 = 1.

RSA is encrypted by:

p = 61 
q = 53

// Now we will multiply the primes
n = p x q
n = 61×53 = 3233

// Now we will calculate Euler's Totient Function
ϕ(n) = (p−1)(q−1)
ϕ(3233)=(61−1)(53−1)=60×52=3120

// Now we have to find a public exponent
// "e", in such that 1 < e < φ(n), is coprime with ϕ(n), are
// commonly chosen as a small prime (like 3, 5, 17, 257, 65537):
e = 17

// Now we will calculate the private exponent d
d × e = 1(modϕ(n))
d × 17 = 1(mod3120) /*3120 found from step 3 */

d = 2753

// Lastly, we will encrypt this by doing:
C = plaintext^e (mod n)

Now we understand how RSA works, so let’s solve this challenge!

Decryption:

In order to decrypt this RSA, we need to find the values of p and q.

We know:

 n = p * q 
and
hint = p + q

So we will do the equation: x² + hintx + n. The positive and negative values of x resemble the values of p and q.

Now, we can plug the values into the code shown below.

# RSA.py
from Crypto.Util.number import inverse, long_to_bytes

n = 6452268004013779272669102227661703532150635430524568657091997086066784917218113937677647594597481724133073200003104968955173212323278046973034541033497147
e = 65537
c = 5074616349947930347771128443869249667723941019037011379843932659330729580197593522845748676276068149443504037403162962894625104017380398816152166168830833

p = 71669843677648724047578634482796162927151697026318521175318409958080978797761
q = 90027655606928751352769049530070348310418167621504286603162123967433963141627

phi = (p - 1) * (q - 1)
d = inverse(e, phi)

# To decrypt: c^d mod n = m
m = pow(c, d, n)
print(long_to_bytes(m))

We got the flag 🥳: byuctf{great_job_recovering_the_flag}

If you want to learn more about cybersecurity, check out one of my articles about Google Dorking! https://medium.com/bugbountywriteup/12-must-know-google-dorking-commands-in-2026-9c8538c313c9


BYUCTF RSA Dreams Cybersecurity Writeup 2026 was originally published in InfoSec Write-ups on Medium, where people are continuing the conversation by highlighting and responding to this story.

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-94393 | When a user creates or edits a report inside an event, MISP can identify…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick