Cryptography

Challenge
Link

Casino (101 solves)

Spring (48 solves)

Order (46 solves)

Casino (101 solves)

Description

Care to test your luck?

nc casino.hsctf.com 1337

Solution

So we need money >= 1000000000 to get the flag. Since we can control nonce and hex we can manipulate the plaintext during the decryption process.

To modify the money (plaintext) which is 0.0, we can use scientific notation to get big number with only 3 bytes values. To modify the money (plaintext) which is 0.0, we can use scientific notation to get big number with only 3 bytes value. Here is the detail of process

Flag : flag{you're_ready_for_vegas_now}

Spring (48 solves)

Description

One day in April, I found these strange numbers, along with a program.

Solution

The program encrypt the image using random number generated by Java.util.Random.nextLong . nextLong is pseudorandom generator and for cracking it i used script provided by https://github.com/Cr4ckC4t/crack-java-prng/blob/main/crack-nextLong.pyarrow-up-right . Here is the full implementation for my solver

Flag : flag{the_season_of_lies}

Order (46 solves)

Description

Python's hash function is not cryptographically secure. I thought I was cool and tried writing my own hash function that was somewhat similar. Sadly, I forgot to store my flag and all I have left is this challenge and the fact that it's output is 1. Can you help me recover the flag?

Solution

From euler's theoremarrow-up-right we know that a^phi = 1 mod n. By using this knowledge we can get phi value from modulus then bruteforcing all possibilities through its divisor then reverse the encryption process. Here is solver i used during competition

Flag : flag{big_numbers_are_bad_numbers}

Last updated