Encrypt text using a number

Posted by Adam Matan on Stack Overflow See other posts from Stack Overflow or by Adam Matan
Published on 2010-05-27T23:42:49Z Indexed on 2010/05/27 23:51 UTC
Read the original article Hit count: 297

Project Euler

I have recently begun to solve some of the Project Euler riddles. I found the discussion forum in the site a bit frustrating (most of the discussions are closed and poorly-threaded), So I have decided to publish my Python solutions on launchpad for discussion.

The problem is that it seems quite unethical to publish these solutions, as it would let other people gain reputation without doing the programming work, which the site deeply discourages.

My Encryption problem

I want to encrypt my answers so that only those who have already solved the riddles can see my code. The logical key would be the answer to the riddle, which is always numeric.

In order to prevent brute-force attacks on my answers, I want to find an encryption algorithm that takes a significantly long time (few seconds) to run.

Do you know any such algorithm? I would fancy a Python package, which I can attach to the code, over an external program that might have portability issues.

Thanks,

Adam

© Stack Overflow or respective owner

Related posts about python

Related posts about algorithm