Commit graph

28 commits

Author SHA1 Message Date
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
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
eabe5b5902 cleanup many inspection things 2013-02-17 23:51:59 +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
a8566ff42b cleanup EncFSFileProvider.java 2013-02-17 16:06:36 +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
Mark Pariente
ac206ef549 Validate config dependencies for externalChainIv
UniqueIV and ChainedNameIV are required for externalChainIV.
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
808eb37c91 Fail to create volume if externalIVChaining=1 2012-08-22 23:13:27 -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
afea85bf68 Implement EncFSFileProvider.getRootPath() 2012-04-28 01:49:21 -07:00
Mark Pariente
59b860cf92 Rename EncFSVolume constants to shorter versions 2012-04-27 23:31:21 -07:00
Mark Pariente
f5daf6d52a Code style, formatting and API name cleanups
This is a massive commit serving a few purposes:

 * Unify code formatting and style to conform to Eclipse formatting. We
   will use this formatting from now on for all new code to have a
   uniform codebase.

 * Clean up API naming and remove redundancies. I've renamed a lot of
   API functions to promote coherence across the codebase. I've also
   removed some redundant API's to promote best practices.

 * Improve JavaDoc coverage. This commit documents all public methods
   within the library itself.

 * Fix JavaDoc warnings.
2012-02-27 23:03:14 -08:00
Mark Pariente
3e825f410a Merge remote-tracking branch 'aefo/master' into master
Conflicts:
	src/main/java/org/mrpdaemon/sec/encfs/EncFSConfigWriter.java
	src/main/java/org/mrpdaemon/sec/encfs/EncFSVolume.java
	src/test/java/org/mrpdaemon/sec/encfs/EncFSVolumeTest.java
2012-02-22 21:08:52 -08:00
aefo
9625039638 Added further tests for EncFSVolume 2012-02-22 19:28:42 +00:00
Mark Pariente
7461211c01 Add support for per-block MAC headers
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.
2012-02-20 12:08:18 -08:00
Mark Pariente
e69353840d EncFSVolume constructor refactoring
Removed all File based constructors for EncFSVolume. Only kept the
following constructors:

EncFSVolume(String rootPath, String password)
EncFSVolume(String rootPath, byte[] passwordKey)
EncFSVolume(EncFSFileProvider fileProvider, String password)
EncFSVolume(EncFSFileProvider fileProvider, byte[] passwordKey)
EncFSVolume(EncFSFileProvider fileProvider, EncFSConfig config,
            String password)
EncFSVolume(EncFSFileProvider fileProvider, EncFSConfig config,
            byte[] passwordKey)

The first two constructors are easy to use ones for volumes on the local
filesystem. The next two allow non-local storage to be plugged in using
a custom EncFSFileProvider implementation. The last two allow the config
file to be parsed externally, to support the use case where the config
file is located separately than the volume.
2012-02-01 18:59:49 -08:00
aefo
86e4ead7fc Refactor to allow non local file system based volumes 2012-01-08 16:25:23 +00:00
aefo
bdee7ef4fa Merge remote-tracking branch 'upstream/master'. Also extracted unit
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
2011-12-21 18:05:11 +00:00
Mark Pariente
1fb202421f Implemented nameio/stream file name encryption algorithm
This change adds support for nameio/stream mode of filename encryption.
Also as a bonus change it fixes the MAC computation for volumes that
do not use chained name IV.
2011-12-16 01:41:40 -08:00
Mark Pariente
2d5b0837d2 Bugfix: use equals() to compare strings 2011-11-19 19:53:09 -08:00
Mark Pariente
91df44286b Initial commit of encfs-java 2011-11-11 00:09:46 -08:00