Multiplication encryption with a small number Given a big number $x$(1024 bits) and a large prime $N$($N&gt;x$), I want to encrypt it with a smaller number $y$(128 bits).
$$Enc(x) = xy \mod{N}.$$
Is it safe? If not, how do I evaluate its leakage?
The most basic security is &quot;Indistinguishability in the presence of an eavesdropper&quot;. This is based on a simple experiment. An adversary $A$ sends two messages $m_0$, $m_1$ to a challenger $C$. The challenger encrypts one of the messages (randomly chosen, say  $C$ chooses $b \in \{0,1\}$ uniform random and encrypts $c_b = Enc(m_b)$). The ciphertext is then send to $A$. The adversary now has to find out, which message was encrypted and sends $b'=0$ or $b'=1$ to $C$. If $b = b'$ we say $A$ wins.
Now we look at your Encryption: $A$ knows $Enc(x)$ and $x$. With the extended euclidean algorithm $A$ can compute $y$ and therefore can distinguish $c_b$. So $A$ wins the experiment and the Encryption system does not even provide the most basic concept of security.