1
$\begingroup$

I have an algorithm that requires a set of keys to encrypt a text (image of size N x N). It is an image encryption algorithm for a project. The key can be thought of as a tuple

$x_0, \lambda, d, i, j, DF, U$

where:

  • $0 < x_0 < 1$;
  • $3.57 \leq \lambda \leq 4$,
  • $15 \leq d \leq \infty, 1 \leq i \leq \infty, 1\leq j \leq \infty$
  • $1E8 < DF < 1E9$
  • $U$ is any random $4 \times 4$ matrix.

If this is my parameter set, how can I calculate the key-space of the algorithm?

$\endgroup$
  • $\begingroup$ can you define which parameters are publicly known as part of the key? Because if the $\lambda$ is a floating point number, mathematically (not programmatically) you have already reached infinity. If not specify your floating point mantisa. $\endgroup$ – kelalaka Oct 3 '18 at 7:46
  • $\begingroup$ Floating point precision is $10^{-14}$, i am working on Matlab $\endgroup$ – user311790 Oct 3 '18 at 7:48
  • 4
    $\begingroup$ The keyspace can be determined with knowledge of both the internal floating point format and the external representation of key, typically as characters. But beware that cryptography with floating is often flawed; see this. It tends to produce implementation-dependent results, and to be next to impossible to analyze from a security standpoint. One of few exceptions is cryptography using floating point to perform exact integer arithmetic, like some implementations of poly1305. $\endgroup$ – fgrieu Oct 3 '18 at 8:09
  • 3
    $\begingroup$ The other issue with using floating point values as the key is "what if the value the attacker guesses is 'close'; does that mean that the decrypted value is also 'close'"? If so, that both reduces the key space (as also allows potential attacks where the attacker tries various guesses at the key, and learns when he is getting "warm") $\endgroup$ – poncho Oct 3 '18 at 11:42
  • 1
    $\begingroup$ @user311790 Actually, precision changes with the size of the number that's floating. See the precision graph in my answer @ crypto.stackexchange.com/a/47022/23115. $\endgroup$ – Paul Uszak Oct 3 '18 at 16:00

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.