Cryptography Beginner Tutorial (ii) Public key cryptography RSA with one-way hash function and message authentication code

Source: Internet
Author: User

Finding discrete logarithms is very difficult

RSA is the first letter of the surname of Ron Rivest/adi Shamir/leonard Adleman.

RSA can be used for public key cryptography and digital signatures.

RSA encryption: Ciphertext = plaintext EMODN (e and N are public keys)

RSA decryption: plaintext = ciphertext DMODN (d and n are private keys)

The decryption of RSA:

Brute force: The difficulty of brute force will increase with the length of D, and when D is long enough, it is impossible to find d by brute force in real time.

Hybrid cryptography: Increase speed with a symmetric password, protect session keys with a public key password

The composition mechanism of the hybrid cipher system:

Encrypt messages with symmetric passwords

Generating the session key used in symmetric cipher encryption through pseudo-random number generators

To encrypt a session key with a public key password

Keys used to encrypt public key passwords from outside the hybrid cryptography system

One-way hash function-fingerprint

The one-way hash function is to guarantee the integrity of the message, also known as consistency.

collisions : Two different messages that produce the same hash value are called collisions.

Collision Resistance: It is difficult to find the nature of the collision is called anti-collision.

Weak collision Resistance : It is very difficult to find another message that has the same hash value as the message.

Strong collision Resistance : It is very difficult to find two different messages with the same hash value.

unidirectional : The nature of the message cannot be reversed by a hash value.

A one-way hash function, also known as a message digest function, is a digest function.

The hash value of the one-way hash function output is also known as Message Digest (MSG Digest) or fingerprint (fingerprint)

MD4 can produce a hash value of 128 bits,

The MD5 can produce a hash value of 128 bits. Strong impact resistance has been compromised, so it's not safe.

The hash value of the sha-1:160 bit, with a message limit of 264 bits, is not a problem in practice. Strong impact resistance was breached in 2005.

SHA-2 generation-sha-256:256 bits, the message limit is 264 bits, has not been breached.

SHA-2 generation-sha-384:384 bits, the message limit is 2128 bits, has not been breached.

SHA-2 generation-sha-512:512 bits, the message limit is 2128 bits, has not been breached.

Attack on one-way hash function
Brute force : attempts to crack the "weak anti-collision" attack of a one-way hash function.

Birthday Attack : This is a "strong anti-collision" attack that attempts to crack a one-way hash function.

A one-way hash function can identify "tamper", but cannot discern "camouflage".

The technologies used for authentication include message verification codes and digital signatures.

Message authentication code (mac,message authentication code)

is a technology that confirms integrity and is certified.

The input of the message authentication code includes a message of any length and a key shared between the sender and the receiver, which can output fixed-length data.

Cryptography Beginner Tutorial (ii) Public key cryptography RSA with one-way hash function and message authentication code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.