diff options
author | Jakob Unterwurzacher | 2016-05-04 19:09:14 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-05-04 19:56:07 +0200 |
commit | 39f3a24484ffc343d2d5225d5c419082aabb9baa (patch) | |
tree | 04b9d7aa98ef3e18f05b00efe39e5288baeed5c4 /internal/cryptocore/cryptocore.go | |
parent | c92190bf07d27a4c7fbecba5778d11c77c52574e (diff) |
stupidgcm: completely replace spacemonkeygo/openssl
Diffstat (limited to 'internal/cryptocore/cryptocore.go')
-rw-r--r-- | internal/cryptocore/cryptocore.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/cryptocore/cryptocore.go b/internal/cryptocore/cryptocore.go index f286896..7e7f099 100644 --- a/internal/cryptocore/cryptocore.go +++ b/internal/cryptocore/cryptocore.go @@ -4,6 +4,8 @@ import ( "crypto/aes" "crypto/cipher" "fmt" + + "github.com/rfjakob/gocryptfs/internal/stupidgcm" ) const ( @@ -39,8 +41,9 @@ func New(key []byte, useOpenssl bool, GCMIV128 bool) *CryptoCore { } var gcm cipher.AEAD - if useOpenssl { - gcm = opensslGCM{key} + if useOpenssl && GCMIV128 { + // stupidgcm only supports 128-bit IVs + gcm = stupidgcm.New(key) } else { gcm, err = goGCMWrapper(blockCipher, IVLen) if err != nil { |