aboutsummaryrefslogtreecommitdiff
path: root/internal/siv_aead/siv_aead.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-10-03 23:58:19 +0200
committerJakob Unterwurzacher2016-10-03 23:58:19 +0200
commit46018785b41cac7cfd79174e7f7ca41443a7231a (patch)
tree3fd23841bea3d1c011a1c3110701db12cc715540 /internal/siv_aead/siv_aead.go
parentb7be386e463e67133069036141655fb2b2035047 (diff)
siv_aead: Overhead is always 16
Add a test for that. Also test operations using a 64-byte key.
Diffstat (limited to 'internal/siv_aead/siv_aead.go')
-rw-r--r--internal/siv_aead/siv_aead.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/internal/siv_aead/siv_aead.go b/internal/siv_aead/siv_aead.go
index 21106a5..a0ed882 100644
--- a/internal/siv_aead/siv_aead.go
+++ b/internal/siv_aead/siv_aead.go
@@ -22,11 +22,7 @@ func (s *sivAead) NonceSize() int {
}
func (s *sivAead) Overhead() int {
- // RFC5297:
- // [...] the key length used by AES in CTR and S2V is len(K)/2 and will
- // each be either 128 bits, 192 bits, or 256 bits.
- return len(s.key) / 2
-
+ return 16
}
// Seal - encrypt "in" using "nonce" and "authData" and append the result to "dst"