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

new crypto does not need to call ._assert_id() #6880

Merged

Conversation

ThomasWaldmann
Copy link
Member

@real-or-random
Copy link

The call to assert_id is also in the pseudocode in the docs, so it should be removed there, too.

Do you think borg check --verify-data should still recompute the MAC? I don't think so, just checking.

@ThomasWaldmann
Copy link
Member Author

Fixed docs, thanks for the hint.

ArchiveChecker.verify_data only calls key.decrypt() so it is already fixed by my change in the decrypt method, right?

@ThomasWaldmann
Copy link
Member Author

ThomasWaldmann commented Jul 20, 2022

But we could give decompress=False to save some cpu time. Only works for new repos, but we do not support checking old repos anyway.

Hmm, yes for AEAD modes, no for Authenticated (but not encrypted) and plaintext mode.

Hah, looks like using AEAD encryption will be faster for --verify-data than not using encryption. :-)

@codecov-commenter
Copy link

codecov-commenter commented Jul 20, 2022

Codecov Report

Merging #6880 (b0db800) into borg2 (0037375) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##            borg2    #6880      +/-   ##
==========================================
+ Coverage   82.47%   82.49%   +0.01%     
==========================================
  Files          65       65              
  Lines       11042    11042              
  Branches     2230     2230              
==========================================
+ Hits         9107     9109       +2     
+ Misses       1425     1424       -1     
+ Partials      510      509       -1     
Impacted Files Coverage Δ
src/borg/crypto/key.py 87.13% <ø> (-0.02%) ⬇️
src/borg/archive.py 83.45% <100.00%> (+0.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0037375...b0db800. Read the comment docs.

@ThomasWaldmann ThomasWaldmann force-pushed the new-crypto-no-assert-id-borg2 branch from 6b1bff2 to b0db800 Compare July 20, 2022 13:51
@ThomasWaldmann ThomasWaldmann merged commit 320190d into borgbackup:borg2 Jul 21, 2022
@ThomasWaldmann ThomasWaldmann deleted the new-crypto-no-assert-id-borg2 branch July 21, 2022 18:44
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

Successfully merging this pull request may close these issues.

3 participants