Hoʻopili AES a me ka wehe ʻana ma ka pūnaewele

Kūlana hoʻopunipuni kiʻekiʻe (AES) he algorithm encryption symmetric. ʻO AES ka maʻamau ʻoihana e like me kēia manawa e hiki ai iā 128 bit, 192 bit a me 256 bits encryption. He wikiwiki ka hoʻopili ʻana i ka symmetric i ka hoʻohālikelike ʻia me ka hoʻopili asymmetric a hoʻohana ʻia i nā ʻōnaehana e like me ka ʻōnaehana waihona. He mea hana ma ka pūnaewele e hana i ka hoʻopunipuni AES a me ka hoʻokaʻawale ʻana i kekahi kikokikona a i ʻole ʻōlelo huna.

Hāʻawi ka hāmeʻa i nā ʻano hoʻopunipuni a me ka decryption e like me ECB, CBC, CTR, CFB a me ke ʻano GCM. GCM Ua manaʻo ʻia ʻoi aku ka palekana ma mua o ke ʻano CBC a hoʻohana nui ʻia no kāna hana.

No ka ʻike hou aku e pili ana i ka hoʻopunipuni AES, e kipa keia wehewehe ana ma AES Encryption. Aia ma lalo ke ʻano e lawe i nā mea hoʻokomo no ka hoʻopili a me ka decryption.

Hoʻopili AES

Kumu64 Hex

AES Decryption

Kumu64 Palapala-Plain

ʻAʻole mālama ʻia nā waiwai kī huna āu e hoʻokomo ai, a i ʻole mākou e hoʻopuka ma kēia pūnaewele, hāʻawi ʻia kēia mea hana ma o kahi URL HTTPS e hōʻoia ai ʻaʻole hiki ke ʻaihue ʻia nā kī huna.

Inā mahalo ʻoe i kēia mea hana a laila hiki iā ʻoe ke noʻonoʻo e hāʻawi.

Mahalo mākou no kāu kākoʻo pau ʻole.

Nā mea nui

  • ʻōlikelike Algorithm Key: Hoʻohana ʻia ke kī like no ka hoʻopili a me ka decryption.
  • Block Cipher: Hoʻohana ʻo AES ma nā poloka ʻikepili paʻa. ʻO ka nui o ka poloka maʻamau he 128 bits.
  • Nā lōʻihi kī: Kākoʻo ʻo AES i nā kī lōʻihi o 128, 192, a me 256 bits. ʻO ka lōʻihi o ke kī, ʻoi aku ka ikaika o ka hoʻopili.
  • Palekana: Manaʻo ʻia ʻo AES i palekana loa a hoʻohana nui ʻia i nā protocol palekana a me nā noi.

Nā ʻōlelo a me nā ʻōlelo hoʻopunipuni AES

No ka hoʻopili ʻana, hiki iā ʻoe ke hoʻokomo i ka kikokikona a i ʻole ka ʻōlelo huna āu e makemake ai e hoʻopili. I kēia manawa e koho i ke ʻano cipher block o ka hoʻopunipuni.

Nā ʻano kākoʻo like ʻole o AES Encryption

Hāʻawi ʻo AES i nā ʻano hoʻopunipuni e like me ECB, CBC, CTR, OFB, CFB a me GCM mode.

  • ʻO ECB (Electronic Code Book) ke ʻano hoʻopunipuni maʻalahi loa a ʻaʻole koi iā IV no ka hoʻopili ʻana. E māhele ʻia ka ʻōlelo maʻamau i loko o nā poloka a e hoʻopili ʻia kēlā me kēia poloka me ke kī i hāʻawi ʻia a no laila ua hoʻopili ʻia nā poloka kikokikona like i loko o nā poloka kikokikona cipher like.

  • Manaʻo nui ʻia ke ʻano CBC (Cipher Block Chaining), a he ʻano holomua o ka block cipher encryption. Pono ʻo IV e hoʻokaʻawale i kēlā me kēia memo ke ʻano o nā poloka kikokikona like ʻole i hoʻopili ʻia i loko o nā poloka kikokikona cipher like ʻole. No laila, hāʻawi ia i ka hoʻopili paʻa i ka hoʻohālikelike ʻia me ka mode ECB, akā ʻoi aku ka lohi i ka hoʻohālikelike ʻia me ke ʻano ECB. Inā ʻaʻole i hoʻokomo ʻia ka IV a laila e hoʻohana ʻia ka paʻamau ma ʻaneʻi no ke ʻano CBC a hoʻopaʻa ʻia i kahi byte zero-based [16].

  • ʻIke ʻia ke ʻano CTR (Counter) CTR (CM) ma ke ʻano helu helu helu (ICM) a me ke ʻano helu helu helu (SIC). Hoʻololi ʻo Counter-mode i kahi cipher poloka i kahi cipher kahawai. Loaʻa i ka mode CTR nā hiʻohiʻona like me OFB, akā hiki nō hoʻi i kahi waiwai komo i ka wā decryption. Ua kūpono ke ʻano CTR no ka hana ʻana ma kahi mīkini multiprocessor, kahi e hiki ai ke hoʻopili ʻia nā poloka i ka like.

  • GCM(Galois/Ke ʻano hoʻohālikelike) ʻO ia ke ʻano hana cipher block symmetric-key e hoʻohana ana i ka hashing āpau e hāʻawi i ka hoʻopili hoʻopaʻa ʻia. Manaʻo ʻia ʻo GCM i ʻoi aku ka palekana ma mua o ke ʻano CBC no ka mea ua kūkulu ʻia i loko o ka hōʻoia a me ka nānā pono a hoʻohana nui ʻia no kāna hana.

Padding

No nā ʻano AES CBC a me ECB, hiki i ka padding ke PKCS5PADDING a me NoPadding. Me PKCS5Padding, he 16-byte string e hoʻopuka i 32-byte output (ʻo ka helu hou o 16).

ʻO AES GCM PKCS5Padding kahi ʻano like ʻole no NoPadding no ka mea ʻo GCM kahi ʻano hoʻoheheʻe ʻaʻole pono i ka padding. ʻO ka ciphertext ma GCM wale nō ka lōʻihi e like me ka plaintext. No laila, koho ʻia ka nopadding.

Nui Ki AES

He 128-bit ka nui o ka AES algorithm, me ka nānā ʻole inā he 256, 192 a i ʻole 128 ka lōʻihi o kāu kī. Ke koi ʻia kahi mode cipher symmetric i IV, pono e like ka lōʻihi o ka IV me ka nui o ka poloka o ka cipher. No laila, pono ʻoe e hoʻohana i ka IV o 128 bits (16 bytes) me AES.

Ki huna AES

Hāʻawi ʻo AES i 128 bits, 192 bits a me 256 bits o ka nui kī huna no ka hoʻopili ʻana. Inā koho ʻoe i nā bits 128 no ka hoʻopili ʻana, a laila pono ke kī huna o 16 mau bits ka lōʻihi a me 24 a me 32 mau bits no 192 a me 256 mau bits o ka nui kī. No ka laʻana, inā he 128 ka nui o ke kī, a laila he 16 mau huaʻōlelo ke kī huna kūpono, ʻo ia hoʻi, 16*8=128 bits.