Re: how cryptography works and exampple in python?

2 gives you a very simplistic explanation. The most common example is something like this: Two people want to exchange information, but they have to meet in a public place. Therefore, their conversation might be overheard and they don't want that to happen. So they both generate two sets of keys, with one key in each set being public and the other being private. When these two meet at the maul or a restaurant, for example, they exchange public keys and go on their way.
The first person opens a cryptography app on their computer and enters the public key. The second person does likewise. The app generates a shared, secret key that both people know, but no one else knows.
Now, to finish the process, the people open another app to communicate. The app uses a cryptographic algorithm like AES to transmit information. The two enter their shared secret into the app and they can now communicate securely: they both know a key, but no one else knows it. The information they wish to discuss is secure, encrypted behind a highly advanced cipher that is, for all intents and purposes, unbreakable. People who intercept their traffic will see the encrypted data -- which is just garbage.
This is an example of the X25519 cryptography scheme. Its used in TLS, if I'm not mistaken, and is used to exchange messages via a shared secret key that only the parties involved in information exchange actually know. X25519 is an example of symmetric key cryptography -- that is, in the end your using a shared key.
The other version is asymmetric key cryptography, which involves two different keys; this is called public-key cryptography. The idea behind PKC is remarkably simple: I generate a key pair that contains a public and a private key. You do the same. I then publish my public key and you do the same and we download each others keys. Now, I can send you messages by encrypting them with your public keys, and only you can decrypt them because you have the private key.
HTH

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : bhanuponguru via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector

Reply via email to