From 791c78b203be199960274053ea2b1d44c63b07c6 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 28 May 2017 20:44:54 +0200 Subject: fusefrontend: aessiv: enable deterministiv file id and block iv 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 --- internal/contentenc/content.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'internal/contentenc') 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) { -- cgit v1.2.3