Jump to content




Recent Status Updates

  • Photo
      18 Aug
    KodeKool

    When faced with a wall of errors and no hope to fix them, remember the following "Programs always do what you tell them to, and seldom what you want them to, but eventually you'll run out of things that can go wrong and it'll just work. and that's the secret to good programming."

    Show comments (2)
  • Photo
      11 Aug
    Error

    Should I be practicing programming every day? I feel if I don't, I'll get instantly rusty or something.

    Show comments (4)
View All Updates

Developed by Kemal Taskin
Photo
- - - - -

[cryptography / python] Caesar Shift encryption

encryption

  • Please log in to reply
15 replies to this topic

#13 MindiAbair

MindiAbair

    CC Lurker

  • New Member
  • Pip
  • 3 posts

Posted 12 September 2013 - 02:47 AM

Your key will be as long as the message to be encrypted, right ?

 

Correct. I know this method has limited practical application, but it was fun to think about. Can you think of a way to shorten the key? I'm thinking about it myself.


  • 0

#14 gonerogue

gonerogue

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 178 posts

Posted 12 September 2013 - 02:59 AM

The point with this kind of scheme is that it has little practical value because of the length of the key.

If we could afford this we would have use OTP which is unconditionally secure.

If all you need is to encrypt something, use established ciphers like AES, Serpent or Twofish.

If you want to understand how AES is working, read this book: http://www.amazon.co...y/dp/3540425802

Don't implement the AES algorithm in Python, use PyCrypto ... is already there.


  • 0

#15 MindiAbair

MindiAbair

    CC Lurker

  • New Member
  • Pip
  • 3 posts

Posted 12 September 2013 - 03:09 AM

Hi, xyv,

 

I can understand the legal requirement to advise new programmers not to use homebrew encryption solutions in practical application. But relax. I have no practical application in mind for encryption code right now, and I know that encryption is such a well-developed field that a newcomer like me would be unlikely to come up with anything better than already exists. What's really happening is that I am self-studying Python purely for entertainment, and I came to this forum looking for people who enjoy either writing code or learning how to do it, and who don't mind pooling ideas and helping a newbie out. :)

 

With that in mind, I can google OTP, AES, Serpent and Twofish, or you can tell me where I can read up on those things for free. I am too poor to buy books from Amazon, and the local library is terrible.

 

I am also going to put some thought into how I can shorten the encryption key in the above code, as well as make the code leaner and more professional-looking.


  • 0

#16 gonerogue

gonerogue

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 178 posts

Posted 12 September 2013 - 04:13 AM

A good source of free information is the Cryptography I course on coursera:

https://www.coursera.org/course/crypto

A free book:

http://www.cs.bris.a...el/Crypto_Book/


Edited by xyv123, 12 September 2013 - 04:20 AM.

  • 0





Also tagged with one or more of these keywords: encryption