<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 7 年前。
<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 7 年前。
我需要使用 Java 在 Windows/Mac 上构建一个应用程序,并在 IOS 和 Android 上构建单独的原生应用程序以使用 Serpent 进行加密。
我在 Java 上为 win/mac 使用 Bouncy CaSTLe 并在 iOS 上使用 Crypto++ 实现,但是我用 Bouncy CaSTLe 加密的内容不能用 Crypto++ 解密,反之亦然。
有谁知道为什么 Bouncy CaSTLe 和 Crypto++ 不能互操作?
谢谢!
最佳答案
对于 BC,您需要使用 http://www.bouncycastle.org/betas 处的版本事实证明,NESSIE 向量实际上定义了正确的输入/输出顺序。 AES 提交将它们覆盖了。
如果对 AES 提交有任何帮助,实现的 AES 现在称为 Tnepres,只有符合 NESSIE 矢量的版本才称为 Serpent。 BC 的 1.54 beta 提供了 Tnepres 和 Serpent。不幸的是,由于 BC 和 Serpent 作者之间的误解,BC 1.53 及更早版本实际上实现了 Tnepres。
关于ios - 使用 Crypto++ 和 Bouncy CaSTLe 使用 Serpent 进行加密和解密?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34205766/