From 5c6df490678e7dc1aa7a09425d2fdf14fb13f7be Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Tue, 6 Oct 2015 20:51:35 +0200 Subject: Switch to AES-256 AES-256 seems to be becoming the industry standard. While AES-128 is good enough for tens of years to come, let's follow suit and be extra safe. --- gocryptfs_main/main.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'gocryptfs_main') diff --git a/gocryptfs_main/main.go b/gocryptfs_main/main.go index 9ba2648..d6ce064 100644 --- a/gocryptfs_main/main.go +++ b/gocryptfs_main/main.go @@ -151,8 +151,18 @@ func main() { // a safe place func printMasterKey(key []byte) { h := hex.EncodeToString(key) - // Make it less scary by splitting it up in chunks - h = h[0:8] + "-" + h[8:16] + "-" + h[16:24] + "-" + h[24:32] + var hChunked string + + // Try to make it less scary by splitting it up in chunks + for i := 0; i < len(h); i+=8 { + hChunked += h[i:i+8] + if i < 52 { + hChunked += "-" + } + if i == 24 { + hChunked += "\n " + } + } fmt.Printf(` ATTENTION: @@ -163,7 +173,7 @@ If the gocryptfs.conf file becomes corrupted or you ever forget your password, there is only one hope for recovery: The master key. Print it to a piece of paper and store it in a drawer. -`, h) +`, hChunked) } func readPasswordTwice() string { -- cgit v1.2.3