Tag Info

Hot answers tagged

5

How on earth did you arrive at that formula? You can break a Caesar cipher by calculating the result of applying all of the $n-1$ (i.e., 25) possible shifts to the ciphertext and picking the one that makes sense. The computational complexity is just $\mathcal{O}(n)$. If you want to automate the process based on frequency analysis, the correlation step ...


5

I think it's better to define the keyspace of an unkeyed function as having one element. Some advantages: Computing the key size as $log_2 1$ correctly tells you it's a 0 bit key For encryption you pick one key from the set. You can pick an element of a single element set, but can't pick from an empty set Functions with multiple inputs are often defined ...


5

Perhaps you could do something with Visual Cryptography. Maybe something like: Gather a few low-resolution images (symbols or short text phrases), perhaps a few more images than you have kids Use visual cryptography to split each image into 2 random-looking images, and print each random-looking image on its own piece of transparency paper Shuffle the pile ...


4

You could challenge them to devise low-tech, physical zero-knowledge proofs (of knowledge) for games like "Where's Waldo?" and Sudoku, then show them some methods that really work and why. I've done this before with high school CS students and they seemed to really like it. For "Where's Waldo?" one can prepare a large sheet of paper (at least twice as big ...


4

The permutations in your question are given in Cauchy's two-line notation, where the upper line gives the input index to the permutation function, and the lower line gives the resulting permuted index. For example, the definition $$\sigma = {1\ 2\ 3 \choose 3\ 1\ 2}$$ means the same as $$\sigma(1) = 3,\quad \sigma(2) = 1,\quad \sigma(3) = 2.$$ Thus, if we ...


4

You are actually doing the right thing, however you do not include the "_" as part of the characterset. Assuming the alphabet consists of 27 letters (A-Z and "_"), and using the appended JavaScript script (you can simply paste it into the console), returns one sentence which actually does make sense: THE_FAILURE_MAY_BE_BOTH_DELIBERATE_AND_CLANDESTINE var ...


3

A Vigenère cypher can be unbreakable if, and only if: the key is random, the key is at least as long as the message being encrypted the key is used only once. In that case a Vigenère cypher is mathematically equivalent to a One Time Pad, and the same mathematical proof of unbreakability applies. You proposal is closer to being unbreakable than standard ...


3

Since you encrypt just a single letter, there are $26^2$ combinations of $p$ and $c$ where $c=E(p)$. This is because there are $26$ possible shift keys in the key space, an therefore each $p$ can be mapped to one of $26$ letters in the code space. Now, assuming that the key is distributed uniformly in the key space, each of those combinations of $(p,c)$ has ...


3

You can solve it at http://www.quipqiup.com/index.php in about 5 seconds. contrariwise continued tweedle dee if it was so it might be and if it were so it would be but as it isnt it aint thats logic It's an excerpt from Through the Looking-Glass by Lewis Carroll Information on how quipqiup works is available at http://www.quipqiup.com/howwork.php


3

Vigenere Cryptosystem is as follow: You chose a key $(K_0,...,K_{m-1})$ consisting of elements in $Z_{26}$. Then a ciphertext for the message $(M_0,...,M_{n-1})$ is $$(M_i+K_{i\mod m}\mod 26)_{i \in [0..n-1]}$$ It is easy to see that you can generate a ciphertext for the message $(M_0+1,...,M_{n-1}+1)$ by adding 1 to each letter. It is therefore by ...


3

Iterate through the alphabet (using a smaller alphabet is always a good way to start). So you take letter A and you can combine it with letter B..Z. Now if you take B, then you can combine it with letter A and C..Z. But the combination (A,B) is equivalent to (B,A). So you only have C..Z to consider. Thus you would get (n - 1) + (n - 2) + ... pairs, leaving ...


2

This is a bit contrived, because you have given the correct answer to your test: WHATANICEDAYTODAY was the plain text and the key is crypto. However, it shows one way to attack a short Vigenère cipher, where you have a message only a few times longer than the key. I made the following assumptions: Plain text was a short English text The key was a ...


2

For breaking a Vigenere cipher by frequency analysis the length of the cipher text alone is not the crucial part. What really matters is the proportion cipher_text_len/key_len, as this indicates how many characters of the clear text are encoded by the same character of the key. For the example you provided this proportion is below 3. Frequency analysis ...


2

If the message is shorter than the key, then the Vigenere cipher is essentially the one-time pad, which is unbreakable for a random key. If the key is not random, then you may get some information on the plaintext.


2

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: ...


2

Every classical cipher can be used without a computer's assistance; while simple mechanical ciphers can fall into the "classical cipher" category, in general classical ciphers are pen-and-paper ciphers, almost all of which are more secure than your "press the key to the right of the real one." Vigenere, for instance, has flaws; however, it is much more ...


1

If you consider arbitrary permutations, you have $\frac{n(n+1)}{2}$ possibilities. That means, $O(n^2)$ is the correct complexity in big-O notation, but I don't understand why you need that at all, if you can provide the result as exact formula. Caesar cipher contains just a subset of $n$ possibilities, and therefore obviously $O(n)$. Anyway, this doesn't ...


1

It depends how you look at it. If you regard it as a Caesar cipher then the key is 13 (out of a key space of 26 for uppercase ASCII, although key 0 is a very weak key, resulting in the identify function). If you consider that 13 is part of the ROT13 cipher then it indeed has no key. Of course having a static key or no key does not make a difference in ...


1

The key to a mono-alphabetic substitution cipher is a substitution table. Thus you already have (most of) the key for that cipher, it is a b c d e f g h i j ? D E F G H I ? K L k l m n o p q r s t M N O P Q R S B T U u v w x y z V W X Y C ? where ...


1

As explained on the link you posted, the Vigenere cipher with a key on length $n$ encrypts every $n$-th symbol with the same key under the Caesar cipher. So to calculate the IC you should take all the $n$ sub-sequences separately: $\{1, 1+n, \dots, 1+kn, \dots\}$, $\{2, 2+n, \dots, 2+kn, \dots\}$ and so on and compute the IC for every sub-sequence.


1

There are two possible explanations. The literature you are reading swapped the positions of the plaintext and ciphertext in the second example. If you were to permute TEN, the result is ENT. There is a mistake in either the permutation value or in the resultant ciphertext. If the first example permutation was used, the ciphertext would be correct. ...


1

You have 3 equations and 2 unknowns, so it is solvable, assuming a solution exists. You can plug this into any linear equation solver. If you subtract equation 3 from equation 2, you get $a=-3$, and can solve for $b=75$. This fits equation 2 and 3, but not equation 1. So, no solution exists.



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