aboutsummaryrefslogtreecommitdiff
path: root/internal/contentenc/content.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-05-28 20:44:54 +0200
committerJakob Unterwurzacher2017-05-28 20:44:54 +0200
commit791c78b203be199960274053ea2b1d44c63b07c6 (patch)
tree82ad692eb25336802edf10f83528182772771df7 /internal/contentenc/content.go
parente2341c93d5b113457905b338b414e41892113ec4 (diff)
fusefrontend: aessiv: enable deterministiv file id and block ivdet
Seems to work ok: $ echo aaaaaaaaaaaaaaaaaaa > b/foo $ gocryptfs-xray a/LAh7EiK-kjleJhStVZ1JGg Header: Version: 2, Id: 8d76d368438112fb00cb807fa8210a74 Block 0: IV: b05bb152f77816678230885d09a4a596, Tag: c1c7d580fe01dd1eb543efd9d8eda8ad, Offset: 18 Len: 52 $ > b/foo $ echo aaaaaaaaaaaaaaaaaaa > b/foo $ gocryptfs-xray a/LAh7EiK-kjleJhStVZ1JGg Header: Version: 2, Id: 8d76d368438112fb00cb807fa8210a74 Block 0: IV: b05bb152f77816678230885d09a4a596, Tag: c1c7d580fe01dd1eb543efd9d8eda8ad, Offset: 18 Len: 52 Deterministic diriv generation is still missing. Part of https://github.com/rfjakob/gocryptfs/issues/108
Diffstat (limited to 'internal/contentenc/content.go')
-rw-r--r--internal/contentenc/content.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/contentenc/content.go b/internal/contentenc/content.go
index 8220d89..2a5ddbb 100644
--- a/internal/contentenc/content.go
+++ b/internal/contentenc/content.go
@@ -75,6 +75,11 @@ func (be *ContentEnc) CipherBS() uint64 {
return be.cipherBS
}
+// UsingSIV returns true if we are using AES-SIV for file content encryption.
+func (be *ContentEnc) UsingSIV() bool {
+ return be.cryptoCore.AEADBackend == cryptocore.BackendAESSIV
+}
+
// DecryptBlocks decrypts a number of blocks
// TODO refactor to three-param for
func (be *ContentEnc) DecryptBlocks(ciphertext []byte, firstBlockNo uint64, fileID []byte) ([]byte, error) {