aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-09-28reverse: move newDirIVFile into virtualfile.goJakob Unterwurzacher
After all, is's a virtual file.
2016-09-28main: get rid of duplicate "extpass" messageJakob Unterwurzacher
$ gocryptfs -init -extpass "echo test" a Using password provided via -extpass. <<< DUPLICATE Reading password from extpass program The gocryptfs filesystem has been created successfully. You can now mount it using: gocryptfs a MOUNTPOINT
2016-09-26README: storage overhead is 32 bytesJakob Unterwurzacher
As stated in file-format.md.
2016-09-26reverse: switch from GCM-SIV to AES-SIVv1.1-beta1Jakob Unterwurzacher
GCM-SIV is not yet finalized, and the reference implemenation is painfully slow at about 2 MB/s. Switch to AES-SIV.
2016-09-26siv_aead: add AES-SIV AEAD wrapperJakob Unterwurzacher
2016-09-25stupidgcm: add GCM-SIV benchmarkJakob Unterwurzacher
On a CPU without AES-NI: $ go test -bench . Benchmark4kEncStupidGCM-2 50000 24155 ns/op 169.57 MB/s Benchmark4kEncGoGCM-2 20000 93965 ns/op 43.59 MB/s Benchmark4kEncGCMSIV-2 500 2576193 ns/op 1.59 MB/s
2016-09-25tests: add reverse linux tarball testJakob Unterwurzacher
2016-09-25nametransform: downgrade invalid length warningJakob Unterwurzacher
This happens all the time in reverse mode when somebody stats an encrypted symlink target.
2016-09-25Implement changes proposed by gosimple.Jakob Unterwurzacher
Also delete the unused "dirIVNameStruct", found by deadcode.
2016-09-25tests: enable all go vet checksJakob Unterwurzacher
...and fix reported errors: internal/fusefrontend_reverse/rfile.go:40: github.com/rfjakob/gocryptfs/internal/contentenc.FileHeader composite literal uses unkeyed fields internal/fusefrontend_reverse/rfs.go:249: github.com/hanwen/go-fuse/fuse.DirEntry composite literal uses unkeyed fields internal/fusefrontend_reverse/rfs.go:264: github.com/hanwen/go-fuse/fuse.DirEntry composite literal uses unkeyed fields
2016-09-25nametransform: delete unused function DecryptPathDirIVJakob Unterwurzacher
2016-09-25contentenc: rename constant "IVBitLen" to "DefaultIVBits" and clarify commentJakob Unterwurzacher
128-bit IVs are NOT used everywhere.
2016-09-25reverse: add symlink encryption and Readlink supportJakob Unterwurzacher
2016-09-25contentenc: add "ExternalNonce" modeJakob Unterwurzacher
This will be used for strong symlink encryption in reverse mode.
2016-09-25fusefrontend: handle Readlink directlyJakob Unterwurzacher
Calling into go-fuse's loopbackFileSystem does not add any value here.
2016-09-25reverse: more thorough longname stat testJakob Unterwurzacher
Now also verifies the returned file size.
2016-09-25reverse: add gcmsiv flag and associated testsJakob Unterwurzacher
2016-09-25tests: smarter error handling in ResetTmpDirJakob Unterwurzacher
Look at the error code from os.Remove and decide about the right thing to do. Gets rid of spurious fusermount error messages.
2016-09-25reverse: derive file ID and block IVs from file pathsJakob Unterwurzacher
2016-09-25xray: add "gocryptfs-xray", on-disk-format exploration toolJakob Unterwurzacher
Example output for a file encrypted in reverse mode: Header: Version: 2, Id: 0b7f5e2574e4afa859a9bb156a2e7772 Block 0: IV: 0b7f5e2574e4afa859a9bb156a2e7773, Tag: bf39279ac6b1ccd852567aaf26ee386b, Len: 4128 Block 1: IV: 0b7f5e2574e4afa859a9bb156a2e7774, Tag: a4f0f9cde7f70a752254aa8fe7718699, Len: 4128 Block 2: IV: 0b7f5e2574e4afa859a9bb156a2e7775, Tag: b467b153016fc1d531818b65ab9e24f6, Len: 4128 Block 3: IV: 0b7f5e2574e4afa859a9bb156a2e7776, Tag: 1fcb7ffd8f1816fbe807df8148718a5c, Len: 4128 Block 4: IV: 0b7f5e2574e4afa859a9bb156a2e7777, Tag: a217e7933ef434c9f03ad931bb5fde9b, Len: 4128 Block 5: IV: 0b7f5e2574e4afa859a9bb156a2e7778, Tag: f3e6240d75cd66371a0b301111d6f1fc, Len: 4128 Block 6: IV: 0b7f5e2574e4afa859a9bb156a2e7779, Tag: bc85d322ebc7761ae5ef114ea3903a56, Len: 4128 Block 7: IV: 0b7f5e2574e4afa859a9bb156a2e777a, Tag: efda01c6b794690f939a12d6d49ac3af, Len: 4128 Block 8: IV: 0b7f5e2574e4afa859a9bb156a2e777b, Tag: b198329d489d1392080f710206932ff0, Len: 2907
2016-09-25reverse: add longname benchmarkJakob Unterwurzacher
2016-09-25reverse: add longnameParentCacheJakob Unterwurzacher
findLongnameParent has to read the whole directory to find the right file; add a simple cache to avoid most directory scans.
2016-09-25tests: extractloop: use tmp dir based on script nameJakob Unterwurzacher
This is how this should be done as well in future test scripts.
2016-09-25reverse: resolve long names in Open and GetAttrJakob Unterwurzacher
The last patch added functionality for generating gocryptfs.longname.* files, this patch adds support for mapping them back to the full filenames. Note that resolving a long name needs a full readdir. A cache will be implemented later on to improve performance.
2016-09-25reverse: transform long names in OpenDirJakob Unterwurzacher
2016-09-25nametransform: implement ReadDirIV without OpenatJakob Unterwurzacher
As ReadDirIV operates on a path anyway, opening the directory has no clear safety advantage w.r.t. concurrent renames. If the backing directory is a reverse-mounted gocryptfs filesystem, each directory open is an OPENDIR, and this causes a full directory read! This patch improves the "ls -lR" performance of an DIR --> gocryptfs-reverse --> gocryptfs chain by a factor of ~10. OPENDIR counts for ls -lR: Before 15570 After 2745
2016-09-25nametransform: return EINVAL on invalid paddingJakob Unterwurzacher
With the generic fmt.Errorf we trigger a warning from go-fuse: 2016/09/21 21:42:31 can't convert error type: Invalid padding
2016-09-25reverse: use dynamic inode numbersJakob Unterwurzacher
...with stable mappings for hard-linked files.
2016-09-25contentenc: add GCM-SIV supportJakob Unterwurzacher
Also add ReverseDummyNonce nonce generation.
2016-09-25main: init: refuse overwriting .gocryptfs.reverse.confJakob Unterwurzacher
2016-09-25cryptocore: add support for GCM-SIVJakob Unterwurzacher
2016-09-25reverse: fix GetAttr for gocryptfs.confJakob Unterwurzacher
And also don't return the encrypted version of .gocryptfs.reverse.conf in readdir.
2016-09-25reverse: enable init functionalityJakob Unterwurzacher
2016-09-25main: move initDir into its own fileJakob Unterwurzacher
2016-09-25main: add explicit exit after forkChildJakob Unterwurzacher
Trying to make it more obvious what is happening.
2016-09-25main: factor out cli arg parsingJakob Unterwurzacher
The main function has gotten way too big.
2016-09-25reverse: add gocryptfs.conf passthroughJakob Unterwurzacher
2016-09-25reverse: get rid of debug messageJakob Unterwurzacher
2016-09-25reverse: gocryptfs.diriv content was generated from wrong pathJakob Unterwurzacher
Should be derived from the directory name only.
2016-09-25reverse: rename readFile to clearer readBackingFileJakob Unterwurzacher
Also refactor the header generation for nicer code.
2016-09-25reverse: implement dynamic dirivJakob Unterwurzacher
Introduce a unique per-directory diriv that is generated by hashing the encrypted directory path.
2016-09-25reverse: generate file header for Read()Jakob Unterwurzacher
Also create virtual gocryptfs.diriv entries (no content yet).
2016-09-25nametransform: export DirIVLen constantJakob Unterwurzacher
Will be needed by reverse mode.
2016-09-25reverse: print value in file offset panicJakob Unterwurzacher
2016-09-25reverse: let the kernel enforce read-only modeJakob Unterwurzacher
... and print a warning that reverse mode is experimental
2016-09-25reverse: rename types to reverseXYZJakob Unterwurzacher
...to prevent confusion with the forward variants. FS -> reverseFS file -> reverseFile Also add an incomplete read implementation.
2016-09-25contentenc: add helpers for reverse modeJakob Unterwurzacher
Add the reverse variant of DecryptBlocks etc: * EncryptBlocks * JointPlaintextRange * ExplodeCipherRange
2016-09-25main: initial support for reverse modeJakob Unterwurzacher
2016-09-25conentenc: handle zero-sized files in PlainSizeToCipherSizeJakob Unterwurzacher
Previously caused an integer underflow.
2016-09-25reverse: add skeletonJakob Unterwurzacher
Compiles but does not do much else.