We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

1

A Vigenère cypher on an alphabet of size $M$, which we identify with the integers modulo $M$, works as follows. The key is an arbitrary word, $k_0 \ldots k_{\ell-1}$. Given a plaintext $p_0 \ldots p_{n-1}$, the ciphertext $c_0 \ldots c_{n-1}$ is given by $$ c_i = p_i + k_{i \bmod \ell} \bmod M. $$ For example, suppose that we are trying to encipher decimal ...


3

The observation is that the denominator of the reduced fraction $1/p_{i_1} + \cdots + 1/p_{i_m}$ is $p_{i_1} \cdots p_{i_m}$. To see this, it suffices to notice that the (unreduced) numerator isn't divisible by any $p_{i_j}$. Indeed, the numerator is simply $$ \frac{p_{i_1} \cdots p_{i_m}}{p_{i_1}} + \cdots + \frac{p_{i_1} \cdots p_{i_m}}{p_{i_m}}. $$ All ...


3

The key property that we want from (non-cryptographic) pseudorandom numbers is that they "look" independent. In particular, say you have some algorithm that requires a PRNG to perform well and you give it a current time function as a PRNG. Then, if the algorithm repeatedly queries what is supposed to be a PRNG, it will actually see that it gets the same ...


1

It's not random. It increases by 1 every milliseconds. In computer terms, it stays unchanged for a loooooong time (millions of clock cycles). But current system time in milliseconds is most definitely not good enough anyway. If an attacker knows that you seeded a random number generator some time today, there are only 86 million possible seed values. ...


2

When using the convention that i and j are in the same square then they are for all intents and purposes regarded as the exact same letter, both in the key and in the plaintext. In the ciphertext, whenever it is required to write 'i/j' you can choose which one to write, while introducing no ambiguity for the decoder (in order to make the ciphertext 'look ...


2

Let $p$ be a prime number and denote by $\mathbb{Z}_p$ the ring of integers modulo $p$. The set $\mathbb{Z}_p^*$ typically denotes the units of $\mathbb{Z}_p$. This set is defined as $$\mathbb{Z}_p^* = \{n \in \mathbb{Z}_p : \exists m \in \mathbb{Z}_p, nm = 1\},$$ where arithmetic is done modulo $p$. An important fact about $\mathbb{Z}_p$ is that it is a ...


Top 50 recent answers are included