Skip to content

Commit 9801930

Browse files
committed
Minor.
1 parent 6759f22 commit 9801930

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

keystore/encryptor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ func (k *keystore) encryptECDHP256Anonymous(data []byte, remotePubKey []byte) ([
311311
// in P or A if it is convenient to the application.>>>
312312
// However, the second nonce reuse in gcm.Seal(nil, nonce...) is not conventional - this means that we reuse the
313313
// same nonce both for the symmetric key and the block cipher counter.
314-
// It would be simpler to use new nonce here (by just extending nonceSizeECDHP256 size).
314+
// It is not clear why we don't use new nonce here (by just extending nonceSizeECDHP256 size).
315315
ciphertext := gcm.Seal(nil, nonce, data, append(nonce[:], ephPriv.PublicKey().Bytes()...))
316316

317317
// Embed ephemeral public key and nonce in the result

0 commit comments

Comments
 (0)