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.
我正在使用 ECIES 加密技术通过 Internet 发送消息。对于这种方法,会为每条消息生成一个随机密钥。加密密钥取决于此随机密钥。使用相同的、未重新播种的 SecureRandom 生成多个密钥是否安全?
是的。一个设计良好的 SecureRandom 将给出完全不可预测的随机数,这意味着如果攻击者获得一个密钥对或一千个密钥对,这将无助于他预测下一个密钥对。
重新播种安全随机将花费相当长的时间(取决于实际随机位的来源),因此您不想经常重新播种。