Hot answers tagged

3

Let's assume both have a password length of $N$, and an alphabet size of $s$. Then the first has a possible $s^N - (s-1)^N$ many passwords: all passwords except those that are all from the alphabet without an a. The other has $(s-1)^N$ many passwords. Now compare...


1

You must have $b-1\ne 0 \pmod{26}$ and the restrictions $b-1\ne 2n$ and $b-1\ne 13m$ because $b-1\ne 0\pmod{2}$ and $b-1\ne 0\pmod{13}$. In other words $b$ even and $b-1$ not multiple of $13$.


1

Well it depend on two things: First the length of the password The size of the alphabet used for the password Assume that the passwords have length 1 Bob did give away his password but Alice didn't. However if you have only 2 possible letters (say a and b) then it is Alice that gave away her password (a sequence of b's).


1

$M^{17}$ is encoded as $(((M^2)^2)^2)^2\times M$ because it's faster that way. (I don't know why the $(1)^2$ is in there.) The naive way of obtaining $M^{17}$ requires $16$ successive multiplications of $M$. By comparison, if you apply the square function to $M$ (and then its results) four times, you reduce the count to five times. If $M$ is large ...


1

The issue is that $13^{-1}=4\pmod{17}$, since $13\cdot 4\equiv 1\pmod{17}$. "Division" does not exist here, only multiplication by reciprocals. Now, we calculate $6\cdot 4\pmod{17}$, and indeed we get $7$, as desired. By the way, this is not a very good cryptosystem. Suppose we encode each byte of the message this way. Well, most bytes of a text ...


1

If perfect means as few collisions as possible, you can just do $f(n)=(n \pmod N)/10$ where the divide is integer division. You have to have $10$ of each number in the range $[1,N]$ mapped to each hash value, which this does. Often we also ask that hash functions be such that one cannot reasonably predict the hash from the number to be hashed, nor invert ...


1

I do have information after a permutation: I know exactly what the distribution of characters (bytes / alphabet members..) of the plain text was. If I see "trapa" and "olleh", I can certainly tell which one came from "apart".... So it's pretty trivial to win the distinguisher game here (so no perfect secrecy). Added: Another, more formal, way to see ...


1

(a) you get $g^{a-b}=1$ mod $p$. By definition, $r$ "the order of $g$" is the smallest (for the divisor relation) positive integer verifying $g^k=1$ mod $p$. Since $a-b$ also verifies this relation and since $r$ is the smallest, it follows that $r$ must divide $a-b$. No need for Fermat's little theorem, it would only give you that $r$ divides $p-1$. (b) ok. ...


1

A small table will do: $$\begin{array}{r*{5}{c}} x &\pm2&\pm3&\pm4&\pm5\\ \hline x^2& 4&-2&5&3\\ x^4 &5&4&3&-2\\ x^5&\mp1&\pm1&\pm1&\pm1\\ \hline \end{array}$$ Hence the solutions are $$\alpha= 1,\;-2,\;3,\;4,\;5. $$



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