What [ipsec] [crypto] a little different digital certificates in the end is

Foreword

Preface was written after the full complement back. Intention is to totally abstract to express abstract logical sense certificates out, because you can find most of

Data are mired in technical details and specifications in the industry. Only its type is not its reasoning, nothing beats understand the inherent reasonableness of a more fun of the thing.

So I could not help but express desire of trying to write them.

Reluctantly changed version of a few, always write confusion. So, every person can read, and I thank you for your support, if there is another in-depth discussion

Wishes, please contact me.

Unfortunately understand ninety percent, expressed only remaining five percent. Forgive my poor expression.

[Fangba into chaos] author: class_tong   DATE: 20,190,914

 

〇 Introduction

What digital certificate is? The starting point of this paper is from my point of view to answer this question. At the same time we introduce ike and tls as a tool to understand the concept of reality, together with opportunistic introduced in the text.

To deepen understanding, but also to return to practice.

This sentence follows is my answer:

Certificate is a digital signature piece of information by the authorities, this information is a public expression of relationship between a name and the name of the property comes with. The name belongs to a valid name system.

A change of expression, the above statements similarly:

Certificate is a piece of information: authorities say A, I guarantee that the public key P N is the name of.

 

Then the following paragraph is wiki answer :

In cryptography, a public key certificate, also known as a digital certificate or identity certificate, 
is an electronic document used to prove the ownership of a public key[1]. The certificate includes information about the key,
information about the identity of its owner (called the subject), and the digital signature of an entity
that has verified the certificate's contents (called the issuer).

 

I think, though I expressed the soil, but it is correct. In other words, more than three answers, expressed the same definition of a digital certificate.

Next, we work together to understand.

 

Tell a story

Clear this thing, we need to introduce several premises. They are few concepts as follows:

1. The authority, 2, message authentication codes, digital signatures 3., 4. public, 5. name, 6. name system, 7. Certificate

I also assume that you are reading to here, it is to understand what is a public / private key. Because this article focuses only within the context of the relevant certification system of discussion, so 3. public will no explanation.

And: Why can decrypt the private key public key encryption to provide confidentiality? Private key encryption public key to decrypt Why can provide uniqueness? Do not explain. (So ​​please accept the premise that they are as natural to continue reading down.)

 

Describe a scene:

From Azeroth small a, b and small stars from the land of Wing Shuo, friends since childhood. One day they both imprisonment and a jailbreak story took place. . .

The prison has 500 inmates, held in 500 separate cells, unable to see each other, the only way to communicate is to write a note. Then passed through an insecure system transfer note to anyone.

If you want to join a person in the entire communication system. First, it must have a name: a number, a number, or a custom word.

We call it the name of unity.

For example, a small a. After only have one name to the other person and after communication, to get their response. Otherwise, the person will not know

Who should respond to the note. Similarly, small and want to take the initiative to contact a person, if you do not know the name of a small, there is no way to tell strip delivery system

The note will be passed to anyone.

This is the meaning of the name.

The story is that, prior to go to jail together, and a small small b is a good friend (Crazy?). They are fully trust each other. Then,

Small b wrote a note, "We have nine at night to escape." Sent to a small (small know a little b may send you messages, and have been waiting for news of a small b).

Small b To prove that his hair is really news, and the last piece of paper covered in a seal (We know that security is the way to seal,

Find another reliable seal imprint pattern comparison performed), and seal the lid in the top of the content (build strong correlation, this can be understood as the corresponding

We hash function function). In order to prove the message is really a small from the small b, instead of the system of law enforcement fishing prison, he found the old z, z to the old with a small b stamp imprint of the former.

 

Well, we sort out what, now this side there are three people a, b, z, a piece of paper that came with the seal, a stamp mark.

Then, a little before choosing whether to escape, must answer the following questions:

1, note content (including the seal) is not tampered with in transit.  

2, with the old paper seal z to seal agreement.

3, this consistent pattern stamp, really belongs to the small b.

4, the old mark provided z is really credible.

Z old assumptions proved to be credible, it will b trust will transfer to a small a small, that is because: z b trust, and a trust z,

Therefore, a trust will be able to provide real message z, which is 3 can be established. Well, here it implies a new problem:

5, how to prove z old when he got the b mark, is really a part of the.

 

1 problem solving method is used in message authentication or digital signature, which is the front Goof hash function.

2 to solve the problem, the method used is a digital signature, which is the private key encryption, public key to decrypt. But the public has to get involved to the digital certificate.

3,4 resolve the problem, the method used is a digital certificate. We can structure a digital certificate for dismantling, respectively, so that problem solving 3,4

[Fangba into chaos] author:  class_tong   DATE: 20,190,914 

Question 5, represents the process of issuing digital certificates.

To further illustrate the problem, we now change the layout of the scene. Question 4 convention is established, the old z has the absolute authority of the entire prison, everyone

All trust him, his hand stamp mark on everyone. He personally completed a certificate issued by the process (that is witnessed every individual to do imprint stamped his mark on this)

Well, we now introduce a new concept, the certificate.

And, in the new layout of the scene, z is the old authority.

 

And to ensure that each person behind the name corresponds to only a person's system, is the name of the system. Correspondence between the name and the people is many to one relationship, that a person can simultaneously

We have more than one name. And a correspondence relationship can not be modified.

 

Now, we are out of this case, in fact, more than one person can share a name, but that name more than one person can be understood as a single entity system,

So, in fact, it is a many-to-relations. In short name is the name of the system to solve the only problem, to prepare for later discussion.

 

at last. I used the dialect compiled a Goof success story raises seven concepts. I believe that know people are looking to understand, people do not understand the fear is even more do not understand. . .

 

Two no story

Combed once again, on top of the story concept, serious if.

Password works were divided into two blocks: encryption and authentication (are you sure?), We are here only to discuss authentication, encryption is not discussed.

In addition, the name and the name of the system by the above story, also said very clearly (unclear), and do not discuss it.

 

1 Certification

Authentication divided message authentication and source authentication two. We envision confused small a, after receiving the message, the most worried about is actually two things

(1) content of the message is not true. (2) source of the message is not true.

It should be noted that the foregoing is an important setting, a small small b expected news.

Therefore, the content of the message is not real mean, get a small content is not that small b want to pass.

Meanwhile, the news is not true source means, write a message to this person, it is not that a little heart could wish that (former jail knew that) small b.

 

1.1 Message Authentication

As already mentioned, do message authentication, we use HASH. Accurate to say that a hash function. By a hash function and a secret key of the message body, thereby

Generate a message authentication code. HASH_func (+ keys message body), is a symmetric secret key encryption keys, and only a period of a and b is known string (amount, keys ... heaven

But here is a little introduction, will be removed in the next section, the top story is still able to speak of the past. )

The party that receives the message, you can recalculate the hash, so as to prove that the message content is not tampered with.

 

1.2 origin authentication

Origin authentication is complicated.

Simply put, it is to be authenticated party uses a private key encryption piece of content. The ciphertext is sent to the other party. The other with a public key to unlock and found that the resulting plaintext content and consistency.

It proved that the party sending the message really is to have the public key corresponding to the secret key people. This thing is called a digital signature. In general, digital signature, the private key encryption

Is the hash value of the plaintext. Then after contacting the plaintext. Public key to decrypt the content and then hash comparison.

At this time, we were surprised to find that the digital signature work while completing the message authentication code, which is to do a message authentication also made origin authentication. And, also remove the upper sections in the secret key.

 

But, in fact, here barely describes the source authentication. But not completely. Because we set the source authentication means: the person who sent the message is a small a small b had in mind.

Up to now, we have to solve several problems: 1 message is authentic. 2, the public key of the sender and the small hands of a strong correlation has been established (believed this public key belongs to a small man had in mind, but also be able to

I believe the message sender is a small man had in mind)

Next you need to be further addressed, is this: how to prove that the public key belongs to a small man had in mind

This step is done by the digital certificate.

 [Fangba into chaos] author:  class_tong   DATE: 20,190,914

2 digital certificate

2.1 Role

We now know that the role of the digital certificate is proof: a public key belongs to that person in your heart.

The man must have a code, which is the previously mentioned names. The name is the name exists in the system. Name system to ensure the validity of the name only and will not be reassigned.

Then, after the introduction of the name of the system, the role of digital certificates becomes: public key belongs to the name. (Of course, you think about that person's name)

And another thing needs to be emphasized is that all reasoning before we introduced just in name. There is not a concept name. In other words, we just proved this front

One thing: a small receive a message. This message has a public key belonging to the corresponding private key p. In other words, only the establishment of a relationship between the message and the public key.

 

We mentioned the role of the certificate, which is precisely what exists in the form of a certificate. Each certificate is a public key, and such a correspondence relationship: a public key corresponding name.

So, based on 1) the inference, we are now able to get a new corollary: the message belongs to the public key corresponding name. That is the message and the name of the establishment of a direct relationship.

That is, the message of the people, is the person's name represents.

 

2.2 additional logic

It still did not achieve their goals. Because also need to determine the name of a small mind thought, reasoning out with us on a summary name are the same.

This, we do not discuss. Small introduces a method to complete any of this matter, thereby completing a closed-loop logic. For example, look at the open certificate. ignore him.

However, we assume that this news is after in line with expectations, a small open certificate read, read, really small b. And he also thought the small b.

Ok. to here. We finally finished this message origin authentication.

 

This is the meaning of the whole process, digital certificates exist.

 

3 Certificate

Above, we presuppose a premise. This certificate is the owner of a small a small b natural.

In fact, in communications, this is not possible. There must be a way to get this certificate. And fully detailed safety and reliability of this certificate.

This is the authority (that is, the old z) do.

Old z, this certificate pre-made digital signature. Thus ensuring the credibility of the certificates. So if you believe the old z, z can be detailed old signature

All certificates.

As noted above, z is the old authority, as the process is called a certificate.

 

4 Other

In addition to borrow the name to build external logic complete trust chain. You can also use an alias.

In fact x.509 certificates format, referred Subject names, aliases referred subject alternative name

 

For example, when configuring strongswan, establish a link between the user's brain with the software, use the subject.

In strongswan profile, I want to link to display the name of the other's ID = [x509] in the subject string

In another example, in https, the browser and the user's brain to establish direct links is to use suject alternative name

That is the domain name, such as www.baidu.com. In the certificate baidu, several domain name is SAN.

If you do not domain names, IP addresses but through direct access. The browser will alarm, say security access.

Although the pair are together, however, it is the lack of a chain of logic from the user's brain to the name, which is the role of the certificate

Not reached.

 

I wrote too much, had split into two hair:

Next, highlight some of ipsec and in the end tls authentication mechanisms: https: //www.cnblogs.com/hugetong/

 

Guess you like

Origin www.cnblogs.com/hugetong/p/11488342.html