The digital certificate and its principle of the development of magic push Mpush:ios

Source: Internet
Author: User
Tags asymmetric encryption


IOS developers often have to deal with various digital certificates, public keys, and keys. I believe that developers often in the process of development will often be these certificates Ah, keys, public key, and so the effort is haggard. Today, on this issue with you two words about IOS digital certificate issues.

What is a digital certificate?

Digital Certificates is the digital form of authentication in the Internet, which is very similar to the intelligence of a passport or driver's license. A digital certificate is a credential. Provides identification and additional support information for an entity. Digital certificatesare issued by the authority of the Authority (CA). Therefore, the Authority is responsible for guaranteeing the validity of the certificate information. and digital certificates are usually valid only for a specific period of time.

A digital certificate contains the public key of the entity identified in the certificate (that is, your public key is in your certificate), because the certificate matches the public key to a specific individual, and the authenticity of the certificate is guaranteed by the issuing authority (that is, you can convince people that your certificate is true), A digital certificate provides a solution for how to find the user's public key and to know if it is valid.

Basic encryption principle of digital certificate

Digital certificate is a kind of authentication file which uses the public key system to encrypt and decrypt a bunch of matching keys. Each user sets a specific private key that belongs only to himself, decrypts and signs it, and sets a public key (public key) to be shared with a group of users for encryption and signature verification.

In layman's terms, in IOS Development, every user needs a pair of public and private keys, private keys for themselves, and public keys for others to use. Such When a user sends a file, it is signed with the private key, and the user who holds the public key can ensure that the information or file is sent by the public key user. This process is a digital signature.

When the user receives the file, the other person uses the public key encryption, the user can decrypt with the private key, which ensures that the information and files can only be received by the user holding the private key. The disclosure of information and documents can be avoided.

About the interpretation of public and private keys

The public and private keys are an asymmetric encryption method that corresponds to symmetric encryption-such as the user name and password that we all commonly use to log in. The public and private keys are encrypted in order to achieve secure transmission of data. The information that is applicable to sending imagining to the receiver needs to be encrypted and not visible during data transfer. Data encrypted with public and private keys is transmitted in order to guarantee the accuracy of the sender, and others cannot send information as a sender. To achieve this, both the sender and the receiver must have both a public and private key.

In general, public keys are for public users, can be downloaded, e-mail, etc. to the user, the public key is the role of encryption and authentication. The private key is given to itself and needs careful preservation. The private key is used to decrypt and seal, first of all the ownership of key, the private key can only be personal.

For example, you might understand better. for example, now I'm going to send you an encrypted message:

First, I have to have your public key, and you have to have my public key.

Second, I use your public key to encrypt this message, so that the message is not seen by others, and that the message is not modified during transmission. After you receive the message, you can decrypt it with your private key and you can see the content.

Finally, I use my private key to encrypt this message, send it to your hand, you can use my public key to decrypt. Because the private key is only in my hand, this ensures that the message was sent to me.

When a->b sends the data,A uses the b 's public key to encrypt it, so that only b can unlock it. Otherwise, the general public can unlock the encrypted message, that is, the confidentiality of the information. Verification aspect is the useof the mechanism of the seal,a transmission of information to everyone, will be the signature of their own private key, so that all the people who receive the message can use a 's public key for verification, you can confirm that the message is by a sent out.

The security of IOS lies in its rigorous and powerful authentication system and digital certificates, but this is confusing for developers. I hope you have read the above introduction, the digital certificate and certification can have a clearer person is. In particular, Apple often changes its digital certification terms. The developers should also pay more attention to this aspect of the relevant reports. Avoid a lot of effort during the development process.


The digital certificate and its principle of the development of magic push Mpush:ios

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.