使用数字证书和数字签名的安全认证

Secure Authentication using Digital Certificate and Digital Signature

我正在通过 PKI 开发身份验证。我不熟悉通过 PKI 对用户进行身份验证,所以在互联网上阅读后我想出了这个解决方案。用户将创建一个 public 和私钥。要验证 public 密钥,用户将申请数字证书。数字证书将包含 public 密钥、用户的元数据和证书颁发机构的数字签名。为了证明没有数据被篡改,用户将使用数字签名,这将是证书与用户私钥的哈希值。用户将数字证书、数字签名和数据发送到服务器。

服务器响应验证数字证书并获取public密钥来验证数字签名,验证后服务器将使用Public密钥加密数据并发送给用户。我也在使用 https 来安全传输信息。

现在我对如何务实地完成这件事感到困惑。

  1. 从哪里可以获得数字证书,主要是哪些可信的CA?
  2. 我发送证书的证书颁发机构是否有任何 REST API 来验证证书?
  3. 是否有任何库可以解析证书以提取信息?

对不起,我是数字证书和数字签名方面的新手。

To prove no data tampering the user will use the Digital Signature which will be the hash of the certificate with the private key of the user.

不,数字签名是使用私钥在消息数据上生成的。证书是用来验证的

The server in response verify the Digital Certificate and grab the public key to validate the Digital Signature and after verification the Server will encrypt the data using Public key and send to the user. I am also using https for the secure transfer of the information.

  • 您应该在注册过程中将 public 密钥关联到用户帐户

  • 使用https,额外的加密是多余且无用的

  • 使用 public 密钥(假设 RSA)的加密受限于密钥大小。

From where I can get the Digital Certificate, majorly which are the trustful CA ?

每个浏览器都有自己的信任列表。此外,欧盟还存在合格证书提供商列表。列表不同。

您也可以构建自己的 CA

Is there any REST API by the Certificate Authority where I send the certificate to validate a certificate?

请求证书的消息格式是标准化的(pkcs #10),但与 CA 的连接协议不是。 CA 可能具有 REST 服务,但无论如何,CA 永远不会在未验证证书中包含的用户数据的情况下颁发证书

Is there any library to parse the certificate to extract the information?

当然,搜索你的编程语言