Advanced Encryption Standard (AES) ndi symmetric encryption algorithm. AES ndiye mulingo wamakampani kuyambira pano popeza imalola kubisa kwa 128 bit, 192 bit ndi 256 bits. Symmetric encryption ndi yachangu poyerekeza ndi asymmetric encryption ndipo imagwiritsidwa ntchito m'makina monga database system. Chotsatira ndi chida chapaintaneti chothandizira kubisa kwa AES ndikumasulira mawu osavuta kapena mawu achinsinsi.
Chidachi chimapereka mitundu ingapo ya kubisa ndi kubisa monga ECB, CBC, CTR, CFB ndi GCM mode. GCM imaonedwa kuti ndi yotetezeka kwambiri kuposa mawonekedwe a CBC ndipo imavomerezedwa kwambiri ndi machitidwe ake.
Kuti mudziwe zambiri za AES encryption, pitani Kufotokozera uku pa AES Encryption. Pansipa pali mawonekedwe oti mutenge zolowera pakubisa ndi kubisa.
Mtengo uliwonse wachinsinsi womwe mumalowetsa, kapena timapanga sunasungidwe patsamba lino, chidachi chimaperekedwa kudzera pa URL ya HTTPS kuwonetsetsa kuti makiyi achinsinsi sangabedwe.
Zofunika Kwambiri
- Symmetric Key Algorithm: Kiyi yomweyi imagwiritsidwa ntchito pobisa komanso kubisa.
- Block Cipher: AES imagwira ntchito pazida zokhazikika zama data. Kukula kwa block block ndi 128 bits.
- Utali Wautali: AES imathandizira kutalika kwa 128, 192, ndi 256 bits. Kutalikira kwa kiyi, ndikolimba kubisa.
- Chitetezo: AES imadziwika kuti ndi yotetezeka kwambiri ndipo imagwiritsidwa ntchito kwambiri pama protocol ndi ntchito zosiyanasiyana.
AES Encryption Terms & Terminology
Pakubisa, mutha kuyika mawu osamveka bwino kapena mawu achinsinsi omwe mukufuna kubisa. Tsopano sankhani block cipher mode of encryption.
Mitundu Yosiyanasiyana Yothandizira ya AES Encryption
AES imapereka mitundu ingapo yakubisa monga ECB, CBC, CTR, OFB, CFB ndi GCM mode.
-
ECB(Electronic Code Book) ndiye njira yosavuta yobisira ndipo sifunika IV kuti ibisike. Zolemba zomveka bwino zidzagawidwa mu midadada ndipo chipika chilichonse chidzasungidwa ndi kiyi yoperekedwa ndipo chifukwa chake midadada yofananira imasungidwa mu midadada yofanana ya cipher.
-
Njira ya CBC(Cipher Block Chaining) ndiyomwe ikulimbikitsidwa, ndipo ndi mtundu wapamwamba kwambiri wa block cipher encryption. Pamafunika IV kuti uthenga uliwonse ukhale wapadera kutanthauza kuti midadada yofanana ndi yodziwika bwino imasiyidwa kuti ikhale midadada yosiyana. Chifukwa chake, imapereka kubisa kolimba kwambiri poyerekeza ndi mawonekedwe a ECB, koma ndikocheperako poyerekeza ndi mawonekedwe a ECB. Ngati palibe IV yomwe yalowetsedwa ndiye kuti kusakhazikika kudzagwiritsidwa ntchito pano ngati CBC ndipo izi zisintha kukhala zero-based byte[16].
-
CTR(Counter) CTR mode (CM) imadziwikanso kuti integer counter mode (ICM) ndi segmented integer counter (SIC) mode. Counter-mode imatembenuza block cipher kukhala stream cipher. Mawonekedwe a CTR ali ndi mawonekedwe ofanana ndi OFB, komanso amalola malo opezeka mwachisawawa panthawi yachinsinsi. CTR mode ndiyoyenera kugwira ntchito pamakina ambiri, pomwe midadada imatha kubisidwa molumikizana.
-
GCM(Galois/Counter Mode) ndi symmetric-key block cipher mode yomwe imagwiritsa ntchito hashing yapadziko lonse lapansi kuti ipereke kubisa kotsimikizika. GCM imaonedwa kuti ndi yotetezeka kwambiri kuposa mawonekedwe a CBC chifukwa imakhala ndi zotsimikizira komanso zotsimikizira kukhulupirika kwake ndipo imagwiritsidwa ntchito kwambiri pochita ntchito zake.
Padding
Pamitundu ya AES CBC ndi ECB, zoyikapo zimatha kukhala PKCS5PADDING ndi NoPadding. Ndi PKCS5Padding, chingwe cha 16-byte chidzatulutsa 32-byte (zotsatira zingapo za 16).
AES GCM PKCS5Padding ndi njira yofananira ya NoPadding chifukwa GCM ndi njira yotsatsira yomwe sifunikira padding. Mawu achinsinsi mu GCM ndiwotalikira ngati mawu osavuta. Chifukwa chake, nopadding imasankhidwa mwachisawawa.
AES Key Kukula
AES algorithm ili ndi 128-bit block size, mosasamala kanthu kuti makiyi anu ndi 256, 192 kapena 128 bits. Pamene symmetric cipher mode ikufuna IV, kutalika kwa IV kuyenera kukhala kofanana ndi kukula kwa chipika cha cipher. Chifukwa chake, nthawi zonse muyenera kugwiritsa ntchito IV ya 128 bits (16 byte) ndi AES.
Chinsinsi cha AES Chinsinsi
AES imapereka 128 bits, 192 bits ndi 256 bits of secret key size for encryption. Ngati mukusankha ma bits 128 kuti mubisike, ndiye kuti kiyi yachinsinsi iyenera kukhala ya 16 bits kutalika ndi 24 ndi 32 bits kwa 192 ndi 256 makiyi a makiyi motsatana. Mwachitsanzo, ngati kukula kwa kiyi ndi 128, ndiye kuti kiyi yovomerezeka yachinsinsi iyenera kukhala ndi zilembo 16 mwachitsanzo, 16 * 8 = 128 bits.