I recently started solving some of the riddles of Project Euler . I found the discussion forum on the site a little disappointing (most discussions are closed and poorly pierced), so I decided to post my Python solutions to the launchpad for discussion.
The problem is that publishing these solutions seems rather unethical, as it will allow other people to gain a reputation without having to do the programming work that the site is deeply discouraged by.
I want to encrypt my answers so that only those who have already solved the riddles can see my code. A logical key will be the answer to a riddle that is always numeric.
To prevent brute force attacks on my answers, I want to find an encryption algorithm that takes significantly longer (a few seconds) to run.
Do you know any such algorithm? I would like to introduce a Python package that I can attach to code using an external program that may have portability problems.
Thank,
Adam
It seems that people will have to write their own decryption utility or use something ready-made or use ready-made components to decrypt your messages.
PBKDF2 - , PKCS # 5. , "", ( ) . , AES-128.
, - PBKDF2. , , S/MIME. S/MIME, . , (Thunderbird) .
, , - . :
python decrypt.py --problem=123 --key=1234567
Google, , ( , 5 , 20 ) . , (, import, for) .
import
for
, , - , :
>>> print codecs.getencoder('rot_13')('import codecs')[0] vzcbeg pbqrpf
Project Euler 123, ...
, : DSA AES, ; .
, , . , , .
question python.
DES , , 3- . , .
DES .
, .
, , , , , , . , , . .
Btw, , Project Euler, . Haskell , Clojure , F #. - , . , Python , google "Python Euler xx" , .
- - -, SHA-1, , . , - , n SHA1, n - , .
, , , - -.
: , . , , , , , .
If you want a simple and common encryption procedure, I recommend Rubin Paul p3.py . It’s probably on the quick side how safe it is, but since it seems to you that you need to overcome an obstacle rather than a siege wall, this may be a good choice for your goals.
You can also look at rijndael.py , which is an AES implementation and slower than p3.py.