简体   繁体   English

SPA RSA 2048认证

[英]SPA RSA 2048 authentication

I am developing SPA in angular and the specific requirement from customer to use RSA 2048 for authentication. 我正在开发SPA并按客户的特定要求使用RSA 2048进行身份验证。 I am a bit skeptical how the authentication token would get generated. 我有点怀疑如何生成身份验证令牌。 I believe the token would generate at the server side and it's server's responsibility to verify against the encrypted credentials. 我相信令牌将在服务器端生成,并且由服务器负责根据加密凭据进行验证。

Am I wrong in my thinking? 我的想法错了吗? Has anyone tried with 2048 RSA authentication earlier? 有没有人尝试过2048 RSA认证?

So this is how it will work, 这就是它的工作方式,

  1. Generated a public & private key using a salt key & 2048 bits. 使用salt key2048位生成了公用和专用密钥。
  2. Public key is kept within the source code to generate a cipher text . 公钥保存在源代码中以生成cipher text
  3. Private key is kept on server to decrypt the cipher text. 私钥保存在服务器上以decrypt密文。
  4. Server will decrypt both the stored password ( already encrypted) with the login password ( encrypted). 服务器将解密已存储的密码(已加密)和登录密码(已加密)。
  5. If both decrypted cypher texts are equal , server will send the auth-key otherwise request is failed. 如果两个解密的密文均相等,则服务器将发送auth-key否则请求将失败。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM