Digital signature and digital certificate Technology Brief (two)

Source: Internet
Author: User
Tags sha1

Information Digest, digital signature

According to the article, the asymmetric key algorithm is:

http://blog.csdn.net/u014419512/article/details/26290821

Now we are able to continue our scene:

If one day. Alice received a copy of the signature Bob the file. Alice wished to confirm that the document must have come from Bob, and Alice wished to be sure. The document was not tampered with in the course of its transmission. So what should we do based on asymmetric key algorithms?

The confirmation file must come from Bob, in fact Bob cannot deny that he sent the document. Information security is called non-repudiation . On the other hand, it is known that the file is not tampered with, and is called non-tamper .

The asymmetric key algorithm mentions that public key cryptography uses the private key to decrypt the content. Similarly, private key-based content can be decrypted using the public key, which is one by one corresponding.

So we can think very easily. Suppose Bob uses the private key in his own hand to encrypt the file and transfer it to Alice. Alice is then decrypted by Bob 's public key in the public key library , which proves that the file must have been issued by Bob (due to only Bob holds the private key).

In addition, since the transmission is ciphertext, it is assumed to be able to use the public key decryption, at the same time proved that the file has not been tampered with.

This practice has in fact satisfied the non-repudiation and non-tamper at the same time.

however. Because the transmitted files can be very large, in order to prove the file's non-repudiation and non-tamper, the entire file needs to be encrypted, because the asymmetric algorithm is inefficient. The cost of doing so is too great. So the general practice is to use the Information Digest and the way of the digital signature .

The so-called Information Digest, in fact, is some kind of HASH algorithm. Converts information into a fixed-length character, which has the following characteristics:

① No matter how long the message was entered. The length of the computed message digest is always fixed .

② uses the same abstract algorithm to extract two times of the same message, the result must be the same;

③ in general. Only the messages you want to enter are different. Summary messages generated after the summary are almost impossible to do the same;

the ④ message digest function is a one-way function. That is, only the positive information can be summarized, but not from the digest to recover no matter what the message ;

⑤ a good digest algorithm, no one can find a " collision "from it. Although the " collision " is definitely present.

That is, for a given digest, it is not possible to find a message so that its digest is exactly the given one. Or, there are two messages that cannot be found. Are the same as their summaries.

In general, we also refer to the abstract of information as the fingerprint of information. Like the meaning of a fingerprint. The same information must be the same fingerprint, and only through the fingerprint can not restore the original information. The basic abstract algorithms now have MD5 and SHA1.

When the information digest technology is available. Based on the scenario where Bob sends a file to Alice, we can do things like the following:


The first step:

①bob the original information to the Information Digest algorithm, obtains the original information summary value;

②bob uses its own private key to encrypt the digest value. Get the ciphertext of the information digest;

③bob sends the ciphertext of the original file and the digest value together to Alice.

④, we refer to the original file and the digest ciphertext as Bob 's signature result for the original file.


watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdtaxndqxotuxmg==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">

Step Two:

① when Alice receives The information that Bob transmits (the original file. Message summary ciphertext). Use Bob 's public key to decrypt the digest ciphertext and get the message digest plaintext;

② uses the Information digest algorithm, obtains the summary information of the original text, gets the original file summary information.

③alice The decrypted summary information and the summary information obtained.

Assuming the same, it is possible to prove that the file must be sent by Bob , and that the midway is not tampered with, no matter what.

This process is generally referred to as a verification check.

The so-called digital signature, is the original file "fingerprint" of the private key encryption. Such You can guarantee that the characteristics of the file (digest value) must be encrypted by the private key. At the same time, because the length of the message digest is generally not long (MD5 is the decimal bit.) SHA1 is mostly in the first place), and it does not bring much overhead.

like a symmetric key algorithm. In most of the development languages. A digital signature based on an asymmetric algorithm. Digital Encryption algorithm. Have also been carried out in a certain package. For example, the following links are more specific description of how to achieve digital signature based on JCE , encryption, verification, etc.:http://blog.csdn.net/centralperk/article/details/8538697

Copyright notice: This article Bo Master original article. Blog, not reproduced without consent.

Digital signature and digital certificate Technology Brief (two)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.