ComputersProgramming

Ib tug hash muaj nuj nqi yog: dab tsi yog nws, vim li cas thiab ua li cas

Feem ntau, thaum daus torrents los yog cov ntaub ntawv ncaj qha rau lawv tus kheej nyob rau hauv qhov kev piav qhia muaj ib yam dab tsi zoo li «ad33e486d0578a892b8vbd8b19e28754» (piv txwv li, nyob rau hauv ex.ua), feem ntau nrog rau ib daim ntawv «md5». Qhov no hash code - cov tshwm sim uas outputs ib tug hash muaj nuj nqi tom qab ua cov khoom ntaub ntawv. Nyob rau hauv lus Askiv lub hash qhia tsis meej pem, tshuaj maj, maj, los yog ib lub tais ntawm tsuav nqaij thiab zaub. Decrypt lub hash yog heev yooj yim, peb yuav hais tias nws yog suab tsis yooj yim sua. Ces cov nqe lus nug tshwm sim: "Vim li cas peb yuav tsum tau tag nrho cov ntawm cov hash zog, yog tias lawv muab ib tug to taub tsis tau gibberish, uas kuj yuav tsis tau deciphered?". Qhov no yuav tsum tau tham nyob rau hauv no tsab xov xwm.

Yuav ua li cas yog ib tug hash muaj nuj nqi, thiab yuav ua li cas yog nws ua hauj lwm?

Qhov no muaj nuj nqi no yog tsim los hloov cov khoom ntaub ntawv arbitrarily loj npaum li cas raws li ib tug tshwm sim ntawm tsau ntev. Tus heev txheej txheem ntawm xws li ib tug transformation yog hu ua hashing, thiab cov - ib tug hash los yog hash code. Tej zaum txawm siv lo lus "mus dov ntiv tes" los yog "lus zom mov", tab sis nyob rau hauv xyaum lawv yog npaum li cas rarer. Muaj ntau ntau txawv algorithms ntawm yuav ua li cas los hloov tej dataset nyob rau hauv ib tug tej yam ib theem zuj zus ntawm cov cim ntawm tej yam ntev. Cov feem ntau lug siv algorithm hu ua md5, uas yog tsim raws li thaum ntxov raws li xyoo 1991 los lawm. Txawm tias muaj tseeb hais tias rau hnub tim, md5 yog ib tug me ntsis outdated thiab siv yog tsis pom zoo, nws yog tseem tseem yog nyob ib ncig ntawm, thiab feem ntau es tsis txhob "hash code" rau ntawm qhov chaw sau ib tsab ntawv md5, thiab qhia lub code nws tus kheej.

Vim li cas peb yuav tsum tau ib tug hash muaj nuj nqi?

Paub cov kev tshwm sim, nws yog suab tsis yooj yim sua los mus txiav txim cov ntaub ntawv, tiam sis tib khoom cov ntaub ntawv muab tus raug tib yam. Yog li ntawd, lub hash muaj nuj nqi (tseem hu ua ib tug convolution muaj nuj nqi) yog feem ntau siv rau cia rhiab heev ntaub ntawv xws li koj lo lus zais, username, ID tooj thiab lwm yam ntaub ntawv tus kheej. Es tsis txhob muab piv rau cov ntaub ntawv nkag mus hauv los ntawm tus neeg siv, nrog rau cov neeg muab cia rau hauv lub database, muaj yog ib tug sib piv ntawm cov hashes. Qhov no kom hais tias nyob rau hauv cov ntaub ntawv ntawm cov lo to ntawm cov ntaub ntawv, tsis muaj ib tug yuav coj kom zoo dua ntawm ib qho tseem ceeb cov ntaub ntawv rau lawv tus kheej lub hom phiaj. By muab piv rau cov hash code no kuj yooj yim rau mus saib lub correctness ntawm daus cov ntaub ntawv los ntawm lub Internet, tshwj xeeb tshaj yog yog hais kev sib txuas lus cuam tshuam tshwm sim thaum lub sij hawm download.

Hash: li cas lawv yog t

Nyob ntawm seb koj lo lus uas peb hash muaj nuj nqi yuav ua tau ib ntawm peb hom:

1. Cov kev ua mus xyuas lub sam xeeb ntawm cov ntaub ntawv

Thaum ib tug cov ntaub ntawv kis tau tus mob network, muaj yog muab xam rau ntawm lub hash pob ntawv, thiab qhov no tshwm sim kuj kis ua ke nrog cov ntaub ntawv. Thaum tau txais dua xoo hash code thiab piv nrog rau cov nqi uas tau los ntawm lub network. Yog hais tias cov kev cai tsis phim, nws qhia tias ib qho yuam kev, thiab lub puas pob yuav tau kis dua. Nyob rau hauv xws li ib tug xam muaj nuj nqi ceev ceev tab sis ib tug me me muaj pes tsawg tus ntawm hash qhov tseem ceeb thiab cov neeg pluag stability. Ib qho piv txwv ntawm no hom: CRC32, uas muaj tsuas 232 differing qhov tseem ceeb.

2. Cov cryptographic muaj nuj nqi

Qhov no hom yog siv los tiv thaiv tiv thaiv tsis tau tso cai nkag tau (ND). Lawv cia koj mus xyuas saib seb puas muaj yog cov ntaub ntawv kev noj nyiaj txiag raws li ib tug tshwm sim ntawm lub LP thaum lub sij hawm hloov mus rau lwm cov ntaub ntawv tshaj lub network. Yeej muaj tseeb hash yog laj mej pej xeem muaj, nyob rau hauv cov ntaub ntawv no, raws li cov tau txais cov ntaub ntawv hash yuav xoo siv ib tug plurality ntawm txawv cov kev pab cuam. Tej nta lub neej ntev thiab ruaj khov lag luam, thiab cov kev tshawb fawb rau collisions (tau ntais ntawv tau los ntawm ntau qhov chaw cov ntaub ntawv) yog heev tham. Tej zog yog siv rau cia nyob rau hauv lub password database (SH1, SH2, MD5) thiab lwm yam tseem ceeb cov lus qhia.

3. Cov kev ua no yog tsim los ua ib tug npaum qauv ntaub ntawv no

Nws lub hom phiaj yog es compact thiab orderly lub koom haum ntawm cov ntaub ntawv nyob rau hauv ib tug tshwj xeeb cov qauv, uas yog hu ua tus hash rooj. Cov lus no tso cai rau koj mus ntxiv lus qhia tshiab, rho tawm ntaub ntawv, thiab nrhiav cov yuav tsum tau cov ntaub ntawv ntawm heev speeds.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 hmn.delachieve.com. Theme powered by WordPress.