加密 和解密技術

來源:互聯網
上載者:User

標籤:技術   加密   密碼   認證   

加密 和解密

1,對稱式加密
2,非對稱式加密
3,單項加密

密碼編譯演算法都遵循:kerckhoffs principle

    對稱式加密:加密解密使用同一個密鑰
    常用的有 3des ,AES 進階加密 128 位,192,和256

     
非對稱式加密(公開金鑰加密):可以加密和解密 
             主要是用來認證的
             公開金鑰機密演算法:成對出現
             rsa  加密 還可以認證
              dsa  只能加密
              
           私密金鑰 ,隱藏在公開金鑰  512位,1024,2048,4096位
           密碼越長 速度越慢
              公開金鑰 主要是用來認證的

單項加密: 是無法復原的,
   雪崩效應   輸入的資料有一點不同,就有很大不同
   就是計算一段資料的特徵值
   輸出定長  輸入的資料 和的出來的是一樣長度 
    常用 MD5:Message,Digest 128位  
         sha1 : 安全的hash 演算法 160位
  
   主要目的 :防爆裡破解

 

      pki :CA 數位憑證頒發
      
          使用openssl頒發認證:
以下步驟
    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
     
    
  用戶端獲的認證:

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, 驗證 ll
 


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.