Advanced Encryption Standard (AES) yog symmetric encryption algorithm. AES yog tus qauv kev lag luam tam sim no raws li nws tso cai 128 ntsis, 192 ntsis thiab 256 khoom encryption. Symmetric encryption yog nrawm npaum li piv rau asymmetric encryption thiab siv hauv cov tshuab xws li database system. Hauv qab no yog cov cuab yeej online los ua AES encryption thiab decryption ntawm cov ntawv nyeem lossis lo lus zais.
Cov cuab yeej muab ntau hom encryption thiab decryption xws li ECB, CBC, CTR, CFB thiab GCM hom. GCM suav hais tias muaj kev nyab xeeb dua li CBC hom thiab tau txais kev pom zoo rau nws qhov kev ua tau zoo.
Yog xav paub ntxiv txog AES encryption, mus saib Qhov kev piav qhia ntawm AES Encryption. Hauv qab no yog daim ntawv los coj cov kev nkag mus rau encryption thiab decryption.
Txhua tus nqi tseem ceeb zais cia uas koj nkag mus, lossis peb tsim tsis tau khaws cia rau ntawm lub xaib no, cov cuab yeej no tau muab los ntawm HTTPS URL kom ntseeg tau tias txhua tus yuam sij zais tsis tuaj yeem raug nyiag.
Ntsiab nta
- Symmetrical Key Algorithm: Tib tus yuam sij yog siv rau ob qho tib si encryption thiab decryption.
- Thaiv Cipher: AES ua haujlwm ntawm qhov loj me ntawm cov ntaub ntawv. Tus qauv thaiv loj yog 128 ntsis.
- Ntsiab Length: AES txhawb qhov ntev ntawm 128, 192, thiab 256 ntsis. Qhov ntev ntawm tus yuam sij, lub zog encryption.
- Kev ruaj ntseg: AES suav hais tias muaj kev nyab xeeb heev thiab tau siv dav hauv ntau yam kev ruaj ntseg thiab kev siv.
AES Encryption Terms & Terminologies
Rau encryption, koj tuaj yeem nkag mus rau cov ntawv nyeem yooj yooj yim lossis lo lus zais uas koj xav encrypt. Tam sim no xaiv qhov thaiv cipher hom ntawm encryption.
Txawv Txhawb Hom Hom AES Encryption
AES muaj ntau hom kev encryption xws li ECB, CBC, CTR, OFB, CFB thiab GCM hom.
-
ECB (Electronic Code Book) yog qhov yooj yim tshaj plaws encryption hom thiab tsis tas yuav IV rau encryption. Cov ntawv sau yooj yooj yim yuav muab faib ua cov blocks thiab txhua qhov thaiv yuav raug encrypted nrog tus yuam sij muab thiab vim li no cov ntawv nyeem zoo tib yam yog encrypted rau hauv cov ntawv cipher zoo tib yam.
-
CBC (Cipher Block Chaining) hom yog qhov kev pom zoo, thiab nws yog ib daim ntawv siab heev ntawm kev thaiv cipher encryption. Nws xav kom IV ua kom txhua cov lus tshwj xeeb lub ntsiab lus zoo tib yam cov ntawv nyeem yooj yooj yim yog encrypted rau hauv cov ntawv cipher sib txawv. Li no, nws muab kev encryption muaj zog dua piv rau ECB hom, tab sis nws qeeb me ntsis piv rau ECB hom. Yog tias tsis muaj IV nkag mus, lub neej ntawd yuav raug siv rau ntawm no rau CBC hom thiab qhov ntawd ua rau lub zero-based byte[16].
-
CTR (Counter) CTR hom (CM) tseem hu ua integer counter mode (ICM) thiab segmented integer counter (SIC) hom. Counter-mode hloov lub block cipher rau hauv cov kwj cipher. CTR hom muaj cov yam ntxwv zoo sib xws rau OFB, tab sis kuj tso cai rau cov cuab yeej nkag mus thaum lub sijhawm decryption. CTR hom yog zoo haum rau kev khiav hauj lwm ntawm lub tshuab multiprocessor, qhov twg blocks yuav encrypted nyob rau hauv parallel.
-
GCM (Galois / Counter Hom) yog symmetric-key block cipher hom kev ua haujlwm uas siv universal hashing los muab cov ntawv pov thawj encryption. GCM raug suav hais tias muaj kev nyab xeeb dua li CBC hom vim tias nws muaj kev kuaj xyuas qhov tseeb thiab kev ncaj ncees thiab tau siv dav rau nws qhov kev ua tau zoo.
Padding
Rau AES hom CBC thiab ECB, cov padding tuaj yeem yog PKCS5PADDING thiab NoPadding. Nrog PKCS5Padding, 16-byte txoj hlua yuav tsim 32-byte tso zis (qhov ntau ntxiv ntawm 16).
AES GCM PKCS5Padding yog lub ntsiab lus rau NoPadding vim GCM yog hom streaming uas tsis tas yuav tsum tau padding. Lub ciphertext hauv GCM tsuas yog ntev npaum li cov ntawv dawb xwb. Li no, nopadding yog los ntawm lub neej ntawd xaiv.
AES Key Size
AES algorithm muaj 128-ntsis thaiv qhov loj, tsis hais seb koj qhov tseem ceeb ntev yog 256, 192 lossis 128 ntsis. Thaum lub symmetric cipher hom xav tau IV, qhov ntev ntawm IV yuav tsum sib npaug rau qhov loj ntawm lub cipher. Li no, koj yuav tsum ib txwm siv IV ntawm 128 khoom (16 bytes) nrog AES.
AES Secret Key
AES muab 128 khoom, 192 khoom thiab 256 khoom ntawm qhov tseem ceeb zais cia rau kev nkag. Yog tias koj xaiv 128 me ntsis rau kev encryption, ces tus yuam sij zais cia yuav tsum yog 16 me ntsis ntev thiab 24 thiab 32 khoom rau 192 thiab 256 khoom ntawm qhov tseem ceeb raws li. Piv txwv li, yog tias tus yuam sij loj yog 128, ces tus yuam sij zais cia yuav tsum yog 16 cim piv txwv li, 16 * 8 = 128 khoom