Skip to content
Snippets Groups Projects
Commit 74e6b585 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Make chk_encrypt correct with respect to non-block-aligned reads

Tahoe does not guarantee that segment boundaries will fall on AES128 block
boundaries.  After the first segment there's a very high chance reads will no
longer be block-aligned.

The `ctr` function used here produces correct results for a read of a partial
AES128 block but then forever after produces incorrect results.

Therefore, always read a full block if it is available.  A partial block can
still be read but only as the very last block ever.
parent 37e6a717
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment