Commit graph

85 commits

Author SHA1 Message Date
Mark Pariente
cc1a1b6316 Rename derivedPassword -> derivedKeyData 2013-03-09 20:15:00 -08:00
Mark Pariente
7eac39ff60 Comment, visibility and naming fixes 2013-02-24 22:56:13 -08:00
Mark Pariente
d3f11ff3a0 Rename EncFSAlgorithm -> EncFSFilenameEncryptionAlgorithm 2013-02-24 18:38:16 -08:00
Mark Pariente
dc1303866e Comment fixes and renaming in EncFSVolume 2013-02-24 18:21:19 -08:00
Mark Pariente
4e0c38a2a6 Rename {Block|Stream}Cryptography -> {Block|Stream}Crypto 2013-02-22 21:51:28 -08:00
Mark Pariente
716555ab51 Fix formatting 2013-02-22 21:04:17 -08:00
Lars Gohlke
43a8b748cf more cleanups 2013-02-18 00:21:43 +01:00
Lars Gohlke
a5cde51f04 reduced flag arguments 2013-02-18 00:12:56 +01:00
Lars Gohlke
eabe5b5902 cleanup many inspection things 2013-02-17 23:51:59 +01:00
Lars Gohlke
f42c0460f0 moved stream things out of EncFSCrypto 2013-02-17 23:37:13 +01:00
Lars Gohlke
cdf8275e69 move Volume creation into the Builder 2013-02-17 21:06:52 +01:00
Lars Gohlke
1d30a7d928 cleanup 2013-02-17 20:08:05 +01:00
Lars Gohlke
c50d0500b2 cleanup 2013-02-17 19:48:15 +01:00
Lars Gohlke
2a292c9ed8 added fail test for EncFSAlgorithm 2013-02-17 19:21:35 +01:00
Lars Gohlke
8614e3f4ec added fail test for EncFSAlgorithm 2013-02-17 19:21:20 +01:00
Lars Gohlke
010631b166 created Builder for EncFSVolume 2013-02-17 19:09:47 +01:00
Lars Gohlke
24eb9121e2 reformatted all 2013-02-17 17:18:14 +01:00
Lars Gohlke
82150ae423 removed @throws javadocs 2013-02-17 17:16:20 +01:00
Lars Gohlke
df09d465c4 fixed threading issue 2013-02-17 16:50:19 +01:00
Lars Gohlke
a8566ff42b cleanup EncFSFileProvider.java 2013-02-17 16:06:36 +01:00
Lars Gohlke
6a45007f29 cleanup EncFSCryptoTest.java 2013-02-17 15:57:08 +01:00
Lars Gohlke
e44781ac67 introduced abstract test class for identical tests for different settings 2013-02-17 15:47:58 +01:00
Lars Gohlke
c72cc51d02 cleaned up EncFSConfig.java 2013-02-17 15:32:03 +01:00
Lars Gohlke
0ccb480b13 Revert "reformatted code"
This reverts commit 23c1e5d78c.
2013-02-17 13:57:37 +01:00
Lars Gohlke
23c1e5d78c reformatted code 2013-02-17 13:39:27 +01:00
Lars Gohlke
8ec6533bc2 cleanup of EncFSUtil 2013-02-17 13:21:09 +01:00
Lars Gohlke
3c971a0476 inlined some var declaration 2013-02-17 12:58:52 +01:00
Lars Gohlke
662cf9652a used methods from jdk to create byte arrays from int and long 2013-02-17 12:58:16 +01:00
Mark Pariente
3c91144609 Move test classes into their own namespace 2012-10-14 22:10:50 -07:00
Mark Pariente
1400864304 Add volume integration test for externalIvChaining 2012-10-14 17:17:35 -07:00
Mark Pariente
7ca1633809 Add support for externalIvChaining in EncFS{Input|Output}Stream
This commit implements support for externalIvChaining in
EncFSInputStream and EncFSOutputStream which causes a file's volume path
to change the initialization vector (IV) which is used for encrypting
and decrypting the file contents.
2012-10-14 16:59:32 -07:00
Mark Pariente
b18c762bcb Recursively delete directories in EncFSLocalFileProvider
EncFSLocalFileProvider.delete() was only deleting a directory if it was
completely empty. It is more functional to just recursively delete
everything under a directory if its not empty.
2012-09-16 19:41:23 -07:00
Mark Pariente
08dfe3d7ad Fix return types for EncFSFile.open{Input|Output}Stream
These methods were returning InputStream/OutputStream instead of the
more specific EncFSInputStream and EncFSOutputStream.
2012-08-26 00:08:54 -07:00
Mark Pariente
83cf5d0d2d Fix CRLF usage
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.
2012-08-22 23:08:00 -07:00
Mark Pariente
cdcd5923e8 Implement unencrypted filename support (nameio/null)
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.
2012-08-14 00:46:32 -07:00
Mark Pariente
cd75f18bb4 EncFSVolumeIntegrationTest shouldn't depend on file ordering 2012-07-22 19:06:07 -07:00
Mark Pariente
e8bf978fb4 Switch file ordering for volume integration test 2012-07-14 15:52:21 -07:00
Mark Pariente
3214ebc711 Eclipse formatting (whitespace fixes) 2012-06-25 22:28:17 -07:00
Zdenek Farana
ce6b9c4417 Simple method for checking if the provided path contains EncFS volume by detecting EncFS config file 2012-06-25 23:34:06 +02:00
Mark Pariente
4a08de9e25 Fix test failures in EncFSVolumeIntegrationTest 2012-06-13 02:16:30 -07:00
Mark Pariente
d1dcd79036 Add a test for file length calculations
Testing for EncFSVolume.getEncryptedFileLength() and
EncFSVolume.getDecryptedFileLength()
2012-05-24 20:21:40 -07:00
Mark Pariente
7a370eb704 Make EncFSFileOutputStream take a length parameter
Unfortunately some network storage systems such as Dropbox require
length of the file before opening an upload request so we need to
plumb file length all throughout the OutputStream creation. It is
optional for EncFSLocalFileProvider, but it is good practice to
supply this parameter whenever possible.
2012-05-24 20:21:31 -07:00
Mark Pariente
18cdf3b477 Fix stream name decoding with chained name IV
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.
2012-04-29 01:49:34 -07:00
Mark Pariente
afea85bf68 Implement EncFSFileProvider.getRootPath() 2012-04-28 01:49:21 -07:00
Mark Pariente
c50de9fdd3 Implement separator interface for EncFSFileProvider 2012-04-28 01:39:33 -07:00
Mark Pariente
6849feb613 Use constants instead of "/" for volume paths 2012-04-27 23:37:46 -07:00
Mark Pariente
59b860cf92 Rename EncFSVolume constants to shorter versions 2012-04-27 23:31:21 -07:00
Mark Pariente
3ea8d871a7 Add a test case for recursive directory copying 2012-04-25 23:42:09 -07:00
Mark Pariente
117d181cf4 EncFSVolumeTest improvements
Create many different types of volumes and run the file operations
test on each volume. The following volume configurations are now
being tested:

* Default volume
* No Unique IV
* No Chained name IV
* No Unique IV or Chained IV
* No zero block passthrough
* 256-bit volume key
* 128-bit volume key
* 4096 byte block size
* Stream name algorithm
* 8 byte block MAC header
* 8 byte block MAC header + 8 random bytes

Also, I've split off the core testing logic into EncFSVolumeTestCommon,
and created two separate tests, one using CommonVFSFileProvider and one
using EncFSLocalFileProvider.

Misc cleanups:

* Split off createTempDir() to be under EncFSVolumeTestCommon
* Sort file lists in testFileOperations to deal with arbitrary ordering
  from EncFSFileProvider's
2012-03-07 23:31:32 -08:00
Mark Pariente
ab016fef4c Fix CommonVFSFileProvider.copy()
For some reason FileObject.copyFrom() was failing to copy files, so
instead use FileUtil.copyContents().
2012-03-07 23:31:32 -08:00