Add README.md
Also, run go fmt
This commit is contained in:
parent
0a35d0970e
commit
f2e2b81361
38
README.md
Normal file
38
README.md
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
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).
|
||||||
|
|
||||||
|
Design
|
||||||
|
------
|
||||||
|
* Authenticated encryption of file contents using AES-GCM-128
|
||||||
|
* 96 bit nonce that starts from a random value and counts up
|
||||||
|
* uses openssl through [spacemonkeygo/openssl](https://github.com/spacemonkeygo/openssl)
|
||||||
|
for a 3x speedup compared to `crypto/cipher`
|
||||||
|
* AES-CBC filename encryption
|
||||||
|
|
||||||
|
Current Status
|
||||||
|
--------------
|
||||||
|
* Work in progress
|
||||||
|
* Key is set to static all-zero
|
||||||
|
* Not ready for anything but testing and debugging
|
||||||
|
|
||||||
|
Testing
|
||||||
|
-------
|
||||||
|
Run `./main_benchmark.bash` to run the test suite and the streaming read/write
|
||||||
|
benchmark.
|
||||||
|
|
||||||
|
The output should look like this:
|
||||||
|
|
||||||
|
$ ./main_benchmark.bash
|
||||||
|
+ go build
|
||||||
|
+ go test -bench=.
|
||||||
|
PASS
|
||||||
|
BenchmarkStreamWrite 100 14062281 ns/op 74.57 MB/s
|
||||||
|
BenchmarkStreamRead 100 11267741 ns/op 93.06 MB/s
|
||||||
|
ok github.com/rfjakob/gocryptfs 7.569s
|
11
main.go
11
main.go
@ -1,14 +1,13 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"path/filepath"
|
|
||||||
"flag"
|
|
||||||
"os"
|
|
||||||
"fmt"
|
|
||||||
"github.com/rfjakob/gocryptfs/frontend"
|
|
||||||
"bazil.org/fuse"
|
"bazil.org/fuse"
|
||||||
fusefs "bazil.org/fuse/fs"
|
fusefs "bazil.org/fuse/fs"
|
||||||
|
"flag"
|
||||||
|
"fmt"
|
||||||
|
"github.com/rfjakob/gocryptfs/frontend"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
15
main_test.go
15
main_test.go
@ -1,15 +1,15 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
|
||||||
"fmt"
|
|
||||||
"time"
|
|
||||||
"testing"
|
|
||||||
"os"
|
|
||||||
"os/exec"
|
|
||||||
"io/ioutil"
|
|
||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"io/ioutil"
|
||||||
|
"os"
|
||||||
|
"os/exec"
|
||||||
|
"testing"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
const tmpDir = "test_tmp_dir/"
|
const tmpDir = "test_tmp_dir/"
|
||||||
@ -43,7 +43,6 @@ func TestMain(m *testing.M) {
|
|||||||
|
|
||||||
r := m.Run()
|
r := m.Run()
|
||||||
|
|
||||||
|
|
||||||
fu.Run()
|
fu.Run()
|
||||||
os.Exit(r)
|
os.Exit(r)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user