Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is not sufficient coverage between the certificates to encrypt all possible bytes #5

Open
WillianBR opened this issue Dec 4, 2020 · 1 comment

Comments

@WillianBR
Copy link

Good morning!

I sorry if it is a silly question, but I clone your REPO and try to run as it is. But I'm keeping getting the same error message (There is not sufficient coverage between the certificates to encrypt all possible bytes!). I looked up for restrictions about the input, but nothing was found. So, my questions are:

  1. There is a minimum size for the keys?
  2. Thre is a minimum size for the input content? If there is, may be I should pad it to reach the lower bound!

The first attempt:

# lenticrypt -e k1 LICENSE  -e k2 README.md -o mensagem.enc
ERROR    There is not sufficient coverage between the certificates to encrypt all possible bytes!
To suppress this error, re-run with the `-f` option.

If I force with flat "-f", it stuck into the point:

# lenticrypt -e k1 LICENSE  -e k2 README.md -o mensagem.enc
WARNING  There is not sufficient coverage between the certificates to encrypt all possible bytes!
[======================================================Building=Dictionary=100%======================================================-]

After I press Ctrl-C, the folder list is:

-rw-r--r-- 1 root root 18025 Dec  3 21:00 LICENSE
-rw-r--r-- 1 root root  2381 Dec  3 21:00 README.md
-rw-r--r-- 1 root root   239 Dec  4 11:48 k1
-rw-r--r-- 1 root root   179 Dec  4 11:48 k2
-rw-r--r-- 1 root root    33 Dec  4 13:05 mensagem.enc

NOTE: This is the firts time I play with denieble cryptographic. I'm just getting started and I'm intending to use your code to learn about.

I'll really apreciate if you could help me out!

@ESultanik
Copy link
Owner

There is an article on page 22 of Proof of Concept or GTFO Issue 0x04 that describes how the encryption algorithm works in a way that should be intelligible even if you don't have a background in Cryptography, which should explain why you are getting this error. In short, it is almost certainly because k1 and k2 are too small.

The general requirement is that for every pair of integers x, y each in the range [0, 255], there must be at least one offset i such that k1[i] == x && k2[i] == y. That's not likely to happen randomly unless k1 and k2 are much larger.

Alternatively, are the values k1 and k2 what you actually want to encrypt? If so, then I think you swapped the values and need to run this:

lenticrypt -e LICENSE k1  -e README.md k2 -o mensagem.enc

You can test if two files have sufficient entropy by using the --test option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants