37

The key space of a cryptographic algorithm whose key length is $n$ is given by $2^n$ No. There is confusion between: keyspace (or key space) $\mathcal K$, which is the set of possible keys. keyspace size (or size of the keyspace) $\|\mathcal K\|$, which is the number of possible keys (an integer). key length (or key size) in bit, which can be defined as ...


27

When trying to break an unknown cipher, one first needs to figure out what kind of cipher one it is. Generally, a good starting point would be to start with the most common and well known classical ciphers, eliminate those that obviously don't fit, and try the remaining ones to see if any of them might work. An obvious first step is to look at the ...


26

If the substitution ciphers belong to the same family, then their composition will also (typically, assuming that the family is closed under composition) belong to the same family. Thus, breaking the combined cipher will be no harder than breaking an arbitrary cipher in the family. For a simple example, combining two Caesar shift ciphers with shifts ...


25

He is talking about the original version of the Caesar Cipher where the substitution was just a +3: A -> D B -> E C -> F D -> G E -> H F -> I G -> K H -> L ... X -> A Y -> B Z -> C Because the shift is fixed, it does not have a key (but you could say it is a substitution cipher with a key equal to +3). However it is ...


16

DES actually demonstrated that a Feistel structure was not a guarantee against attacks. In "academic" terms, DES is broken by both differential and linear cryptanalysis, because they require, respectively, $2^{47}$ chosen plaintexts and $2^{43}$ known plaintexts, whereas the DES key is (effectively) 56 bits. Of course, for practical attacks, we would brute ...


11

The Vigenère cipher has many weaknesses, but perhaps the most obvious ones are: An attacker, who knows (or can guess) as many consecutive characters of any plaintext message as there are in the key, can trivially recover the key and thus decrypt all messages. (In fact, the characters need not even be consecutive, they just need to cover the entire key, or ...


10

The real security of Vigenère is difficult to quantify. A million character plaintext with a 10 character password is easy to break. But a 10 character plaintext with a 10 character randomly chosen password is essentially a one-time-pad and theoretically unbreakable. Given the data you've told us (plaintext: 100 to 5000 characters; password: 30 to 100 ...


10

I take your question to mean, how both historically and in the modern age one could construct a pen-and-paper cipher using the Chinese language. As pointed out in the question, Chinese is a logographic language and therefore has a far greater number of characters than Phonetic systems. Historically this has cause Chinese codes not to be based around the ...


10

Let's start by considering which cipher letters should correspond to the most common letters E and T. According to your frequency analysis, the most likely candidates are O, K, T and maybe D and N. Now, E is the fifth letter of the alphabet, so unless your keyword is very short, it's going to encrypt to some letter in the keyword (and if the keyword is ...


9

Some additions to the other answer: any given letter can only correspond to a fairly limited number of ciphertext letters: only the ones in the same column or row, and never to itself. So a highly frequent letter like E will still stick out in longer texts and then we will also find its row and column mates, which helps in reconstructing the square. There ...


9

I'll assume that the plaintext consists entirely of capital ASCII letters as in the example. This implies the high 3 bits of each byte of plaintext are 010. It is useful to visualize how 3 consecutive bytes of plaintext map to 4 consecutive Base64 characters. 1. Frequency analysis of the last character of 4-char blocks in ciphertext We see there is a ...


9

In the substitution cipher, the answer lies in the permutations, a key is one of the all possible permutations of the alphabet (keyspace), i.e. each letter is substituted with another. Therefore, for a key of an alphabet with 26 characters, the first letter can have the 26, the second can have 25, etc. and the last letter can get only one letter for ...


8

If it is a simple substitution cipher, there are a few standard techniques: Frequency analysis. Count how many times each letter appears in the ciphertext. The most common ciphertext-letters probably correspond to the most-common letters in English. The most common letters in English are ETAOINSHRDLU... (in decreasing order of prevalence). Therefore, ...


8

The composition of any number of substitution ciphers is still a substitution cipher, hence no.


7

This is a simple substitution cipher, specifically a mixed/deranged alphabet cipher. See wikipedia's description: Substitution of single letters separately—simple substitution—can be demonstrated by writing out the alphabet in some order to represent the substitution. This is termed a substitution alphabet. The cipher alphabet may be shifted or reversed (...


7

A substitution cipher consist of a mapping from letters in the alphabet to letters in the alphabet (not necessarily the same alphabet, but probably is in this case). There are many forms that a key can take on. Ones I've seen in practice are: The key is the mapping (i.e. a->m, b->x, c->q,...). The key represents a shift. A key of 5 would mean the ...


7

It's called a keyword cipher. See this question for some ways to break it.


7

Since this is homework, let me just give you a hint: consider the two-character messages $m_1 = \text{"aa"}$ and $m_2 = \text{"ab"}$. Given a ciphertext $c$ encrypted with a monoalphabetic substitution cipher, can you tell which of $m_1$ or $m_2$ it corresponds to, even without knowing the key? Why (not)? What does this imply about perfect secrecy? Ps. ...


7

Actually, we have a four-way (that is, four words that will can be converted into any of the others with the right shift). These words are: ax, by, he, if Other two letter words are: am <-> my at <-> pi do <-> it hi <-> no We also have the <-> max I didn't do a systematic search for words over two letters; there certainly ...


7

any other considerations? Yes. In many common use cases the mapping table needs to be retained. That map changes each time a number is added; that's a backup / continuity of service headache. The map is security-sensitive: it contains all the clear phone numbers, and information which (combined with other information) allows getting back to users. The map ...


6

Is this something that exists and could be plausible? Yes, things like that already exist and have even been used by well-known serial killers! (So much for creating a dramatic intro – lol) Monoalphabetic Substitution Cipher What you are referring to, could be categorized as a classical “pigpen cipher”; a monoalphabetic substitution cipher where ...


6

If one can prove that a large amount of image and audio data doesn't exhibit a frequency patter, only then can we consider frequency analysis as a non-viable attack. For a modified simple example, let us say each guitar chord is encoded as a byte of audio data. If you analyse about 70+ songs, you will see that 4 chords are the most frequently used (as ...


6

In a Feistel networks (from the German IBM cryptographer Horst Feistel), the input is divided into two blocks ($L_0$ and $R_0$) which interact with each other. Main example is DES. basic construction: In a SPN (Substitution Permutation Network), the input is divided into multiple small blocks, applied to a S-box (substitution), then the bits positions are ...


6

A monoalphabetic substitution cipher uses a fixed permutation of an alphabet $A$ namely $$\pi:A\rightarrow A,$$ to encrypt a plaintext $P=(P_1,\ldots P_n)\in A^n$ of length $n$ into the ciphertext $C=(C_1,\ldots,C_n) \in A^n$ via $$C_i=\pi(P_i),\quad i=1,\ldots,n.$$ For a natural language, the letter frequencies are non-uniform. Thus, given a long enough ...


6

Your construction is completely insecure: a single known plaintext / ciphertext block pair is sufficient to decrypt all blocks encrypted with the same key. Specifically, let me write your block encryption function $E_K$ as $$c = E_K(p) = P^{(n)}(S^{(n)}(p \oplus K_1 \oplus K_2 \oplus \dots \oplus K_n)),$$ where $p$ is the plaintext block, $c$ is the ...


5

Yes, we can almost certainly break this, given enough ciphertext. One approach would be to use a dictionary and use word patterns. For instance, if the ciphertext word is qddxfozogf, then the plaintext word was probably ammunition. Notice how the 2nd and 3rd letters are the same; and the 5th and 10th letters, and the 6th and 8th letters? The word ...


5

Yes (guessing you are doing the cypher challenge?) The "Beaufort Decoder" is a really good decoding tool (saves you time), then trial and error keywords. Also, the "Vigenère cracking tool can be used to find the length of the keyword. Paste the texts you're decoding; the number of the column(s) with the most x's is the length of the keyword.


5

Given that the permutation is fixed and the key step is independent of the permutation you can reduce this to an ordinary text-substitution cipher. If the key is as long as the input you have a weak one-time pad, because the per letter change is limited to 10 instead of 26. However if the key is short then you have a Vigenère cipher (if you "decode" with $...


5

Based on your sample code I do not consider the scheme secure enough for implementation. Additionally you will run into a few problems if you actually try to implement this to generate DNA strands with encrypted messages in them (ala some kind of futuristic scifi thriller). As the other answer suggests, it would be best to think about using the DNA sequence ...


5

There are different approaches to crack a substitution cipher. A human would use a different strategy than a computer. But as the word boundaries are not preserved it will be rather challenging for a human solving this cipher. The quipqiuq tool mentioned by John is using word lists, but there are other methods as well. Resources: http://...


Only top voted, non community-wiki answers of a minimum length are eligible