使用PHP的数字签名 [英] Digital Signatures with PHP

查看:484
本文介绍了使用PHP的数字签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以让用户对文档进行电子签名?



场景


  1. 我为我网站上的用户上传文档以查看和签名

  2. 用户登录,审核文档,然后以某种方式对其进行数字签名。 (不是其签名的图片)

  3. 我收到文件并验证其是否合法签署。

我宁愿用户不需要下载,用一些第三方工具签名,然后上传文档。我希望他们以某种方式在网页上执行此操作,可能在他们登录时在文档框中输入全名。

解决方案

一种可行的方法是为每个产生加密密钥对,每个用户。这两个密钥(私人密钥和公共密钥)都需要保存在您的服务器上,私钥受密码保护。理想情况下,只有用户自己知道密码(在生成密钥时请求密码,但不保存密码),没有其他人。然后,在用户通过输入他的私人密钥密码签名文件后,你将能够使用他的公共密钥验证他的签名。



这个过程本身很大程度上取决于在您的服务器设置(即访问加密工具,数据库等)。



PS:我怀疑这将是法律约束(至少不是我所在的地方)但您的管辖权可能有所不同。


Is it possible to let users e-sign a document?

Scenario

  1. I upload document for a user on my website to review and sign
  2. User logs in, reviews the document and then somehow digitally signs it. ( not a image of their signature )
  3. I receive document with some way of verifying they legally signed it.

I would prefer the user does not need to download, sign with some third party tool and then upload the document. I want them to somehow perform this action on the webpage maybe by typing there full name in a box against the document while they are logged in.

解决方案

One feasible way would be to generate a cryptographic pair of keys for each and every user. Both keys (the private and the public one) would need to be kept on your server, with the private key being password protected. The password would ideally be known to only the user himself (ask for it when generating the keys but do NOT save it) and nobody else. Then, after the user has signed a document by entering his private key password you would be able to verify his "signature" using his public key.

The process itself greatly depends on your server setup (i.e. access to cryptographic tools, database and the like).

PS: I doubt this would be legally binding (at least not where I am located) but your jurisdiction may vary.

这篇关于使用PHP的数字签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆