aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md16
-rw-r--r--cryptfs/log.go2
-rw-r--r--main.go5
-rw-r--r--pathfs_frontend/file.go2
4 files changed, 17 insertions, 8 deletions
diff --git a/README.md b/README.md
index d8f3999..94c3c55 100644
--- a/README.md
+++ b/README.md
@@ -2,12 +2,20 @@ GoCryptFS
=========
A minimal encrypted overlay filesystem written in Go.
-Built on top of the
-native Go FUSE library [bazil.org/fuse](https://github.com/bazil/fuse)
-and the [ClueFS](https://github.com/airnandez/cluefs) loopback file system.
-
Inspired by [EncFS](https://github.com/vgough/encfs).
+GoCryptFS at the moment has two FUSE frontends:
+
+* The [go-fuse](https://github.com/hanwen/go-fuse) FUSE library using its
+ LoopbackFileSystem API
+* The FUSE library [bazil.org/fuse](https://github.com/bazil/fuse) plus the
+ [ClueFS](https://github.com/airnandez/cluefs) loopback filesystem
+
+A frontend is selected on compile-time by setting `USE_CLUEFS` to true or false
+(default false).
+Once I decide that one works better for GoCryptFS, the other one
+will go away.
+
Design
------
* Authenticated encryption of file contents using AES-GCM-128
diff --git a/cryptfs/log.go b/cryptfs/log.go
index 8233529..f9c46c8 100644
--- a/cryptfs/log.go
+++ b/cryptfs/log.go
@@ -15,5 +15,5 @@ func (l logChannel) Printf(format string, args ...interface{}) {
}
-var Debug = logChannel{true}
+var Debug = logChannel{false}
var Warn = logChannel{true}
diff --git a/main.go b/main.go
index 2a140ab..624b2f5 100644
--- a/main.go
+++ b/main.go
@@ -19,12 +19,13 @@ import (
)
const (
- USE_CLUEFS = false
- USE_OPENSSL = false
+ USE_CLUEFS = false // Use cluefs or pathfs FUSE frontend
+ USE_OPENSSL = true // 3x speed increase
PATHFS_DEBUG = false
PROGRAM_NAME = "gocryptfs"
+ // Exit codes
ERREXIT_USAGE = 1
ERREXIT_NEWFS = 2
ERREXIT_MOUNT = 3
diff --git a/pathfs_frontend/file.go b/pathfs_frontend/file.go
index 47c2ffc..8fdd4b2 100644
--- a/pathfs_frontend/file.go
+++ b/pathfs_frontend/file.go
@@ -90,7 +90,7 @@ func (f *file) doRead(off uint64, length uint64) ([]byte, fuse.Status) {
// Read - FUSE call
func (f *file) Read(buf []byte, off int64) (resultData fuse.ReadResult, code fuse.Status) {
- cryptfs.Debug.Printf("\n\nGot read request: len=%d off=%d\n", len(buf), off)
+ cryptfs.Debug.Printf("Read: offset=%d length=%d\n", len(buf), off)
if f.writeOnly {
cryptfs.Warn.Printf("Tried to read from write-only file\n")