from Cryptodome.Util.number import bytes_to_long, long_to_bytes
from mpmath import mp, cos, sin, mpf
import random

mp.dps = 1000

flag = "" #REMOVED
flag_bytes = flag.encode()

a = bytes_to_long(flag_bytes[:len(flag_bytes)//2])
b = bytes_to_long(flag_bytes[len(flag_bytes)//2:])


rand_float = random.uniform(0, 2 * 3.141592653589793)
x = mpf(str(rand_float))  

print("Random x:", x)

enc = a * cos(x) + b * sin(x)
print("Encrypted", enc)

#Random x: 0.2833522193627857
#Encrypted 176094395723845949974648834766299637737704134798426295574300.3643376670717906835438073429375813800254251645628662873244520934344856132247969508179912857780146620559417001346282796968716875028648861896632413693302206359281144825722950513787468552177665198143999385526120716850270838536190075509278487964672286858392764013583919355618202346469086997976459468363826684361552701495215313367084121426360303883748281156800269213750354470033347893924067725271876170608637165070168106925740813353280762495832039682169146645086272656169969788919798659417776870807441609061978628537478895104736611525727605060599126617790218518380531512734340864606634905551222015370688128513829636315187737842223137745318963238384024900255337164334625135723551844850914514592518569431588295727812721160261157893690067899751085435888567531362407353509155684892791022334012325387260912395673363523139878909547645340665760623892141013395227979426049649209518530718486623833744694052945050527916538748393307375441872420881676758075
