Introduction to CryptoHack

ASCII

Using the below integer array, convert the numbers to their corresponding ASCII characters to obtain a flag. [99, 114, 121, 112, 116, 111, 123, 65, 83, 67, 73, 73, 95, 112, 114, 49, 110, 116, 52, 98, 108, 51, 125]

data = [99, 114, 121, 112, 116, 111, 123, 65, 83, 67, 73, 73, 95, 112, 114, 49, 110, 116, 52, 98, 108, 51, 125]

print(''.join(chr(i) for i in data))

Hex

Included below is a flag encoded as a hex string. Decode this back into bytes to get the flag. 63727970746f7b596f755f77696c6c5f62655f776f726b696e675f776974685f6865785f737472696e67735f615f6c6f747d

data = "63727970746f7b596f755f77696c6c5f62655f776f726b696e675f776974685f6865785f737472696e67735f615f6c6f747d"

print(bytes.fromhex(data))

Base64

Take the below hex string, decode it into bytes and then encode it into Base64. 72bca9b68fc16ac7beeb8f849dca1d8a783e8acf9679bf9269f7bf

import base64

data = "72bca9b68fc16ac7beeb8f849dca1d8a783e8acf9679bf9269f7bf"

print(base64.b64encode(bytes.fromhex(data)))

Bytes and Big Integers

Convert the following integer back into a message: 11515195063862318899931685488813747395775516287289682636499965282714637259206269


XOR Starter

Given the string label, XOR each character with the integer 13. Convert these integers back to a string and submit the flag as crypto{new_string}

With PwnTools

Without PwnTools


XOR Properties

Below is a series of outputs where three random keys have been XOR'd together and with the flag. Use the above properties to undo the encryption in the final line to obtain the flag.

Before you XOR these objects, be sure to decode from hex to bytes.

With PwnTools

Without PwnTools


Favourite Byte

I've hidden some data using XOR with a single byte, but that byte is a secret. Don't forget to decode from hex first. 73626960647f6b206821204f21254f7d694f7624662065622127234f726927756d

With PwnTools

Without PwnTools


You either know, XOR you don't

I've encrypted the flag with my secret key, you'll never be able to guess it.

0e0b213f26041e480b26217f27342e175d0e070a3c5b103e2526217f27342e175d0e077e263451150104

With PwnTools

Without PwnTools

Last updated

Was this helpful?