III. Overview hashing algorithm and partial Detailed

2.2 Introduction hash algorithm

  • 2 VPN learning algorithm
      • 2.1 Introduction Encryption Algorithm
        • 2.1.1 symmetric encryption algorithm
          • 2.1.1.1 concept
          • 2.1.1.2 Legend
          • 2.1.1.3 DES Overview
        • 2.1.2 asymmetric encryption algorithm
          • 2.1.2.1 concept
          • 2.1.2.2 Legend
          • 2.1.2.3 RSA Overview
      • 2.2 Introduction hash algorithm
        • 2.2.1 Hash Algorithm (function)
          • 2.2.1.1 concept
          • 2.2.1.2 digital signature (see PKI)

2.2.1 Hash Algorithm (function)

concept

Without the key the hash function, the hash function is a variable-length input string (called a pre-mapping, Pre-image) converted into a fixed-length output string of a function (called a hash value).
Compression function may be called hash function, the hash function, the message digest, fingerprint, cryptographic checksum, message integrity check (DIC), operation of the authentication code (Message Authentication Code, MAC). Hash Message Authentication Code (HMAC)

usage:

Integrity check may be performed using a hash function to the data file. 
Digital signature (see PKI)

Common message digest algorithms:
MD5 algorithm
SHA algorithm
RIPEMD algorithm

MAC:

A message authentication code (Hash function keyed). Cryptography, communications entity an authentication mechanism used by both sides to ensure a tool for message data integrity.

Security depends on the Hash function, it is also known Hash function with a key. Is a message authentication code based on the key and a message digest] [hash value obtained, may be used to send the data source authentication and integrity check.

1. The sender MAC calculated by the MAC algorithm the value of the message, and the message to the addressee and with

2. The recipients use the same MAC algorithm calculated message received MAC value, and compare the two.

HMAC:

Hash-based message authentication code, using the hashing algorithm, and a message to a key input, as an output to generate a message digest.

A specific Construction for Calculating A  Message authentication code  (the MAC) Involving A  Cryptographic the hash function  in Combination with A Secret  Cryptographic Key . of As with the any the MAC, IT On May BE Used to Simultaneously Verify both The  Data Integrity  and The  Authenticity  of A  Message . Main in order to make people to each other's identity be verified correctness and validity of the message, and the message digest of the biggest difference is that there is a signature key! ]

method:

HMAC (K, m) = H ((K ⊕ opad) ∥ H ((K ⊕ ipad) ∥ m))

https://www.cnblogs.com/songhan/archive/2012/07/29/2613898.html have specific difference MAC and the HMAC.

HMAC is the need for a key. So, HMAC_SHA1 also need a key, MD5, SHA1 is not required.

2.2.2 digital signature (see PKI)

Collaborative Digital Signature conditions:

Hash function: the hash function is an important aid digital signature, the hash function can generate an application file, file digest having a fixed length, so that the digital signature can be quickly and efficiently a signature file of any length. Generally, any small change to the file, the file will change the hash value, whereby the secret hash function may be used to detect viruses and other damage of the document.
The signature of the attack: There are a variety of digital signature fraud exists, re-use is a typical deception, electronic checks, repeated use has terrible consequences, an effective way to prevent this deception is the signature contains the date and time mark. 

Digital signature schemes:

- Direct digital signature

- require arbitration of digital signature 
- using a single key technology of digital signatures arbitration
- the use of dual-key digital signature technology Arbitration

Guess you like

Origin www.cnblogs.com/gunxiaoshi/p/11735856.html