Skip to content

This is a model about the one-time-pad Cryptography to discover how it works, before starting have a look to the README.md and then have fun!

License

Notifications You must be signed in to change notification settings

ilGiacoo88/OneTimePad_Cryptography

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

One-time-pad Cryptography Project

by ilGiacoo88

This is a model of how the one-time-pad Cryptography model works, written entirely in Python.

Before starting: *This Cryptography method is weak and I recommend you to don't use this Cryptography project in real-world Projects, because it can be exploited in a really easy way.
So the developer assumes no responsability about this project, the way that it's used and the problems of security correleted to the project.
Also this project is only for educational purposes!!

First of all you need to open the Encryption.py file, then run it and insert the text that you want to encrypt. Then the uoutput will be a secret_key and a cipher_text, remember and write them somewhere because you will need them for decryption.

Then open the Decryption.py, the first thing to insert is the cipher_text of before and then the secret_key. After that the decrypted_text will be shown on the screen.

The basic foundamental of the one-time-pad Chryptography: We need a Message (m) and a Key (k) to make the Cipher Text (c). The algorithm used is:

c = m ^ k

and to decrypt is:

m = c ^ k

The ^ operator is the bit-wise exclusive-OR, its property:

1 ^ 1 = 0
1 ^ 0 = 1
0 ^ 0 = 0

If you want to learn more about this algorithm search on the Internet

Have fun and learn as much as you can from this project.

Thank you
ilGiacoo88


History:

  1. 26/04/2024 --> Uploaded the project: oneTimePad_Cryptography with the two python files (Encryption.py, Decryptio.py), the README.md and the MIT License
  2. 26/04/2024 --> added the Patch 0.0.1, the changes are:
    - the key is printed out as an hexadecimal number to have a better user-experience;
    - the user can insert the key in hexadecimal format in the decryption file

About

This is a model about the one-time-pad Cryptography to discover how it works, before starting have a look to the README.md and then have fun!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages