What is cryptography?
You might have heard about cryptography or encrypted messages in WhatsApp or anything else. But how does it actually work?
Cryptography is quite simple. But you need to understand cryptography under the hood before you really understand how it works. You got multiple explanations about how cryptography works. Most of them explain you got a private key and the other person also does and that's how it works. Is not a great explanation because it’s still “magic” and you still don't understand what happens.
The basics
Let’s learn about what cryptography does under the hood! Cryptography is just a simple math formula. Let's start with the basics of this formula:
You use mod, also known as the % symbol. This means if you want to fit the right value as many times as you can completely in the left value and what is left over is your answer.
Example:
27 % 10 = 7
27 % 20 = 7
27 % 5 = 2
27 % 16 = 11
27 % 8 = 3
How to use it
Let's use it for cryptography!!
We will square the first number by X. X is your password! Let's have a look at an example!
Let's say Kim and Kevin want to use cryptography for sending a love message that no one must know about. The first thing they do is solve the formula with their password:
Kim: (With her password 4 )
Kevin: (With his password is 3 )
Awesome!
Okay both got an answer to their formula:
Kim: 18
Kevin: 6
And now it will get exciting!! Kim will send her answer 18 to Kevin and Kevin will send his answer 6 to Kim.
Both will now do eachothers answer squared by their own password.
Kim: (Using Kevin his answer 6 )
Kevin: (Using Kim her answer 18 )
Both of them got 15 what a coincidence! Well actually... It's not! This is their shared password! If you're a third person and you would manage to capture both of them their answers it's impossible to get to 15 because you need their own personal password to do so!
How to send encrypted messages
They can now encrypt their love message. Ecrypting messages is just shuffling the letters so no one knows what it is.
Kevin will send Kim:
I Love you!
Encryped by 15 will be:
NpBpWEM7JBJOIBSaiOUPQg
Kim can now unlock this NpBpWEM7JBJOIBSaiOUPQg with the password 15 than it will return I Love you!
How is this Secure?
That's great but 15 is pretty easy to guess...
Yep that's because our mod or % number is 21. It could never be 21 or higher because when we fit the number in 21 we end up with a maximum rest value of 20. But when we use a different number something like: 1.000.000.000.000.000.000.000.000.000.000 the number could be anything and would be pretty hard to guess. You can make this number as long as you want to gain more security for your shared password!
That's all!
Thank you for reading this post! I hope you learned something today!
Let me know in the comments below if you understand it and if it helped you out, if you don't understand it. Let me know what you struggle with. I would be happy to help out and improve this article!
✅ @jorben, I gave you an upvote on your first post! Please give me a follow and I will give you a follow in return!
Please also take a moment to read this post regarding bad behavior on Steemit.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit