From 8f652287bd2457ab22c6a27bc97f9f2949a45493 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Fri, 1 May 2015 08:14:27 +0200 Subject: [PATCH] Add SEC 1 section to comment about IV --- crypto/ecies/ecies.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/ecies/ecies.go b/crypto/ecies/ecies.go index ebdc4e2635..4be91dd3d7 100644 --- a/crypto/ecies/ecies.go +++ b/crypto/ecies/ecies.go @@ -187,7 +187,7 @@ func symEncrypt(rand io.Reader, params *ECIESParams, key, m []byte) (ct []byte, return } /* - In SEC 1 Version 2.0 the IV value is not specified in for XOR CTR. + In SEC 1 Version 2.0 section 3.8 the IV value is not specified in for XOR CTR. It is specified, however, that it should not be transmitted as part of the ciphertext. This means it cannot be random, as the other party would not know the value. Therefore we set it to the zeroed value defined for AES in CTR mode.