"C" for "CTF" and "C" for Cryptography
BSides Noida Cyber Security Conferences (August 14-15, 2021)
Last updated
Was this helpful?
BSides Noida Cyber Security Conferences (August 14-15, 2021)
Last updated
Was this helpful?
Originally published at https://bsidesnoida.in/crypto.html (Although the site is currently down, you can still read the article here)
Before starting, I'm assuming you have searched about these two questions at some point in time :
"What is cryptography?"
"Where do we use it and why?
I'm sure you've gone through some theory parts while reading the answers, so let's move to the fun part rather than the usual theory here!
Have you heard the story of Doge, Isabelle, and Karen? It's something like this...
One day Isabelle sent a message to Doge asking him for some financial help. She clearly mentioned the amount to be $500 and she also mentioned that she would return the amount as soon as possible.
After receiving the message Doge was shocked to see the amount to be $5,000,000.
Now that they know the importance of secure communication, they decided to encrypt their messages while sending and decrypt them while receiving. They have one key each for doing this job.
Doge asks Isabelle for some business papers and mentions the time to be exactly 5 PM. Isabelle received the message and it was written that she should meet him at 4 PM.
The difficulty level of the challenges in a good CTF varies from complete beginner to hard/insane which touches lots of domains in this category.
My advice for a complete beginner would be:
Look at every challenge because each one is unique in its own way. Then decide which you can solve fast and keep the heavy researching part for the hard challenges.
Try to search the keywords related to the challenge to find the related resources.
Go through the writeups of past CTFs and you might find something valuable if not, you just read a valuable writeup and learned something new.
There are many available tools to make your life easy while solving CTF Challenges. Some basics tools are:
Any programing language in which you prefer to write your scripts. ( I prefer python3 for the availability of lots of modules and it's easy to use)
Some python3 packages that I use:
pycryptodome
labmath
numpy
sympy
gmpy or gmpy2
( install these first libgmp3-dev libmpc-dev
)
pwntools
(optional - for remote interaction only)
Sagemath
Now, let's jump to some basics and get our hands dirty with the implementation of everything we learn. I'll be using python3
for most of them but you can choose anything you prefer.
Some theory part: https://en.wikipedia.org/wiki/Radix
Python3 implementations:
Along with this, sometimes we might have to work with other base systems. Let's take a look at them.
Base32 - https://en.wikipedia.org/wiki/Base32
Base64 - https://en.wikipedia.org/wiki/Base64
Python3 implementations:
PS: There are many other base systems but we rarely use them.
Thanks for reading! Feel free to reach out on any of the social platforms given below.
The next topic will be #Classical Cryptosystems
Stay tuned! Stay Safe!
Author - Rey (CTF Player @DarkArmy) Discord - rey#7813 Twitter - https://twitter.com/r3yc0n1c Github - https://github.com/r3yc0n1c LinkedIn - https://www.linkedin.com/in/raja-majumdar
You can guess the ciphers very well.
You were born to decrypt things.
You think you know the Encryption.
You are from a Mathematician Family/you love maths.
You can cry a lot when the challenge is hard/your script fails every time.
Sometimes Reverse engineers ask for your help and you feel like a "Crypto God".
It's fun to do. You learn something new when you fail.
Smooth Brain.
Enough Sleep.