Python Forum
What is an Encryption And Decryption - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: What is an Encryption And Decryption (/thread-1568.html)



What is an Encryption And Decryption - Lamon112 - Jan-13-2017

Hi guys so i got this one task that I should make an Encryption And Decryption in python so im curious what does that actually mean.
Thanks for your time
Rolleyes Idea


RE: What is an Encryption And Decryption - Larz60+ - Jan-13-2017

Code and decode


RE: What is an Encryption And Decryption - Skaperen - Jan-13-2017

encryption is a method for transforming data into a secret form, using a secret key, that no one else can figure out unless they have the secret key and the decryption method. decryption is a method for transforming data from a secret form, using the same secret key used to encrypt it, back to its original form.

there is a type of encryption/decryption that uses two keys which are related to each other (and calculated together), one for encryption, the other for decryption.

to get started, don't worry if someone else can figure out your method and decrypt your data without being given the secret key.  you will need to worry about that later, when your method is to actually be used.


RE: What is an Encryption And Decryption - snippsat - Jan-13-2017

Encryption(Make eg (plaintext) that is human readable difficult to understand hide information).
Decryption(Take it back to normalized data (plaintext) that is human readable or the computer can understand).
>>> word = 'hello world'
>>> encrypt = word[::-1]
>>> encrypt
'dlrow olleh'

>>> decrypt = encrypt[::-1]
>>> decrypt
'hello world'



RE: What is an Encryption And Decryption - wavic - Jan-13-2017

The two common encryption methods are symmetric and asymmetric. There are plenty of sources in www you can learn more

I see @Skaperen has explain them briefly


RE: What is an Encryption And Decryption - Skaperen - Jan-14-2017

i was going to explain rot13 but @snippsat showed an even simpler method (no keys involved).


RE: What is an Encryption And Decryption - wavic - Jan-14-2017

Hm! The simplest encryption for me is just to use a bitwise xor against some key.

>>> word = 'hello world'
>>> enc = "".join([chr(ord(char) ^ ord('a')) for char in word])
>>> enc
'\t\x04\r\r\x0eA\x16\x0e\x13\r\x05'
>>> dec = "".join([chr(ord(char) ^ ord('a')) for char in enc])
>>> dec
'hello world'



RE: What is an Encryption And Decryption - Larz60+ - Jan-14-2017

It's as simple as an 'Annie Oakly Code Wheel' from the Christmas Story,
or as a lifetime occupation . See: http://careersthatdontsuck.com/2007/02/24/career-profile-cryptologist/


RE: What is an Encryption And Decryption - Kebap - Jan-14-2017

(Jan-13-2017, 02:30 AM)Lamon112 Wrote: I should make an Encryption And Decryption in python so im curious what does that actually mean.


Hello friend, have you heard of this handy online dictionary? I forgot the name, but it really whips the lama's ass:

Encryption
Cryptography


In there, you can even click the blue words to get more information on adjacent ideas. I heard you can even ask questions to improve things, but that's just a rumor!