← Back to Writeups
CUSTOMEasyCrypto

Bread 1 — RSA Decryption

XESXOR9/2/20261 min read
#crypto#custom#easy#rsa_basic_decryption

Bread 1 — RSA Decryption

Platform: CUSTOM | Category: Crypto | Type: Challenge | Difficulty: Easy | OS: N/A | **Author: XESXOR Techniques: rsa_basic_decryption

Summary

Walkthrough of the CUSTOM Crypto Bread 1 — RSA Decryption. Task: Given RSA parameters n, d, c. Solution: Standard RSA decryption using m = pow(c, d, n) since private exponent is already provided.

Description

Given n, d, c — decrypt the message. Standard RSA decryption.

Analysis

Standard RSA decryption: m = c^d mod n. The private exponent d is already given, just apply the formula.

Solution

python
#!/usr/bin/env python3
from Crypto.Util.number import long_to_bytes

# Parameters from the task
n = ...  # modulus
d = ...  # private exponent
c = ...  # ciphertext

# Decrypt
m = pow(c, d, n)

# Convert to bytes
flag = long_to_bytes(m)
print(flag.decode())
# Output: spbctf{REDACTED}

‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

Key Takeaways / Lessons

  • Mastering rsa_basic_decryption was key to this challenge.
  • Always check for common misconfigurations and verify assumptions.

Crafted by XESXOR Research • 2026-03-08 • CUSTOM • Bread 1 — RSA Decryption • Difficulty: Easy