summaryrefslogtreecommitdiff
path: root/cryptfs/address_translation.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-12-19 14:41:39 +0100
committerJakob Unterwurzacher2015-12-19 15:02:29 +0100
commit1caa9258685fa5fad8935d3bfcd0eac7d7f84f1e (patch)
treeabc1e46f269f9ef8f05d812e13fcdf2bae68d298 /cryptfs/address_translation.go
parent88826dc51d7919ef8b190c079955230e653323e2 (diff)
Increase GCM IV size from 96 to 128 bits
This pushes back the birthday bound for collisions to make it virtually irrelevant.
Diffstat (limited to 'cryptfs/address_translation.go')
-rw-r--r--cryptfs/address_translation.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cryptfs/address_translation.go b/cryptfs/address_translation.go
index 147040c..b21cfc7 100644
--- a/cryptfs/address_translation.go
+++ b/cryptfs/address_translation.go
@@ -44,7 +44,7 @@ func (be *CryptFS) CipherSizeToPlainSize(cipherSize uint64) uint64 {
blockNo := be.CipherOffToBlockNo(cipherSize - 1)
blockCount := blockNo + 1
- overhead := BLOCK_OVERHEAD*blockCount + HEADER_LEN
+ overhead := be.BlockOverhead()*blockCount + HEADER_LEN
return cipherSize - overhead
}
@@ -56,7 +56,7 @@ func (be *CryptFS) PlainSizeToCipherSize(plainSize uint64) uint64 {
blockNo := be.PlainOffToBlockNo(plainSize - 1)
blockCount := blockNo + 1
- overhead := BLOCK_OVERHEAD*blockCount + HEADER_LEN
+ overhead := be.BlockOverhead()*blockCount + HEADER_LEN
return plainSize + overhead
}