dawgctf 2025
Team : NICP

The Birds
Cryptography
Baby Rsa 1
Cryptography
Baby Rsa 2
Cryptography
Cantor's Pairadox
Cryptography
Guess Me If You Can
Cryptography
This Pokemon team Is my Roman Empire
Cryptography
Jokesmith
Cryptography
The MAC FAC
Cryptography
The Fractalist
Cryptography
Baby Rsa 2
If all I have to do is keep my factors p and q secret, then I can save computation time by sharing the same modulus between all my friends. I'll give them unique e and d pairs to encrypt and decrypt messages. Sounds secure to me!
we were tasked to find the d we were given the epub and dpub which e is a small prime and d is the inverse of e so
epub . dpub = 1 mod phi
epub . dpub - 1 = k . phi
phi = (epub . dpub - 1)/k
phi = N - (p+q) + 1
p + q = N + 1 - phi
we can use the identity (p - q)^2 = (p + q)^2 - 4pq
p - q = sqrt((p + q)^2 - 4pq)
2p = (p + q) + (p - q)
p = ((N + 1 - phi) + sqrt((p + q)^2 - 4pq))/2
2q = (p + q) - (p - q)
q = ((N + 1 - phi) - sqrt((p + q)^2 - 4pq))/2

Cantor's Pairadox
Now that I have encrypted my flag with a new math function I was just researching I can know share it with my friend Cantor and no one will know how to read it except us!
"ABC" = [65 66 67]
then we pad the arr with 0 until the size is the power of 2
[65 66 67 0]
then it will combine the numbers in pairs
pair(a, b) = T(a + b) + b
example S = 65 + 66 = 131 T(131) = (131 * 132)/2 = 8646 so pair(65, 66) = 8646 + 66 = 8712
after 6 iterations it will become a single number
remember that
P = T(S) + b
so b = P - T(S)
S = a + b
so a = S - b
T(S) = S^2 / 2 respectively
so S^2 + S - 2P should be 0
we can use the quadratic to find
S = (sqrt(1 + 8P) - 1)/2

Guess Me If You Can
Check out the note-taking app I created! I heard users are really bad at picking passwords, so I made a really really secure number generator to give users passwords! Good luck trying to break it now.
the server uses a LCG password generator
where
the flaw is that it was using a weak pseudo random (LCG) for the password generation where LCG itself is predictable if we can observe several consecutive outputs
strategy
gather 3 LCG outputs like so
then we can calculate the parameters
t1 = (s2 - s1) % N t2 = (s3 - s2) % N
we can calculate the a
inv_t1 = pow(t1, -1, N) # Modular inverse of t1 a = (t2 * inv_t1) % N
then b = (s2 - a * s1) % N
inv_a = pow(a, -1, N)
admin = ((s1 - b) * inv_a) % N

This Pokemon team Is my Roman Empire
I was on a really sleep deprived tumble, so I decided to hide the key string to my bank account in a Pokemon Team. I know nothing about Pokemon, so I asked a friend and he said the movesets "looked really weird". Can you help find my key string? It should consist of unseparated letters, and be in all caps.

from the website it says the pokemon skills is weird thats problably a hint and the chall called roman empire is also a hint
every first letter of the skill then do a caesar bruteforce to gain the text but every pokemon has a different shift so we have to do it one by one
Last updated





