根据 CWE-329 NON-Random IV 允许字典攻击的可能性。但是,在 AES 加密示例中,golang 文档使用非随机 IV:
ciphertext := make([]byte, aes.BlockSize+len(plaintext))
iv := ciphertext[:aes.BlockSize]
这个实现是安全的还是我应该使用随机函数来获取我的 IV?
根据 CWE-329 NON-Random IV 允许字典攻击的可能性。但是,在 AES 加密示例中,golang 文档使用非随机 IV:
ciphertext := make([]byte, aes.BlockSize+len(plaintext))
iv := ciphertext[:aes.BlockSize]
这个实现是安全的还是我应该使用随机函数来获取我的 IV?