1. compute prime factors of totient p in form p^k
2. find x modulo p^k (ill show later)
3. chinese remainder thereom!!!!!
4. compute shared key (other ** step3 % modulus)
5. xor and convert to hex then text!!!
tjctf{Ali3ns_1iv3_am0ng_us!}a = 491988559103692092263984889813697016406
msg = 12259991521844666821961395299843462461536060465691388049371797540470
c = [232042342203461569340683568996607232345,76405255723702450233149901853450417505]
at = 1
for i in a0:
at *= phi(i)
print(at)
at0 = [[2**32],[3**15],[5**4],[7**3],[11],[13**2],[17],[19],[23],[29],[37],[53],[79],[109]]
for i in at0:
temp = pow(c[0],at//i[0],a)
for j in range(1,10000):
if pow(pow(5,at//i[0],a),j,a) == temp:
print(j,",",i[0],end = "),(")
break
else:
print(j,"??")def main():
from PIL import Image, ImageFilter
def openshit(filename):
# Open image file
im = Image.open(filename)
print("\n** Analysing image **\n")
# Display image format, size, colour mode
print("Format:", im.format, "\nWidth:", im.width, "\nHeight:", im.height, "\nMode:", im.mode)
# Check if GIF is animated
frames = im.n_frames
print("Number of frames: " + str(frames))
print("\n** Converting image **\n")
alls = []
# Iterate through frames and pixels, top row first
for z in range(frames):
# Go to frame
im.seek(z)
rgb_im = im.convert('RGB')
# print("Frame: ", im.tell())
pixels = list(rgb_im.getdata())
a = int("".join([str(r[0]%2) for r in pixels]),2)
# print("--------------------------------------")
# print(a)
# print("--------------------------------------")
alls.append(a)
return alls
alln = openshit("n.gif")
alle = openshit("e.gif")
allc = openshit("new_c.gif")