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

Still get "A wrong key is not possible to detect..." with --quiet #46

Open
jimav opened this issue Mar 1, 2023 · 4 comments
Open

Still get "A wrong key is not possible to detect..." with --quiet #46

jimav opened this issue Mar 1, 2023 · 4 comments
Assignees
Labels
new feature new feature request

Comments

@jimav
Copy link

jimav commented Mar 1, 2023

From the docs:

-q, --quiet Suppress the final statistics report. If no verbose
output is asked beside this option, nothing is dis‐
played if the operation succeeds
. ...

However if the archive is encrypted a big warning is always displayed:

Warning, the archive <xxx> has been encrypted. A wrong key is not possible to detect, it would cause DAR to report the archive as corrupted

These warning look very messy in output from scripts which search many archives; it would be a nice enhancement if dar did not print this warning until just before printing the first error, if an error occurs (and thus never print the warning if no error occurs).

Thanks.

P.S. Are there some "magic" characters in a header or something? If so then dar could distinguish a wrong key from a media error if it separately encrypted those magic characters by themselves and stored the cyphertext somewhere. I guess that would require a version bump.

@Edrusb
Copy link
Owner

Edrusb commented Mar 4, 2023

OK, I will modify libdar for the warning does not show when -q option is used, this makes sense.

There is some magic character unciphered in the archive header, but having the same information ciphered would weaken the encryption (clear text attack)... but the idea is interesting... looking forward to see whether there is some way of doing that without weakening the encryption...

@Edrusb Edrusb self-assigned this Mar 4, 2023
@Edrusb Edrusb added enhancement behavor/feature enhancement new feature new feature request labels Mar 4, 2023
@Edrusb
Copy link
Owner

Edrusb commented Mar 7, 2023

well, this enhancement implies a change of the libdar API: the -q option stays at dar level (command-line) and the API has today no option to display less than the default, but several ways to display more, calls that the -v option uses. I will thus add this enhancement in master branch, leading this to be released with next major release (2.8.0).

In the meanwhile I can set a compilation option that disable this warning... or you can just comment it out (file src/libdar/macro_tools.cpp line 930) and recompile dar/libdar.

@Edrusb Edrusb added the implemented available in git/master for next major release label Mar 7, 2023
@Edrusb
Copy link
Owner

Edrusb commented Mar 7, 2023

enhancement is implemented (git/master for release 2.8.0) extending -q option to optionally receive an argument "-qcrypto" or "--quiet=crypto"

For the new feature you mentionned (detection of wrong key my mean of ciphering well know info) this is under investigation about security impact and feasibility

@Edrusb
Copy link
Owner

Edrusb commented Mar 26, 2023

enhancement available with release 2.7.9, keeping open for the feature request part

@Edrusb Edrusb removed enhancement behavor/feature enhancement implemented available in git/master for next major release labels Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature new feature request
Projects
None yet
Development

No branches or pull requests

2 participants