那些“垃圾”是什么?来自加密 ws-security SOAP 消息的未加密 EncryptedData 标记开头是否有 16 个字节? (世界CF)

发布于 2024-08-12 04:09:41 字数 398 浏览 11 评论 0原文

我正在检查 WCF 请求消息,以便实现 WS-Security 标准的一部分,以使 iPhone <-> WCF 相互通信(我在 basicHttpBinding 上使用证书安全性)。
阅读标准 xmlenc-core 我可以解密SignedInfo 和 Body 标签,但我在两个未加密标签的开头看到 16 个字节,我对此一无所知。
我根据标准创建了一个示例应用程序,以便将请求从 iPhone 发送到自托管 WCF,但它继续响应“验证消息安全性时发生错误”。 我唯一不知道如何实现的是这 16 个字节,有人知道这 16 个字节要使用什么吗?

谢谢

I'm inspecting a WCF request message in order to implement part of the WS-Security standard to have iPhone <-> WCF intercommunication (I'm using certificate security over basicHttpBinding).
After reading the standard xmlenc-core I could decrypt both the SignedInfo and the Body tags, but I see 16 bytes at the beginning of both unencrypted tags from which I have no idea.
I create a sample application according to the standard in order to send request from the iPhone to a self hosted WCF but it continues responding "An error occurred when verifying security for the message".
The only thing I don't know how to implement are those 16 bytes, does anybody knows what to use on those 16 bytes?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一腔孤↑勇 2024-08-19 04:09:41

当使用 Triple-DES 和 AES 时,密文以 IV 为前缀。所以解密时,应该使用该值的前16个字节作为IV,然后对剩余字节进行AES-CBC解密。我的猜测是你已经忘记了这一点,因此也在解密 IV(这将产生垃圾)。

When using Triple-DES and AES the cipher-text is prefixed by the IV. So when decrypting, you should use the first 16 bytes of the value as the IV and then perform the AES-CBC decryption on the remaining bytes. My guess is that you have forgotten this and thus are decrypting the IV also (which will yield garbage).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文