10-26-2024, 06:24 AM
anyone got the ones for crypto? this the only challenges im really struggling with, i have all other challenges
|
HAckTheBoo 24
by Computerlab - Thursday October 24, 2024 at 01:34 PM
|
|
10-26-2024, 06:24 AM
anyone got the ones for crypto? this the only challenges im really struggling with, i have all other challenges
10-26-2024, 10:10 AM
Use this script for crypto Binary Basis
from Crypto.Util.number import long_to_bytes, inverse
from math import prod
prime_list = [177433995632585646643938770425036805593,201248411415496041161608451182478476651,211565639988646066084516543793152198691,219876124958933231098612850322526589449,231064506115305357425020635842612539447,234412327930918375982208973121051256703,237698251138254651570085824926169468373,257625975719126301912858129201276787967,271852097809552507680385772555572662251,275659373105708586943140025923053203649,287388491685355701504000759461314948007,299880188984019031026827249219116473077,301666687585301891299278182740559644813,307618172470874661743505812942878894883,324591622192086196189873735246561229599,328590850013220519307624591674287922827]
n = prod(prime_list)
e = 0x10001
c = 258206881010783673911167466000280032795683256029763436680006622591510588918759130811946207631182438160709738478509009433281405324151571687747659548241818716696653056289850196958534459294164815332592660911913191207071388553888518272867349215700683577256834382234245920425864363336747159543998275474563924447347966831125304800467864963035047640304142347346869249672601692570499205877959815675295744402001770941573132409180803840430795486050521073880320327660906807950574784085077258320130967850657530500427937063971092564603795987017558962071435702640860939625245936551953348307195766440430944812377541224555649965224
# Step 1: Calculate phi(n)
phi_n = prod([p - 1 for p in prime_list])
# Step 2: Calculate d, the modular inverse of e mod phi(n)
d = inverse(e, phi_n)
# Step 3: Decrypt the message
m = pow(c, d, n)
decrypted_message = long_to_bytes(m)
print("Decrypted Message:", decrypted_message.decode())
10-27-2024, 10:50 PM
(10-25-2024, 02:05 PM)junkman96 Wrote:(10-25-2024, 01:54 PM)R0B1NH00D_ORG Wrote:(10-25-2024, 01:45 PM)junkman96 Wrote:(10-25-2024, 01:27 PM)Hhhgg Wrote: Can anyone help me on reversing linkhands Thank you for the advice! Ghidra has been an adjustment lol to say the least. I miss x64debug (over ida) . but im hardly on windows anymore unless i have to be lol. |
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| Hacktheboo Flag thread | 0 | 1,659 |
10-27-2023, 09:31 AM Last Post: |
||