开发者

Encrypting ASP.NET text fields at client-side and decrypting them at server-side

I have a content-sensitive firewall between my clients and my server. I开发者_StackOverflow中文版f we exclude SSL solution (it's not available in my case) then I was thinking of a javascript library which encrypts custom fields at client-side and a .NET class decrypts them at server-side.

Is there any solution out of the box (maybe a server control) ?


Just an idea, would be to use Javascript RSA creating the Public/Private pair on the server and sending the public key down with the page, then encrypting the data and sending it up to the server to decrypt. Key Management could be tricky though. I personally would opt for a new Key Pair for every request, but that would mean the server would need to tie up the which public keys were given to which request.

I've done this in Delphi code because I was too lazy to use SSL. :)


If you want to just hide the data from being inspected/tracked by the firewall, then you can use simple ROT13 or XOR or other trivial obfuscation to mangle the text data that is posted. You will need to do this on field-by-field basis and you will need to employ JavaScript, of course. both ROT13 and XOR methods are trivial to implement in both JavaScript and C#.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜