Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

Questions tagged [cryptography]

For challenges involving cryptography, including things like ciphers and hashing algorithms

Filter by
Sorted by
Tagged with
1 vote
4 answers
502 views

The challenge is to create the shortest possible PEM-encoded CA certificate. The PEM format is specified in rfc7468 (section 5.1 shows an example certificate), and the structure of certificate data (X....
user7610's user avatar
  • 199
1 vote
0 answers
189 views

We need to produce a block cipher round function with a 1 bit round key size and a 7 bit message size with the highest level of cryptographic security according to our measure of security. ...
Joseph Van Name's user avatar
4 votes
1 answer
420 views

I've looked and could not find a post for this, if there is one, I'll remove it quick! Related and also related The goal is (hopefully) clear: create the shortest code (in bytes) that implements the ...
Infigon's user avatar
  • 571
17 votes
1 answer
1k views

MD5 checksums are relatively easy to crack. For this challenge you will create two separate programs, the first one writing Hello, World! and the second one writing ...
jdt's user avatar
  • 5,114
2 votes
12 answers
887 views

I have been going to puzzling.se, and people over there write stuff in rot13 a lot, sot this gave me an idea: Write a program that takes 2 inputs, a string and integer: the message to encode or ...
pyton's user avatar
  • 45
12 votes
8 answers
4k views

The objective Given a Russian text, encrypt it with Caesar cipher with key 16. The basic Cyrillic alphabets The basic Cyrillic alphabets are: (U+0410 – U+042F) ...
Dannyu NDos's user avatar
  • 7,371
108 votes
12 answers
10k views

The aim of this challenge is to find an impossibly short implementation of the following function p, in the langage of your choosing. Here is C code implementing it ...
picarresursix's user avatar
-2 votes
11 answers
773 views

I use "sentence" here loosely to mean "any sequence of words separated by spaces" and "words" to mean "sequences of alphanumeric (hexatrigesimal) characters unseparated by spaces". Conversion is from ...
DrQuarius's user avatar
  • 680
9 votes
3 answers
414 views

Given a positive integer \$N >= 4\$, output an RSA key pair (both the private and the public key) whose key length is \$N\$ bits. The RSA key generation algorithm is as follows: Choose an \$N\$-...
user avatar
25 votes
6 answers
1k views

I'm one of the authors of Gimli. We already have a 2-tweet (280 chars) version in C but I would like to see how small it can get. Gimli (paper,website) is a high speed with high security level ...
Biv's user avatar
  • 363
13 votes
9 answers
913 views

Description A Caesar Shift is a very simple monoalphabetic cipher where each letter gets replaced by the one after it in the alphabet. Example: ...
racer290's user avatar
  • 1,103
4 votes
3 answers
899 views

The Straddling Checkerboard is a method for converting letters to numbers and was part of a pencil an paper cipher known as VIC To convert letters to numbers first you have to make a checkboard like ...
marcosm's user avatar
  • 1,166
10 votes
9 answers
1k views

Introduction One day, you were just relaxing in your office in the CIA, when suddenly you see an alert on your computer. Your programs have just intercepted hundreds of coded messages! A quick ...
Luke B's user avatar
  • 777
3 votes
6 answers
551 views

In Applied Cryptography by Bruce Schneier (which I have been reading quite a lot recently), a protocol for splitting secrets is discussed. Here is a brief description: Trent generates a random ...
ckjbgames's user avatar
  • 1,339
15 votes
21 answers
2k views

Generate a cipher given a number and string Your task is simple. Given a string s and a number 0 <= n <= 9 as inputs, ...
jacksonecac's user avatar
  • 2,626
5 votes
0 answers
148 views

Out Steganograph Me As a follow up to this challange, I want to see competitive algorithms for encoding strings as images, and then decoding them. The Challenge Your goal is to write a function or ...
ATaco's user avatar
  • 11.7k
29 votes
7 answers
1k views

Decipher Neurotic Frogs Now that Puzzling.SE has finally cracked my amphibian-obsessed cipher, let's write a program or function to decrypt it! (If you want to look at the puzzle before having it ...
DLosc's user avatar
  • 40.7k
26 votes
22 answers
2k views

In cryptography, PKCS#7 padding is a padding scheme which adds a number of bytes N ≥ 1, where the value of each added byte is equal to N. For example, Hello, World!...
Sp3000's user avatar
  • 62.2k
6 votes
1 answer
2k views

You've received a coded message from your ally that you know is encoded with the VIC cipher. As you know that the VIC cipher is notoriously convoluted, you want to write a program that will decode the ...
Sherlock9's user avatar
  • 12.4k
19 votes
4 answers
3k views

The VIC cipher is one of the most complicated pencil and paper ciphers ever devised. Used in the 1950s by Soviet spy Reino Häyhänen, codenamed "VICTOR", its main principle is security through ...
Sherlock9's user avatar
  • 12.4k
96 votes
173 answers
18k views

The Tabula Recta (sometimes called a 'Vigenere Table'), was created by Johannes Trithemius, and has been used in several ciphers, including all variants of Bellaso's Vigenere cipher and the Trithemius ...
user avatar
7 votes
1 answer
465 views

Introduction and Motivation I'm mainly active on Cryptography.SE and as such have already stumbled across the question: "How the hell am I supposed tools like cado-nfs to do stuff!?". They ...
SEJPM's user avatar
  • 3,463
20 votes
14 answers
3k views

Given n (the number of players), t (the threshold value), and s (the secret), output the <...
user avatar
9 votes
4 answers
483 views

Introduction A while back I stumbled across the tiny encryption algorithm (TEA) and since then I have recommended it whenever special cryptographic security properties were un-needed and a self-...
SEJPM's user avatar
  • 3,463
-7 votes
13 answers
2k views

A substitution cipher is an encoding method where each letter in the alphabet is replaced with a fixed, different one; for example, given the following substitution map: ...
Massimo's user avatar
  • 145
3 votes
0 answers
136 views

Write a program or function that will break ciphers, using as few bytes as possible. Task Given an encrypted message and a dictionary as input, output the decrypted message. The messages will be ...
wizzwizz4's user avatar
  • 2,467
7 votes
2 answers
653 views

ADFGX cipher encryption The ADFGX cipher was used by the German army in WWI. Write a program to encipher with it! It works as follows: Create a 5x5 Polybius square with a mixed alphabet. The ...
user avatar
30 votes
29 answers
3k views

Consider the Atbash transformation: A|B|C|D|E|F|G|H|I|J|K|L|M Z|Y|X|W|V|U|T|S|R|Q|P|O|N Where A ⇔ Z and L ⇔ O, e.g. There is an interesting property that ...
Conor O'Brien's user avatar
13 votes
3 answers
1k views

This little piggy went to market, this little piggy wrote some code... Ah wait, we're not talking about that bacon, we're talking about Sir Francis Bacon! Specifically, the cipher Bacon devised in ...
Sherlock9's user avatar
  • 12.4k
16 votes
1 answer
971 views

Write an algorithm to interpret a sequence of letters as a Roman numeral. (see roman numeral rules below) Each distinct letter has a matching Arabic decimal value, no maximum. But you don't have ...
iamogbz's user avatar
  • 161
7 votes
1 answer
413 views

Description You, an armchair cryptanalyst, have noticed that the first letters of each word in your neighbor's mail (yes, you read it -- how else would you know if he's plotting something?) look very ...
cole's user avatar
  • 4,016
52 votes
15 answers
5k views

In public-key cryptography, a public key fingerprint is a short sequence of bytes used to identify a longer public key. In SSH in particular they can be used to verify that a server is in fact the ...
padarom's user avatar
  • 643
7 votes
2 answers
815 views

A Vigenère Cipher is encrypted by repeating a keyword to be the length of the plaintext, and summing each character in that text with the corresponding letter in the plaintext modulo 26. (using A=0,B=...
cardboard_box's user avatar
13 votes
2 answers
890 views

Cryptic Kicker A common but insecure method of encrypting text is to permute the letters of the alphabet. In other words, each letter of the alphabet is consistently replaced in the text by some ...
Dhruv Ramani's user avatar
17 votes
3 answers
1k views

Background One-hundred and thirteen years ago, amateur cryptographer Félix Delastelle published his work on the four-square cipher, a digraphic substitution cipher that accepts two permutations of a ...
Dennis's user avatar
  • 212k
12 votes
5 answers
984 views

Implement a CipherSaber encryption program, as described below. Guidelines: The smallest entry, in bytes, wins. However, in a departure from code-golf norms, you are welcome to post interesting ...
C. K. Young's user avatar
  • 4,998
12 votes
20 answers
4k views

This contest is over. There are no remaining crackable answer in the cops challenge. Companion thread of Cryptographic hash golf As a reminder, here are the rules for robbers from the main ...
Dennis's user avatar
  • 212k
35 votes
23 answers
5k views

This contest is over. Due to the nature of cops-and-robbers challenges, the cops challenge becomes a lot easier when the interest in the associated robbers challenge has diminished. Therefore, ...
Dennis's user avatar
  • 212k
18 votes
4 answers
1k views

Write a program or function (or set of programs/functions) to encrypt and decrypt data given the following specification: Encryption Calculate an XOR hash of the input by XOR-ing every byte with each-...
nderscore's user avatar
  • 4,980
11 votes
1 answer
773 views

Today your goal is to decrypt a secret message using AES. Given a ciphertext and key you will decrypt and print the message. Your program may be in any language. It will be run with input on stdin, ...
orlp's user avatar
  • 39.4k
3 votes
0 answers
5k views

Introduction In this challenge you will be solving date shift ciphers. Here is a general overview of what a date shift cipher is. To encode a message, you first must make a key. A key in a date shift ...
GamrCorps's user avatar
  • 7,642
11 votes
11 answers
1k views

Introduction In this challenge you will be solving diagonal Burrows-Wheeler transforms. Here is a general overview of what a diagonal Burrows-Wheeler transform is. To encode a message, you first must ...
GamrCorps's user avatar
  • 7,642
7 votes
2 answers
828 views

The Vigenère cipher is a substitution cipher where the encryption of each letter of the plaintext depends on a different character in a keyword. This stops you using simple methods of frequency ...
Alchymist's user avatar
  • 554
4 votes
3 answers
757 views

The aim is to parse a sentence and compress/encrypt it according to the rules below and then decrypt it using the ...
manav m-n's user avatar
  • 143
6 votes
3 answers
2k views

Short version RC4, designed in 1987, is one of the most famous stream ciphers. This question asks you to practically demonstrate its 2nd byte bias (for a ...
hola's user avatar
  • 147
26 votes
16 answers
4k views

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, ...
Doorknob's user avatar
  • 72.1k
23 votes
17 answers
8k views

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 ...
r3mainer's user avatar
  • 19.8k
25 votes
4 answers
3k views

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 ...
durron597's user avatar
  • 4,840
5 votes
5 answers
802 views

Your task is to build a function in any language that takes a message m, an encryption e, and a modulus ...
Joe Z.'s user avatar
  • 35.4k
11 votes
5 answers
8k views

Write two programs: - One which reads a string and a key and encodes the string into a rail-fence cipher using that key. - Similarly, write a program for the reverse function: deciphering a rail fence ...
ShuklaSannidhya's user avatar