cyber_apocalypse_ctf_2021

Cyber Apocalypse | Hyper Metroid

#cyber_apocalypse_ctf_2021 #good_challenges_2021 from secrets import flag def alien_prime(a): p = (a^5 - 1) // (a - 1) assert is_prime(p) return p def encrypt_flag(): e = 2873198723981729878912739 Px = int.from_bytes(flag, 'big') P = C.lif…

Cyber Apocalypse | Tetris 3D

#cyber_apocalypse_ctf_2021 # The flag consists of only uppercase ascii letters # You do have to fix up the flag format yourself import string, hashlib, itertools def clean(x): return ''.join(c for c in x.upper() if c in string.ascii_letter…

CYBER APOCALYPSE CTF 2021 | Super Metroid

#cyber_apocalypse_ctf_2021 from Crypto.Util.number import bytes_to_long, getPrime from secrets import FLAG def gen_key(): from secrets import a,b E1 = EllipticCurve(F, [a,b]) assert E.is_isomorphic(E1) key = - F(1728) * F(4*a)^3 / F(E1.dis…

Cyber Apocalypse 2021 | Little Nightmares

#cyber_apocalypse_ctf_2021 from Crypto.Util.number import getPrime, bytes_to_long from random import randint FLAG = b'CHTB{??????????????????????????????????}' flag = bytes_to_long(FLAG) def keygen(): p, q = getPrime(1024), getPrime(1024) …

CYBER APOCALYPSE CTF 2021 | Forge of Empires

#cyber_apocalypse_ctf_2021 from random import randint from math import gcd from Crypto.Util.number import long_to_bytes, bytes_to_long def gen_keys(): x = randint(1, p-2) y = pow(g, x, p) return (x, y) def sign(message: str, x: int): while…

CYBER APOCALYPSE CTF 2021 | RSA JAM

#cyber_apocalypse_ctf_2021 from Crypto.Util.number import getPrime, inverse import random def main(): print("They want my private key, but it has sentimental value to me. Please help me and send them something different.") p = getPrime(512…

Cyber Apocalypse 2021 | Wii Phit

#cyber_apocalypse_ctf_2021 from Crypto.Util.number import bytes_to_long from secrets import FLAG,p,q N = p**3 * q e = 0x10001 c = pow(bytes_to_long(FLAG),e,N) print(f'Flag: {hex(c)}') # Hint w = 25965460884749769384351428855708318685345170…

Cyber Apocalypse 2021 | Tetris

#cyber_apocalypse_ctf_2021 # The flag consists of only uppercase ascii letters # You do have to fix up the flag format yourself import string, hashlib, itertools def clean(x): return ''.join(c for c in x.upper() if c in string.ascii_letter…