How does encryption work?

276 views

How can the chats between two devices be encrypted without them sharing the same key through the server.

In: 3

6 Answers

Anonymous 0 Comments

Encryption tends to have two “keys”, one to encrypt, one do decrypt. Both are necessary for the process by design. So, if you want to receive an encrypted message, you hand someone your encryption key, and they can send you messages with that encryption. Meanwhile, you keep the decryption key for yourself, so no one else has it. These messages are now messages *only you* can read.

If you send them messages, you grab their encryption key, encrypt the message with it, and send it to them so they can use their own personal decryption key.

That’s the basic concept. Everything beyond that is working out the specifics of handling key generation / message handling / 3rd party interactions / etc. But the core principle remains the same usually.

Anonymous 0 Comments

imagine you want to send a package to friend without anyone being able to know what it is. if you just send it the mail man could open it.

to avoid that you put it in a box and lock it. but its not a normal lock its a special lock. it has a keypad and two codes. the special part is, that if you use one of those codes to lock it the other code has to be used to open it. both can be used to lock and unlock it, but you always need the other one to do the oposite.

now. you and your friend have thoses locks. in order for the other person to send you stuff you need to publish one of these codes. so you find a thrusted person and tell them one of your codes. this code is then called the public key. the other code you keep private. therfore its called the private key.

now everything is set up for the secure pakage. you get the public key from you friend and use it to lock the box shut. because everyone only knows the public key, noone is able to unlock it again. when your friend recieves the box he can unlock it with his private key.

this is the basic idea of asymetric encryption. there are a few more things you can do. for exaple if you want to prove to your friend that you send the box, you can add a second lock on it that you close with your private key. if your friend can open it with your public key, he knows that you send it.

the only big problem with this tecnology is that its slow. imagine the lock taking a few minutes to open or close. for a fast comunication its not good. so usally you only do the first comunication with this and send a key to a normal lock

Anonymous 0 Comments

Here’s an example of the sort of mathematics we use. Just to be clear, this is an extremely simplified example that’s no good for encryption.

First we need a key pair. Any 2 numbers that have a result ending in 1 when you multiply them. Let’s choose 7 and 3 which make 21 when multiplied together. 7 is our key. 3 is the private key for the receiver

Now, take a number. Any number between 1 and 9. Lets pick 4.

We multiply by 7 (our public key) to get 28 and throw away the 10s digit to get 8.

We send the 8 to the other person. This is our “encrypted text”. Nobody looking will be able to guess what number we started with. They’ll have to try all possibilities.

The person at the other receives the 8. The multiply it by 3 (their private key) to get 24. They throw away the 10s and get 4! The number they started with!

Now multiplication doesn’t work for cryptography because it’s too easy reverse, but there are other operations that behave in a similar way. We just need to find the right pair of number where applying our public key to the data, then the private key to that data gives us what we started with.

Anonymous 0 Comments

Encryption works by using mathematical algorithms to convert data into a coded form that can only be deciphered with the correct key

In this case, the devices can use a public key and a private key to encrypt and decrypt messages without sharing the same key through the server, ensuring secure communication.

Anonymous 0 Comments

There is a system to make a key without the server knowing the key called Diffie-Hellman. It works like mixing paint: You start with yellow paint, add your secret color (red) and send it to the other person. They start with yellow paint, add their secret color (blue) and send it to you. You add red, they add blue, and mix thoroughly. You both have the exact shade of brown. But the person in the middle who stole part of your paint, has red+yellow and blue+yellow, and they can’t use those to get the exact same red+blue+yellow that you both have, because they’ve got too much yellow.

Anonymous 0 Comments

There’s 3 tools to encryption that work in tandem. Symmetric key, Asymmetric Key, and Hashing.

Symmetric key is simple it’s the same key on two computers that codes/decodes but like you said – is unsafe to distribute and could be intercepted.

It can be distributed through asymmetric key. I keep a private key and distribute a public key. Messages encrypted through the public key can ONLY decrypted by the private key I own. This doesn’t confirm my identity tho someone could pretend to be me and provide you with the wrong public key.

A hashing program produces a unique code for a piece of data that *cannot* be reverse engineered. Hashing the public key before you use it can verify it’s uniqueness.

That’s the gist of it anyways