Unfortunate to have to do this, but with the new version of git diff
explicitly showing CRLF as ^M this was starting to get annoying. We
shall use Unix newline style in encfs-java going forward.
BoxCryptor uses an unencrypted name algorithm to encrypt file contents
without encrypting filenames. This change implements this algorithm
and adds a unit test. Thanks 1jr for requesting this and providing
test cases.
Also added a volume integration test for this algorithm.
Stream name decoding with chained name IV was broken because chained
name IV computation was unconditionally padding each path element
whereas that should only be done for block name I/O algorithm. Fix
uses each path element as is for chained IV computation with stream
name algorithm.
Also added an integration test case containing a volume created with
encfs 1.7.4 that uses stream name algorithm and chained name IV
with a directory and a test file in that directory to exercise the
path that fails without this commit.
This commit implements the blockMACBytes and blockMACRandBytes options
that cause a header to be inserted in front of every file block
containing a MAC of the block (and optionally some random data).
Added support to EncFSConfig, EncFSConfigParser and EncFSConfigWriter
to recognize these options. Implemented the MAC computation,
verification and insertion in EncFSInputStream and EncFSOutputStream.
Added a new test volume configured with 8 bytes of MAC and 8 bytes of
random bytes as 'testvol-blockmac', and extended EncFSVolumeTest to
include a long file test that verifies the MAC computations.
Added two 6000 byte files to the default and no unique IV test volumes
and added tests that verify decrypted content. These tests are useful
for testing block encryption.
tests to new files
Conflicts:
src/main/java/org/mrpdaemon/sec/encfs/EncFSCrypto.java
src/main/java/org/mrpdaemon/sec/encfs/EncFSFile.java
src/test/java/org/mrpdaemon/sec/encfs/EncFSComparer.java
src/test/java/org/mrpdaemon/sec/encfs/EncFSVolumeTest.java