Encrypted transmission of Web Single Sign-On passwords using RSA

Source: Internet
Author: User

RSA encryption (asymmetric encryption) is used for Logon passwords when you use the single sign-on function of the general permission management system (girI Ga). For details about how to use this permission management system, refer.

 

For the front-end part, refer to the following js files:

<script type="text/javascript" src="ExtJS/jquery.js"></script><script type="text/javascript" src="ExtJS/BigInt.js" ></script><script type="text/javascript" src="ExtJS/RSA.js"></script><script type="text/javascript" src="ExtJS/Barrett.js"></script>

Download: http://files.cnblogs.com/hnsongbiao/ExtJS.zip

Main Code at the front end of the logon page:

setMaxDigits(129);var key = new RSAKeyPair("<%=strPublicKeyExponent%>", "", "<%=strPublicKeyModulus%>");var password = document.getElementById("password");var pwd = encryptedString(key, password.value);

 


Main function code in the background:

 

RSACryptoServiceProvider rsa = ] = rsa.ToXmlString(= rsa.ExportParameters(==)Session[[] results = rsa.Decrypt(HexStringToBytes(password), = = enc.GetString(results);

 

 

 

 

The following shows that the password has been encrypted through RSA asymmetric encryption (symmetric encryption is also implemented here)

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.