encryption
When data is encrypted, the plain-text message will appear to be completely random binary data after being encoded, so that it is difficult to convert it into the original message without secret. This article uses the following definition:
Message: Refers to any data block. The message can be an ASCII text, a database file or any data you want securely or transmitted. Plain Text: Refers to the data that is not encrypted. Cipher Text: Refers to the data encrypted.
Once the message is encrypted, it can be stored on a non-secure medium or remains secure by non-secure network transmissions. After that, the message can decrypt to the original format. Figure 2 illustrates this process:
Figure 2. Encryption, decryption message
When encrypted the message, use Encryption Key. This is the same as a key to lock a lock. When decrypted this message, you must use the corresponding decryption key. It is important to access the strict restrictions on decryption dense because anyone gets it can solve all messages with the corresponding encrypted secret encryption.
May be a bit incredible, but data encryption / decryption is as simple as it is. The truly difficult point is that safe preservation of secrets and security will be transferred to other people. This part has exceeded the scope of this article, I suggest that readers go to read articles "Exchanging Cryptographic Keys", in the Win32 Cryptography API document (MSDN Library, Platform, SDK, DDK documents).
There are two main encryption algorithms: Symmetric Algorithms and public-key algorithms [also called asymmetric algorithms]. The system that uses a symmetric algorithm is sometimes classified into conventional.
algorithm
Symmetric algorithm is the most common encryption algorithm type. They are called "symmetry" because encryption and decryption using the same secret. Unlike the secrets of using the publication algorithm, symmetrical dense is often changed. For this reason, they are attributed to sessions. The symmetric algorithm is very fast compared to the publication algorithm, so it is best suited to encrypt a lot of data. Some of the most common symmetrical encryption algorithms are RC2, RC4, and Data Encryption Standard, DES. (Translation: Single Weighing DES is not adapted to the current encryption environment because the dense length is not available. You can use triple des, or AES)
The public (asymmetric) algorithm uses a pair of different secrets: a public and a private. Privately saved by the owner of the secret, and the public can distribute it to all those required by the public. If you encrypt a message with a secret, you must decrypt this message with another secret. The publication algorithm is very slow, and the algorithm is more than thousands of times. Therefore, they are generally only used to encrypt the session. They are also used to digital signatures, and the next part will discuss this content. One of the most common public 鈅鈅 鈅算 algorithms is RSA Public-Key Cipher.
File signature
Digital Signatures is used to distribute a message in a clear form, and you want to let the recipient can verify that this message has not been tampered with since he left your hands. The message signature does not change the message, which only generates a digital signature that can be attached on the message or separately.
Digital signatures are generated using a public algorithm. Use private 鈅 to generate, and use the corresponding public 鈅 to verify. Figure 3 illustrates this process: Figure 3 Verify signature