cryptohack on Aditya Telangehttps://adityatelange.in/tags/cryptohack/Recent content in cryptohack on Aditya TelangeAditya Telangehttps://adityatelange.in/assets/tn.jpghttps://adityatelange.in/assets/tn.jpgHugo -- 0.122.0en2020 - 2024 Aditya TelangeFri, 20 May 2022 00:00:00 +0530Generalhttps://adityatelange.in/writeups/cryptohack/general/Mon, 01 Jan 0001 00:00:00 +0000https://adityatelange.in/writeups/cryptohack/general/<a href="https://cryptohack.org/challenges/general/">https://cryptohack.org/challenges/general/</a>Mathematicshttps://adityatelange.in/writeups/cryptohack/maths/Mon, 01 Jan 0001 00:00:00 +0000https://adityatelange.in/writeups/cryptohack/maths/<a href="https://cryptohack.org/challenges/maths/">https://cryptohack.org/challenges/maths/</a>Symmetric Ciphershttps://adityatelange.in/writeups/cryptohack/aes/Mon, 01 Jan 0001 00:00:00 +0000https://adityatelange.in/writeups/cryptohack/aes/<a href="https://cryptohack.org/challenges/aes/">https://cryptohack.org/challenges/aes/</a>RSAhttps://adityatelange.in/writeups/cryptohack/rsa/Mon, 01 Jan 0001 00:00:00 +0000https://adityatelange.in/writeups/cryptohack/rsa/<a href="https://cryptohack.org/challenges/rsa/">https://cryptohack.org/challenges/rsa/</a>Diffie-Hellmanhttps://adityatelange.in/writeups/cryptohack/diffie-hellman/Mon, 01 Jan 0001 00:00:00 +0000https://adityatelange.in/writeups/cryptohack/diffie-hellman/<a href="https://cryptohack.org/challenges/diffie-hellman/">https://cryptohack.org/challenges/diffie-hellman/</a>Elliptic Curvehttps://adityatelange.in/writeups/cryptohack/ecc/Mon, 01 Jan 0001 00:00:00 +0000https://adityatelange.in/writeups/cryptohack/ecc/<a href="https://cryptohack.org/challenges/ecc/">https://cryptohack.org/challenges/ecc/</a>Cryptohack - Keyed Permutations [5 pts]https://adityatelange.in/writeups/cryptohack/aes/keyed-permutations/Fri, 20 May 2022 00:00:00 +0530https://adityatelange.in/writeups/cryptohack/aes/keyed-permutations/The Solution is shared considering CAN I SHARE MY SOLUTIONS?
Problem AES, like all good block ciphers, performs a “keyed permutation”. This means that it maps every possible input block to a unique output block, with a key determining which permutation to perform.
A “block” just refers to a fixed number of bits or bytes, which may represent any kind of data. AES processes a block and outputs another block.Cryptohack - Resisting Bruteforce [10 pts]https://adityatelange.in/writeups/cryptohack/aes/resisting-bruteforce/Fri, 20 May 2022 00:00:00 +0530https://adityatelange.in/writeups/cryptohack/aes/resisting-bruteforce/The Solution is shared considering CAN I SHARE MY SOLUTIONS?
Problem If a block cipher is secure, there should be no way for an attacker to distinguish the output of AES from a random permutation of bits. Furthermore, there should be no better way to undo the permutation than simply bruteforcing every possible key. That’s why academics consider a cipher theoretically “broken” if they can find an attack that takes fewer steps to perform than bruteforcing the key, even if that attack is practically infeasible.Cryptohack - RSA Starter 1 [10 pts]https://adityatelange.in/writeups/cryptohack/rsa/rsa-starter-1/Fri, 20 May 2022 00:00:00 +0530https://adityatelange.in/writeups/cryptohack/rsa/rsa-starter-1/The Solution is shared considering CAN I SHARE MY SOLUTIONS?
Problem All operations in RSA involve modular exponentiation.
Modular exponentiation is an operation that is used extensively in cryptography and is normally written like: 210 mod 17
You can think of this as raising some number to a certain power (210 = 1024), and then taking the remainder of the division by some other number (1024 mod 17 = 4).Cryptohack - Base64 [10 pts]https://adityatelange.in/writeups/cryptohack/general/base64/Tue, 03 May 2022 00:00:00 +0530https://adityatelange.in/writeups/cryptohack/general/base64/The Solution is shared considering CAN I SHARE MY SOLUTIONS?
Problem Another common encoding scheme is Base64, which allows us to represent binary data as an ASCII string using 64 characters. One character of a Base64 string encodes 6 bits, and so 4 characters of Base64 encode three 8-bit bytes.
Base64 is most commonly used online, so binary data such as images can be easily included into HTML or CSS files.Cryptohack - Bytes and Big Integers [10 pts]https://adityatelange.in/writeups/cryptohack/general/bytes-and-big-integers/Tue, 03 May 2022 00:00:00 +0530https://adityatelange.in/writeups/cryptohack/general/bytes-and-big-integers/The Solution is shared considering CAN I SHARE MY SOLUTIONS?
Problem Cryptosystems like RSA works on numbers, but messages are made up of characters. How should we convert our messages into numbers so that mathematical operations can be applied?
The most common way is to take the ordinal bytes of the message, convert them into hexadecimal, and concatenate. This can be interpreted as a base-16 number, and also represented in base-10.Cryptohack - Hex [5 pts]https://adityatelange.in/writeups/cryptohack/general/hex/Tue, 03 May 2022 00:00:00 +0530https://adityatelange.in/writeups/cryptohack/general/hex/The Solution is shared considering CAN I SHARE MY SOLUTIONS?
Problem When we encrypt something the resulting ciphertext commonly has bytes which are not printable ASCII characters. If we want to share our encrypted data, it’s common to encode it into something more user-friendly and portable across different systems.
Included below is a flag encoded as a hex string. Decode this back into bytes to get the flag.
63727970746f7b596f755f77696c6c5f62655f776f726b696e675f776974685f6865785f737472696e67735f615f6c6f747dCryptohack- XOR Starter [10 pts]https://adityatelange.in/writeups/cryptohack/general/xor-starter/Tue, 03 May 2022 00:00:00 +0530https://adityatelange.in/writeups/cryptohack/general/xor-starter/The Solution is shared considering CAN I SHARE MY SOLUTIONS?
Problem XOR is a bitwise operator which returns 0 if the bits are the same, and 1 otherwise. In textbooks the XOR operator is denoted by ⊕, but in most challenges and programming languages you will see the caret ^ used instead.
A B Output 0 0 0 0 1 1 1 0 1 1 1 0 For longer binary numbers we XOR bit by bit: 0110 ^ 1010 = 1100.Cryptohack - ASCII [5 pts]https://adityatelange.in/writeups/cryptohack/general/ascii/Thu, 04 Feb 2021 00:00:00 +0530https://adityatelange.in/writeups/cryptohack/general/ascii/The Solution is shared considering CAN I SHARE MY SOLUTIONS?
Problem ASCII is a 7-bit encoding standard which allows the representation of text using the integers 0-127.
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]
Solution Python:Cryptohack - Finding Flags [2 pts]https://adityatelange.in/writeups/cryptohack/introduction/finding-flags/Wed, 03 Feb 2021 00:00:00 +0530https://adityatelange.in/writeups/cryptohack/introduction/finding-flags/The Solution is shared considering CAN I SHARE MY SOLUTIONS?
Problem Each challenge is designed to help introduce you to a new piece of cryptography. Solving a challenge will require you to find a “flag”.
These flags will usually be in the format crypto{y0ur_f1rst_fl4g}. The flag format helps you verify that you found the correct solution.
Try submitting this into the form below to solve your first challenge.
Solution Solution is given in problem XDCryptohack - Great Snakes [3 pts]https://adityatelange.in/writeups/cryptohack/introduction/great-snakes/Wed, 03 Feb 2021 00:00:00 +0530https://adityatelange.in/writeups/cryptohack/introduction/great-snakes/The Solution is shared considering CAN I SHARE MY SOLUTIONS?
Problem Modern cryptography involves code, and code involves coding. CryptoHack provides a good opportunity to sharpen your skills.
Of all modern programming languages, Python 3 stands out as ideal for quickly writing cryptographic scripts and attacks. For more information about why we think Python is so great for this, please see the FAQ.
Run the attached Python script and it will output your flag.Cryptohack - JWT Sessions [10 pts]https://adityatelange.in/writeups/cryptohack/web/jwt-sessions/Wed, 03 Feb 2021 00:00:00 +0530https://adityatelange.in/writeups/cryptohack/web/jwt-sessions/The Solution is shared considering CAN I SHARE MY SOLUTIONS?
Problem The traditional way to store sessions is with session ID cookies. After you login to a website, a session object is created for you on the backend (the server), and your browser (the client) is given a cookie which identifies that object. As you make requests to the site, your browser automatically sends the session ID cookie to the backend server, which uses that ID to find your session in its own memory and thus authorise you to perform actions.Cryptohack - Network Attacks [5 pts]https://adityatelange.in/writeups/cryptohack/introduction/network-attacks/Wed, 03 Feb 2021 00:00:00 +0530https://adityatelange.in/writeups/cryptohack/introduction/network-attacks/The Solution is shared considering CAN I SHARE MY SOLUTIONS?
Problem Several of the challenges are dynamic and require you to talk to our challenge servers over the network. This allows you to perform man-in-the-middle attacks on people trying to communicate, or directly attack a vulnerable service. To keep things consistent, our interactive servers always send and receive JSON objects.
Python makes such network communication easy with the telnetlib module.Cryptohack - Token Appreciation [5 pts]https://adityatelange.in/writeups/cryptohack/web/token-appreciation/Wed, 03 Feb 2021 00:00:00 +0530https://adityatelange.in/writeups/cryptohack/web/token-appreciation/The Solution is shared considering CAN I SHARE MY SOLUTIONS?
Problem JavaScript Object Signing and Encryption (JOSE) is a framework specifying ways to securely transmit information on the internet. It’s most well-known for JSON Web Tokens (JWTs), which are used to authorise yourself on a website or application. JWTs typically do this by storing your “login session” in your browser after you have authenticated yourself by entering your username and password.