For challenges involving cryptography: encryption or decryption.

learn more… | top users | synonyms

18
votes
13answers
1k views

What ROT is this? - decrypt ROT-n

Here are the letters of the English alphabet in order by frequency: e t a o i n s h r d l c u m w f g y p b v k j x q z That is, e is the most frequently used letter, and z is the least common. ...
16
votes
13answers
806 views

Write a Playfair encryption program

Write a program that takes two lines of input and uses the first as a key phrase to encrypt the second according to the Playfair encryption technique. Wikipedia describes Playfair encryption in some ...
22
votes
4answers
2k views

Implement ROT-47… in ROT-47

Challenge: Implement ROT-47 in code that works as both itself and as the ROT-47 version of itself. Scoring: Your score is calculated as a percentage of used, ROT-47 eligible bytes in total of both ...
3
votes
3answers
327 views

Build an RSA encoder

Your task is to build a function in any language that takes a message m, an encryption e, and a modulus k (all positive integers), and takes m to the power of e modulo k. Your solution must not be a ...
2
votes
2answers
1k views

Rail fence cipher

Write a program which reads a string and a key and encodes the string into a rail-fence cipher using that key. Similarly, write a program for reverse function, ie, deciphering a rail fence using a ...
10
votes
7answers
819 views

C: replace AES FIPS-197 SubBytes table by constant-time code

In FIPS-197 (the Advanced Encryption Standard, known as AES), it is made heavy use of SubBytes, which could be implemented as unsigned char SubBytes(unsigned char x) { static const unsigned char ...
3
votes
2answers
460 views

Implement DES key expansion

I wanted to make a challenge to do the full DES encryption algorithm, but that may be a bit too involved to get a ton of participation. This challenge is to simply generate the 16 48-bit subkeys used ...
29
votes
3answers
1k views

Underhanded Password Hashing

In the spirit of the Underhanded C Contest, I'm starting an Underhanded Code Contest. The objective of this contest is to straightforwardly implement some code, while subtly hiding a nefarious bug ...
6
votes
7answers
823 views

Implement a One-Time Pad

Background A one-time pad is a form of encryption that has been proven impossible to crack if used properly. Encryption is performed by taking a plaintext (comprised of only letters A-Z) and ...
3
votes
4answers
464 views

Implement Oplop

Oplop is an algorithm to generate website specific passwords based on a master password and a keyword. It is described here: http://code.google.com/p/oplop/wiki/HowItWorks There's an online ...
7
votes
5answers
875 views

Implement Rijndael's S-box

Rijndael's S-box is a frequently used operation in AES encryption and decryption. It is typically implemented as a 256-byte lookup table. That's fast, but means you need to enumerate a 256-byte ...
14
votes
5answers
1k views

Write Buggy Code

Now is the time to show off your abilities to write bad code. I am trying out a new sort of programming puzzle, most similar, I think, to the underhanded C contest. The main difference is that this is ...
4
votes
3answers
401 views

Break the broken hash

Some time ago, I found this unused hash function (written in Java) in our codebase: long hashPassword(String password) { password = password.toUpperCase(); long hash = 0; int multiplier = ...
6
votes
7answers
2k views

Implement Shamir's Secret Sharing reconstruction

Shamir's secret sharing scheme is a simple way of protecting a secret by splitting it into several parts needed to reconstruct it. Your task is to implement Shamir's Secret Sharing reconstruction ...
8
votes
2answers
557 views

Break the broken cipher

I have designed a simple random generator that cycles two numbers in a chaotic way using a multiply and modulus method. It works great for that. If I were to use it as a cipher generator it would ...
8
votes
2answers
738 views

Decryption by pattern analysis

You are given an encrypted string, encrypted using a very simple substitution cipher. Problem You do not know what the cipher is but you do know the ciphertext is English and that the most frequent ...