密钥管理 - 传统的ASP - 加密/解密 [英] Key Management - Classic ASP - encrypt/decrypt
问题描述
下面是我的情况:
我有文件名为gen.asp,当过有人请求该文件,需要生成一个加密的随机密钥,并将其传递回来。 (Gen.asp不能存储它生成的密钥,任何地方没有会话,没有数据库)
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)
我有一个名为GenValid.asp不同的文件,在这个文件中我需要验证加密的随机密钥是由Gen.asp或不产生天气。 (验证可如果加密的随机密钥进行解密,然后它是一个有效的关键,如果没有它不是一个有效的密钥)
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)
我怎样才能做到这一点?在传统的ASP。
How can I do this? in Classic ASP.
推荐答案
让GenValid.asp有RSA1024公私密钥对。曾与GenValid.asp在gen.asp结束相关的公共密钥。
Let GenValid.asp have a RSA1024 Private-Public key pair. Have the public key associated with GenValid.asp at gen.asp end.
在gen.asp产生会话密钥,让这个会话密钥被包裹/由GenValid.asp的公共密钥blob-ED。
When gen.asp generates the session key, let this session key be wrapped/blob-ed by GenValid.asp's public key.
在此包裹的会话密钥达到GenValid.asp,单打独斗可解开的会话密钥(使用其RSA1024私钥)这一关键的进一步使用。
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.
这篇关于密钥管理 - 传统的ASP - 加密/解密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!