S
S
Sienore2017-11-26 23:09:37
Database
Sienore, 2017-11-26 23:09:37

How to sign EDS documents and store them in the database?

Hello.
The organization uses an information system of its own design, the essence of which is the formation of applications in branches, sending them for approval to the parent organization and exchanging data with the accounting system (1C: Enterprise). The system works through a browser using PHP, MySQL and JavaScript (Node.js). The data is stored in multiple database tables and is collected together by a query when displayed to the user.
We would like to use an electronic signature when forming and approving the application.
I ask you to explain whether it is possible to implement this using existing technologies and how to store a signature or a signed application in the database (what type of field)?
I have never worked with EDS, so please explain everything in detail.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2017-11-27
@Sienore

As a rule, an electronic signature of a document is made in the form of a hash sum of a controlled set of document attributes (text, title, author, etc.), encrypted with a private key. For verification, the same hash sum is calculated again, the signature is decrypted with a paired public key, and the decrypted hash sum is compared with the calculated one. If they match, the signature is valid. If any attribute of the document has been changed, then the hash sums will not match.
In the first option, both parts of the key are stored in the system; to sign the document, the user enters the password for the private key, and the signing takes place directly on the server.
In the second, stronger version, the private part of the key is stored by the user on a crypto medium. The generated document is transferred from the server to the client, signed through a crypto provider (for example, CryptoPro EDS Browser plug-in) and the signature is sent back to the server.
In both cases, the public part of the key is stored on the server and serves to verify the signature.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question