From 7971bc3e0913983b84a6abca1158053d857d6658 Mon Sep 17 00:00:00 2001 From: Andrea Franz Date: Tue, 2 Oct 2018 15:52:12 +0200 Subject: [PATCH] fix mac full 3DES iv generation --- globalplatform/crypto/crypto.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/globalplatform/crypto/crypto.go b/globalplatform/crypto/crypto.go index c214487..733fad9 100644 --- a/globalplatform/crypto/crypto.go +++ b/globalplatform/crypto/crypto.go @@ -65,7 +65,7 @@ func MacFull3DES(key, data, iv []byte) ([]byte, error) { tmp := make([]byte, length) mode := cipher.NewCBCEncrypter(desBlock, iv) mode.CryptBlocks(tmp, data[:length]) - des3IV = tmp + des3IV = tmp[length-8:] } ciphertext := make([]byte, 8)