Encryption and decryption
1. symmetric encryption
2. asymmetric encryption
3. Individual Encryption
The encryption algorithms follow the following rules: kerckhoffs Principle
Symmetric encryption: the same key is used for encryption and decryption.
Commonly used 3DES, AES advanced encryption 128-bit, 192, and 256
Asymmetric encryption (public key encryption): encryption and decryption
It is mainly used for authentication.
Public Key secret algorithm: Paired appearance
RSA encryption can also be authenticated
DSA can only be encrypted
Private Key, hidden in the Public Key 512-bit, 4096-bit,-bit
The longer the password, the slower the speed.
The Public Key is mainly used for authentication.
Single-item encryption: Irreversible,
The input data of the avalanche effect is a little different, which is very different.
Is to calculate the feature value of a piece of data.
The output data is of the same length as the output data.
Commonly used MD5: Message, digest 128-bit
Sha1: secure hash algorithm 160 bits
Main objective: to crack in Explosion-Proof Environment
PKI: CA digital certificate issued
Use OpenSSL to issue a certificate:
Follow these steps:
1. CD/etc/pki/CA
2, (umask 66; OpenSSL genrsa 2048> private/cakey. PEM
3. OpenSSL req-New-X509-key private/cakey. pem-out cacert. pem-days 3650.
4. Vim/etc/pki/tls/OpenSSL. CNF
Client certificate:
1, yum install httpd
2, # cd SSL
3, [[email protected] SSL] # (umask 66; OpenSSL genrsa 2048> Web. Key)
4, SSL] # cd/etc/pki/CA
[[Email protected] CA] # mkdir certs CRL newcerts
[[Email protected] CA] # Touch index.txt serial
[[Email protected] CA] # ech0 01> serial
5, SSL] # OpenSSL req-New-key web. Key-out web. CSR
6, SSL] # OpenSSL ca-in Web. CSR-out web. CRT
7. Verify LL