??????????????????????
????1.?????????????????????
????????/???????
???????????
???????????
????????????????
????2.?????????Э??
????telnet??FTP??POP3?????????????http??sendmail??NFS????????????Ldap??NIS??rsh????????????
????3.NIST???????????:????????????о??
????1?? ???????
?????????????
?????????2???????????????
??????????????
????????????3????????
????4.?????????STRIDE
????Spoofing????e????Tampering????????Repudiation?????????Information Disclosure?????й?????
????Denial of Service???????????Elevation of Privilege??????????
????5.????????
?????????????????????????????????????????????????????·?????????
????6.???????
????· ???
????· ???????
????· ?????????
????· ?????????
????· ???????????
????· ?????????
????· ??????????
????· ??????????
????· ?????????
????7.?????????
????· ??ó????????
????· ??С??????????????
????· ????????????
????· С???
????· ?????????
????· ????e????
????· ??????????????
????· ??STRIDE????????????
????· ?????????????????
????????????????????????????
????1.?????
????· ???e??????
????· ???
????· ???
????· ??????
????· ???
????????????Э?飺
????· ??????
????· ???????
????· ???????
????· ???Э??
????Linux????OpenSSL?? gpg(pgpЭ??????)
????2.????????
????1???????????????????????????
????DES??Data Encryption Standard??56bits    3DES??
????AES??Advanced (128?? 192?? 256bits)
????Blowfish??Twofish
????IDEA??RC6??CAST52?? ?????    1???????????????????????Ч???    2?????????????????С??飬??????м???3??????    1?????????    2????????    3??????????????????
????3.?????????
????1????????????????????
??????????????????????public key
?????????????棬?????????????secret key
????2??????ù?????????????????????????????????????
?????????
????3???????????????????y??????????????
????4????????????????????????????????????????????????
????5?????????????????С????
????6???????????????????Ч?????
????7??????
????RSA??????????????????DSA?????????????ELGamal
????8???????????/?????
????????????е??????????????????
????9?????????
??????????
??????????/??????P??S
???????????P?????????S
??????????
??????y?????????????????M
??????P(M)???????????
??????????
??????????S???????M=S(P(M))
????10????????????
??????????
????· ??????/??????P??S
????· ???????P?????????S
????· ??????S?????????M
????· ???????????S(M)
??????????
??????÷??????????????M=P(S(M))
????11?????????????????????????

????4.???????
????1??????????????С??????С??“???”
????· ??????????
????· ??????????
????· ??????????????????“??????????”??
????· ???????????????????????“????”??2?????????????????3?????????
????md5: 128bits??sha1: 160bits??sha224sha256??sha384??sha5124?????ù???
????md5sum | sha1sum [ --check ] file
????openssl??gpg
????rpm -V5??find ./ -type f -exec md5sum {} ;?????????????????????????仯???
????5.???????
????1???????????IKE??Internet Key Exchange ??
????????????
????DH (Deffie-Hellman)??2??DH    1??A: a??pЭ???????????????a????????p
????B: a??p    2??A:???????????:x (x<p )??????ó?a^x%p???????B
????B:???????????:y??????ó?a^y%p???????A    3??A:????ó???a^y%p??^x = a^xy%p??????????
????B:????ó???a x%p?? y = a^xy%p?? ????????
????6.CA?????
????1??PKI: Public Key Infrastructure
????????????CA??Certificate Authority??
????????????RA( registry Authority)
???????????б??CRL??Certificate   revoke  list??
???????????2??X.509???????????????????Э????
?????汾??????к????????????????Ч?????????????????幫???CRL??????????????????????
????3?????????
???????????????????
??????????
??????????4?????????????????
?????????????????
???????????????csr??
??????csr?????CA
??????CA?????????5????????????
??????????????????
????7.???Э??
????1??SSL: Secure Socket Layer
????TLS: Transport Layer Security        1995??SSL 2.0 Netscape        1996: SSL 3.0
????1999: TLS 1.0
????2006: TLS 1.1
????RFC??Request For Comments ??4346
????2008??TLS 1.2 ??????        2015: TLS 1.3
??????????????????????????????????2???????Э?飬????????κ???y??
??????????(Э????):?????????????????????????????PKI?????????????????????????????
??????Э?????????????????????????????????????????????????????????????MasterSecret???ɡ?
??????y??:???????????????????y?????????????????Э??????????а??????3??SSL/TLS protocol ?????????/????????Э????

????4??ssl/TLSЭ?????
????HandshakeЭ?飺????Э????????????????????????????????????????????????????????????
????ChangeCipherSpec Э?飺??????????????Э????????
????Alert Э?飺??????Э?????Щ???????????????fatal??warning????????fatal????????????ж?SSL???????warning????????SSL?????????????????????????
????Record Э?飺????????????Ρ???????????????????????????????
????HTTPS Э?飺??“HTTP Э??”??“SSL/TLS Э??”??????HTTP over SSL”??“HTTP over TLS”????httpЭ????????????м???????????????????????5??Э????????????????