Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在创建一个 Rijndael 文件加密应用程序。我将为每个文件加密使用唯一的 IV。
我的问题:嵌入 IV 信息的合适位置在哪里?
我最初的想法是将它附加在文件内容的末尾。这是一个不错的选择吗?对我来说还有其他更好的选择吗?
在文件的开头更有意义(读者在阅读其余部分之前需要它)。
但是,是的,您可以安全地将其添加到输出中。IV(也许还有盐)不是秘密。