Questions tagged [substitution-cipher]

A substitution cipher is an encryption algorithm which works by replacing plaintext units with corresponding ciphertext units, following some rule depending on the key.

Filter by
Sorted by
Tagged with
1 vote
1 answer
73 views

Is a Shift Cipher with Random Insertions Unbreakable?

Imagine an Encryption Algorithm which applies a classic Shift Cipher (also called Caesar or ROT-X) to a text (with only lowercase [a-z] and the space ...
0 votes
2 answers
130 views

efficient way to break substitution cipher based on frequency attack

I wrote an attack based on frequency analysis to break the substitution cipher. The code is below by Python. ... ...
0 votes
1 answer
618 views

All combinations to a substitution cipher [closed]

Is there any software that can output all possible solutions to a substitution cipher? I have a 34 character substitution cipher as follows: ABHIJCKDELMFNOEPQ RDSTUVWGFADBXCYGZ 15 of the characters in ...
4 votes
2 answers
15k views

How to get the keyword from a keyword cipher?

I was given a ciphertext and now I am trying to break it via looking for the keyword. This is a keyword cipher. So: PlainEnglish: ABCDEFGHIJKLMNOPQRSTUVWXYZ If ...
0 votes
0 answers
54 views

How to break Random Subsitution Cipher that changes key every 16 characters?

Monoalphabhatic Random Subsitution Cipher is pretty hard to crack compared to Ceasar Cipher especially through brute force but using frequency analysis, provided enough cipher text is easy. But what ...
1 vote
2 answers
81 views

Substitution Cipher

For the Substitution Cipher, for functions such as $$f(x) = x^k \pmod{26}$$ or $$f(x) = x^k + k \pmod{26}$$ (functions that consist of x^k), why do the values of k=5 or k=7 or k > 10 have one-to-...
3 votes
2 answers
212 views

Enigma machine rotor internal wiring question

I have a question regarding the internal wiring of the rotors of the Enigma machine. I'm trying to understand some details about the original Enigma machine. To the best of my understanding, each ...
1 vote
1 answer
153 views

Enigma Machine rotors math

I have been doing a study about the enigma machine for the past weeks. I managed to get ahold of the formulae used in "Cryptography, Information theory and error-correction" book for the ...
2 votes
1 answer
3k views

Deriving a decryption equation

Consider a very simple symmetric block encryption algorithm, in which 32-bits blocks of plaintext are encrypted using a 64-bit key. Encryption is defined as $C = (P\oplus K_L) \boxplus K_R$ where $...
1 vote
1 answer
135 views

How do AES Substitution box's offer any additional security since it's 1 to 1?

If the Substitution box is 1 to 1 (a specific value can only ever be a specific box value), and the contents of Rijndael S-box is public, how does this offer any additional security? With AES the ...
1 vote
2 answers
1k views

Hill cipher concepts

I have some questions about the Hill cipher. There is a rule for key K: Determinant of matrix and number of characters of the alphabet must be coprime. What does ...
1 vote
1 answer
114 views

What is the difference between a substitution cipher and an oracle?

I was looking into the opaque authentication protocol and they discuss an oracle, which, if I understand it correctly is a projection $Z$ from $f$ to $g$ ($g$ at least the size of $f$), which maps ...
3 votes
1 answer
769 views

AES with a different implementation of byte substitution step

I have tried to answer this question for quite some time now. But a complete intuitive understanding still eludes me: suggested a new implementation for AES: The byte substitution step will be ...
1 vote
0 answers
55 views

Finding a specific word in a substitution cipher

Rand48 is a pseudo-random generator which produces a sequence of any given integer using the following rule: $a_n=(25214903917 \cdot a_{n-1})\bmod 2^{48}$. If $b_n=\lfloor a_n/2^{16} \rfloor \bmod 52$,...
1 vote
3 answers
2k views

How to retrieve the plaintext of a substitution ciphertext?

So the other day, I was piqued by a ciphertext that was trivially encoded through substitution. Solvable only because we can use our eyes to determine word boundary word detection, etc. Trawling the ...
0 votes
1 answer
473 views

Decrypting Mono-Alphabetic Substitution Ciphertext

I am reading Introduction to Modern Cryptography 3rd Edition (Google Books Preview of Relevant section, pages 10-11) and am struggling to understand the description of an attack method on a ...
0 votes
1 answer
104 views

Efficient Obfuscation or Encryption method with low memory usage

We are manufacturing a sensor which transmits in 8 byte packets. This sensor will be used by several different receivers, some of which have very little spare RAM available (< 3 kb). On some of the ...
1 vote
0 answers
19 views

Connecting, joining or merging Substitution Permutation layer

I am trying to identify how the SP Network is constructed. I am looking for plausible solutions that help to connect these layers together and what are the ways that exist in literature other than Kam ...
3 votes
2 answers
428 views

Crack a polyalphabetic cipher given a pair of (plaintext, ciphertext) encrypted by it

The original question only states that a classical cipher is used, and I am going to articulate 1) why I think a polyalphabetic substitution cipher is used AND 2) my attempts so far. The Question <...
10 votes
2 answers
4k views

How to solve cipher encrypted with Vigenère + Columnar Transposition?

Vigenère's weakness is Kasiski's test and index of coincidence. However, if you put columnar transposition on top of Vigenère, that weakness is gone. The text is now shuffled and you can't search for ...
0 votes
0 answers
172 views

How do I progress with cracking this monoalphabetic substitution cipher that ignores natural word divisions?

Having some trouble cracking this cipher (this is part of a homework assignment for a cryptology class) I've looked at letter frequencies but I'm not sure what else there is to help me. Given the ...
2 votes
0 answers
155 views

Need some help with decryption code for monoalphabetic substitution

I am working on decrypting ciphertext in monoalphabetic substitution algorithm. I tried to decrypt using frequency histogram of English alphabets individually. The percentage of these frequencies can ...
2 votes
1 answer
210 views

Repeated Vigenère Cipher

I was looking into the Vigenère cipher when I thought of something. Would you improve the security of the cipher if you shifted each letter (from the text you want to encrypt) with each letter of the ...
1 vote
1 answer
592 views

Key space of a substitution cipher

I was going through a cryptography course, and I found a question there that: What is the size of the key space of the substitution cipher with 26 letters? Its answer was 26! I am not sure what this ...
1 vote
1 answer
113 views

symbol representation based cipher? [closed]

so i had an idea recently for a cipher. the idea is as follows: for every ascii character in the input, replace it with a corresponding sequence of 25 binary digits that, when arranged into a 5x5 grid,...
0 votes
2 answers
75 views

How to verify most appropriate cleartext?

So basically I was implementing a decryption tool (just for fun) and the first encryption logic I decided to implement was Caesar Cipher. So if I have the input as ...
5 votes
2 answers
4k views

Can a monoalphabetic substitution cipher attain perfect secrecy?

Can a monoalphabetic substitution cipher attain perfect secrecy? Definition of perfect secrecy: $${\rm Pr}[\,{\rm Enc}_k(m_1) = c\,] = {\rm Pr}[\,{\rm Enc}_k(m_2) = c\,]$$
2 votes
1 answer
931 views

Enigma ring settings - is the relative location of the turnover all that matters?

I understand that the ring setting of an Enigma rotor changes the alignment between the internal wiring and the letters on the ring. For example, in the diagram below, rotor I has ring setting 2 (B), ...
0 votes
2 answers
146 views

How many different ciphertexts in repeated substitution cipher?

Consider an alphabet with 26 letters. Then a substitution cipher has $26!$ possible ciphertexts (with every letter substituted). What about repetive substitutions on a 5 letter word for example? How ...
4 votes
2 answers
315 views

Substitution ciphers amended with cipher block chaining: susceptible to frequency analysis?

I have been studying ways to amend a simple substitution cipher, and one of the toy suggestions was to use CBC in the following way: identify each letter with a number from $0\ldots 25$ start with a ...
4 votes
3 answers
2k views

Can anyone explain to me the difference between the OTP (one-time pad) and Vernam Cipher?

I heard they are very similar, although there are subtle differences between the two.
23 votes
6 answers
3k views

Can an Enigma-style cipher of sufficient complexity be considered secure today?

Regarding the German Enigma machines, if I recall correctly, the reason they were defeated was because the Allies were able to generate a massive database of possible rotor settings, and because the ...
2 votes
2 answers
1k views

How were codes in WW1 reciphered (to enhance security levels) without them turning meaningless?

In WW1, the Germans made their communications secret by encoding their messages. This meant that the message's sender would have a codebook with all possible words and phrases he might use listed in ...
1 vote
1 answer
61 views

Are basic replacement ciphers always bad for structured data encryption?

I have read that basic replacement ciphers, such as replacing one byte with another specific byte at each location, are far less effective with non-randomized data. My question is, can this problem be ...
4 votes
2 answers
337 views

Which sub operation is more expensive in the AES encryption process?

In the AES encryption process, there are various sub-operations, like SubByte, MixColumns, ARK etc. My question is which of these operations is more expensive? In a video lecture by Dan Boneh, it is ...
6 votes
2 answers
4k views

How to break homophonic substitutions and nomenclators with too many symbols?

Early attempts to thwart frequency analysis attacks on ciphers involved using homophonic substitutions, i.e., some letters map to more than one ciphertext symbol. The earliest known example of this, ...
4 votes
0 answers
146 views

How to overcome issues with big ciphers? E.g. with small vs. big Vigenére Ciphers

I understand that bigger ciphers show more recurring patterns and therefore should be easier (or at least faster) to decrypt as you'll have a better statistical analysis, being However, if we use an ...
0 votes
1 answer
47 views

Rotor that divides binary number by mod 3

Let's say we have transformer(?) A = $\{0;1 \}$, B = $\{0;1\}$, $Q = \{q_0,q_1,q_2\}$, where A - plaintext alphabet, B - encryption alphabet, Q - the set of states. The functions of the rotor are ...
6 votes
2 answers
7k views

What is the diffrence between Feistel networks and SPN?

I recently read about the concept of Feistel Networks and Substitution Permutation Networks but what is exactly the difference between the two ?
3 votes
0 answers
626 views

Identifying correct cipher

I am trying to decrypt a text(~900 characters) and I started with the assumption that its a Vigenère cipher as the one of the identifier tool identified it as Vigenère cipher and also the Index of ...
1 vote
0 answers
152 views

Deciphering a substitution cipher if frequency analysis doesn't work (hypothetically)

If a text ciphered by substitution is in a artificial language with equal frequency distribution of characters, and perhaps 2 or 3-grams too, what would be the next, easy to understand, ways to ...
19 votes
4 answers
15k views

Encryption/ciphers/codes in Chinese

I am quite curious as to how you can perform simple encryption for the Chinese language. Saw a similar question related to encryption/Chinese here: About cryptography in a character language, however ...
1 vote
1 answer
51 views

Personal ledgible quick cipher

The problem: When I'm writing or reading information (be it on a screen or a physical medium) the information is vulnerable. So long as I'm not alone, anyone can simply glance at my screen or journal ...
0 votes
1 answer
77 views

How does pairing letters increase the security of a substitution cipher?

Hello can someone help me to understand this : One way to reduce this problem is to increase the size of the cipher alphabet. Rather than considering our cipher alphabet to be just the 26 letters, ...
15 votes
3 answers
5k views

Does composing multiple substitution ciphers improve security?

Will using two substitution ciphers one after the another be more secure than using single substitution cipher?
1 vote
0 answers
152 views

Cracking a Shift Cipher that uses an Unknown Deterministic Scheduling Algorithm

Consider a shift cipher that has the following encryption scheme: The plaintext contains lowercase characters and spaces, is composed of English text, and is length 500. Thus, the message (and ...
1 vote
0 answers
229 views

Simple Cipher Cryptography on Hex File [closed]

I have been assigned this hex file : https://drive.google.com/file/d/1EeidY67VuIddIC-e-xiiKhth1ucMhM_r/view?usp=sharing The goal is to decrypt it to something meaningful. The only hint given is that ...
1 vote
0 answers
396 views

How do I calculate the conditional probability of a Caesar cipher?

I have a frequency distribution of letters for the plaintext and the ciphertext. I'm trying to determine the conditional probabilities to identify the plaintext/ciphertext pairings. If I encrypt ...
8 votes
4 answers
8k views

Why is the Keyspace of a Substitution Cipher not 2^26 but 2^88

It is known that a cipher has a keyspace of cryptographic algorithm whose key length is $n$ is given by $2^n$, but the keyspace of the substitution cipher is $2^{88}$ which is an approximation of $26!$...
1 vote
1 answer
1k views

Base64 with shuffled alphabet

I have a base64 'cipher' text. I know that in clear text is a hidden XML document (I know nothing about its structure), but the base64 alphabet was somehow shuffled. Is there any smart way, how to ...