密钥管理 - 经典 ASP - 加密/解密

发布于 2024-09-14 03:42:14 字数 255 浏览 2 评论 0原文

这是我的场景:

我有一个名为 gen.asp 的文件,当有人请求该文件时,它需要生成一个加密的随机密钥并将其传回。 (Gen.asp 无法存储它生成的密钥,任何地方都没有会话,没有数据库)

我有一个名为 GenValid.asp 的不同文件,在这个文件中我需要验证加密随机密钥是否由 Gen.asp 生成或不是。 (验证可以是,如果加密的随机密钥可以被解密,那么它是一个有效的密钥,如果不能,它不是一个有效的密钥)

我该怎么做?在经典 ASP 中。

Here is my scenario:

I have file called gen.asp, when ever someone requests this file It needs to generate a encrypted-random-key and pass it back. (Gen.asp can not store the key it generated, anywhere no session, no database)

I have a different file called GenValid.asp, in this file I need to verify weather the encrypted-random-key is generated by Gen.asp or not. (validation can be if the encrypted-random-key can be decrypted then it's a valid key, if not it's not a valid key)

How can I do this? in Classic ASP.

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

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

发布评论

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

评论(1

暮色兮凉城 2024-09-21 03:42:14

让 GenValid.asp 有一个 RSA1024 私钥-公钥对。在 gen.asp 末尾具有与 GenValid.asp 关联的公钥。

当 gen.asp 生成会话密钥时,让该会话密钥被 GenValid.asp 的公钥包装/blob-ed。

当此包装的会话密钥到达 GenValid.asp 时,它可以单独解开会话密钥(使用其 RSA1024 私钥)以进一步使用此密钥。

Let GenValid.asp have a RSA1024 Private-Public key pair. Have the public key associated with GenValid.asp at gen.asp end.

When gen.asp generates the session key, let this session key be wrapped/blob-ed by GenValid.asp's public key.

When this wrapped session key reaches GenValid.asp, it alone can unwrap the session key (using its RSA1024 Private key) for further usage of this key.

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