User authentication and encryption for basics of Linux

Source: Internet
Author: User

1: Password file/etc/shadow

Cat/etc/shadow Red Line part for encrypted password

650) this.width=650; "style=" Float:none; "title=" shadow. JPG "alt=" wkiol1brr-zdb0vcaah05ij-4p0973.jpg "src=" http://s2.51cto.com/wyfs02/M01/7D/9C/ Wkiol1brr-zdb0vcaah05ij-4p0973.jpg "/>


2: Encryption method

Symmetric encryption: Encryption and decryption using the same key;

Asymmetric encryption: Encryption and decryption using a pair of keys; public key-public; private key-secrecy;

CA: Digital Certification Authority

PKI: Public Key Infrastructure

One-way encryption: Extracts the fingerprint of the data, the unique signature. 1: Fixed length output, 2: irreversible; 3: avalanche effect-any minor change will result in a completely different result of the entire encryption

Cryptographic algorithms and cipher bits used in Linux passwords:
$1:MD5, (22-bit)
$2:blowfish, encryption methods that are used only in a subset of the Linux branches
$5:SHA-256 (43-bit)
$6:SHA-512 (86-bit)

Digital signature: The signature is obtained by using the private key to extract the characteristic code of the data.
3:linux Password Verification Process

The user enters the account number and the password, the Linux takes the account which you enter to obtain the salt (in order to solve the same password to generate the different password encryption result, mixes the salt to differentiate), then uses the salt+ you entered the password to carry on the cryptographic algorithm operation, obtains the result and the system is consistent, if consistent, The validation passes.

For example, if two users are craft and User1, I set the same password, but the salt in the system is not the same (the 8-bit character labeled 2 is salt), and the result of password encryption, such as the part labeled 3, is completely different.

650) this.width=650; "style=" Float:none; "title=" Jiami. JPG "alt=" wkiol1brr-3dq1ajaaetzhj5_qe255.jpg "src=" http://s1.51cto.com/wyfs02/M02/7D/9C/wKioL1brr-3DQ1AJAAEtZhj5 _qe255.jpg "/>

User name: $ encryption algorithm: $salt: $ (salt+ real password) results obtained after encryption

Craft: $6$8o7iohby$km 7dfd2.sotnfizbmv3./tjfrcj2cmmluxbnx8qq7 bvgwjqf0q6dpi37z82vms3dbg06t3zr13rm1rrsuimv7

This article is from the "Reminder Flower Rain" blog, please make sure to keep this source http://chenwen.blog.51cto.com/771416/1752599

User authentication and encryption for basics of Linux

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.