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

标签 ssl certificate digital-signature pki

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

服务器响应验证数字证书并获取公钥以验证数字签名,验证后服务器将使用公钥加密数据并发送给用户。我还使用 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.

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

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

  • 使用公钥加密(假设为 RSA)受限于 key 大小。

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 的连接协议(protocol)不是。 CA 可能具有 REST 服务,但在任何情况下,CA 都不会在未验证证书中包含的用户数据的情况下颁发证书

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

当然是搜索你的编程语言

关于ssl - 使用数字证书和数字签名的安全认证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56127832/

相关文章:

winapi - 验证可执行文件的 Authenticode 签名时内存泄漏?

.Net Web 引用 SSL 错误

c++ - 如何使用 openssl 从 PKCS7.p7b 证书文件中读取证书文件?

ios - 了解 iOS 配置文件

ios - 为 Titanium Appcelerator 项目在 Apple Developer 上注册新设备

python - 如何使用python数字签名PDF?

java - XML 数字签名 Java

带 Apache Nifi 的 SSL 不工作

java - HttpGet 与 HTTPS : SSLPeerUnverifiedException

java - 无法使用 Java 中的 HTTPS GET 请求读取任何响应