General security

General reality, that is the simplest secret codes.

1. For tourists

So the system can also use this simple mechanism, the client and server are set to a sign, as long as the right on. That it is the qualifier.

Of course signal must be updated on the server and the client. Signal is generated generally take some time, it is generally signal ok, it produces a value, such as a session and the like. Directly to the next session. It is equivalent to the signal right. Posted a sign.

2, for registrants

This does not need to say, the above signal is a group of people, but to verify that the individual who must be the only signal that we username and password.

Verify generally take some time, it is generally verify ok, it produces a value, such as a session and the like. Directly to the next session. It is equivalent to the verification. Posted a sign.

The so-called symmetric encryption, there is a problem is that it is possible to transfer signal will not eavesdropping. That is, the key will be stolen.

So there are non duet encryption.

 

Both parties now have 2 key. It publishes the public key, so people can send a message to yourself. Save yourself the private key, so you do not need private transport to ensure safety.

1, B generates a pair of keys (public and private) public key and disclosed to the other party.
2, to obtain the public key of the party using the secret information is encrypted and then transmitted to the party.
3, then the other party stored in the own private key (private key) to decrypt the encrypted information. B can only be decrypted by the information corresponding to the public key encrypted with its private key (private key).
During transmission, even if an attacker intercepts encrypted transmission, and got B's public key, you can not crack the cipher text, because only B's private key can decrypt the ciphertext.
Similarly, if B To reply to encrypted information to A, then A need to publish the public key of A to B for encryption, armor armor saved his own private key for decryption.

Guess you like

Origin www.cnblogs.com/lsfv/p/12424906.html