AES Encryption ne Decryption wɔ Intanɛt so

Encryption Standard(AES) a Ɛkɔ Anim . yɛ symmetric encryption algorithm a wɔde kyerɛkyerɛ nneɛma mu. AES yɛ nnwuma gyinapɛn sɛnea ɛte mprempren sɛnea ɛma kwan ma 128 bit, 192 bit ne 256 bits encryption. Symmetric encryption yɛ ntɛmntɛm sɛ wɔde toto asymmetric encryption ho a na wɔde di dwuma wɔ nhyehyɛe te sɛ database system mu. Nea edidi so yi yɛ intanɛt so adwinnade a wɔde yɛ AES encryption ne decryption a ɛfa plain-text anaa password biara ho.

Adwinnade no ma akwan horow pii a wɔfa so de encryption ne decryption te sɛ ECB, CBC, CTR, CFB ne GCM kwan so. GCM wobu no sɛ ɛyɛ nea ahobammɔ wom sen CBC mode na wogye tom kɛse wɔ ne dwumadi ho.

Sɛ wopɛ nsɛm pii fa AES encryption ho a, kɔ saa nkyerɛkyerɛmu yi wɔ AES Encryption so. Ase hɔ no yɛ kratasin a wode bɛfa inputs no ama encryption ne decryption no.

AES Encryption a Wɔde Siesie Nsɛm

Base64 Hex

AES Nsɛm a Wɔde Kyerɛw Nsɛm

Base64 Nsɛm a Wɔakyerɛw no Daa

Kokoam safoa botae biara a wobɛhyɛ mu, anaasɛ yɛayɛ no, wɔmfa nsie wɔ saa wɛbsaet yi so, wɔde saa adwinnade yi nam HTTPS URL so de ama de ahwɛ ahu sɛ wontumi nwia kokoam safoa biara.

Sɛ w’ani sɔ saa adwinnade yi a ɛnde wubetumi asusuw ho sɛ wode ntoboa bɛma.

Yɛda ase wɔ mo mmoa a enni awiei da no ho.

Nneɛma Titiriw a Ɛwɔ Hɔ

  • Symmetric a ɛyɛ pɛpɛɛpɛ Key Algorithm: Wɔde safoa koro no ara di dwuma ma encryption ne decryption nyinaa.
  • Block Cipher a Wɔde Sie: AES yɛ adwuma wɔ data a ɛyɛ fixed-size blocks so. Block kɛse a wɔahyɛ da ayɛ no yɛ 128 bits.
  • Key Ntrɛwmu: AES boa safoa tenten a ɛyɛ 128, 192, ne 256 bits. Dodow a safoa no ware no, dodow no ara na encryption no mu yɛ den.
  • Bammɔ: Wobu AES sɛ ahobammɔ kɛse na wɔde di dwuma kɛse wɔ ahobammɔ nhyehyɛe ne application ahorow mu.

AES Encryption Nsɛmfua & Nsɛmfua a Wɔde Di Dwuma

Sɛ wopɛ encryption a, wubetumi akyerɛw nsɛm a ɛnyɛ den anaa password a wopɛ sɛ wode encrypt no. Afei paw block cipher mode a wode bɛhyɛ encryption no mu.

AES Encryption Akwan Ahorow a Wɔboa

AES de encryption akwan pii te sɛ ECB, CBC, CTR, OFB, CFB ne GCM mode ma.

  • ECB(Electronic Code Book) yɛ encryption mode a ɛyɛ mmerɛw sen biara na enhia IV ma encryption. Wɔbɛkyekyɛ input plain text no mu ayɛ no blocks na wɔde key a wɔde ama no bɛ encrypt block biara na ɛno nti wɔde plain text blocks a ɛyɛ pɛ no encrypt akɔ cipher text blocks a ɛyɛ pɛ mu.

  • CBC(Cipher Block Chaining) mode no yɛ nea wɔkamfo kyerɛ kɛse, na ɛyɛ ɔkwan a ɛkɔ akyiri a wɔfa so de block cipher encryption di dwuma. Ɛhwehwɛ sɛ IV ma nkra biara yɛ soronko a ɛkyerɛ sɛ wɔde encrypted plain text blocks a ɛyɛ pɛ no ayɛ no cipher text blocks a ɛnsɛ. Enti, ɛma encryption a ɛyɛ den kɛse sɛ wɔde toto ECB mode ho a, nanso ɛyɛ brɛoo kakra sɛ wɔde toto ECB mode ho a. Sɛ wɔanhyɛ IV biara a, ɛnde wɔde default bedi dwuma wɔ ha ama CBC mode na ɛno default kɔ zero-based byte[16].

  • CTR(Counter) CTR mode (CM) nso frɛ no integer counter mode (ICM) ne segmented integer counter (SIC) mode. Counter-mode dane block cipher ma ɛbɛyɛ stream cipher. CTR mode no wɔ su a ɛte sɛ OFB, nanso ɛsan nso ma kwan ma random-access property wɔ decryption bere mu. CTR mode no fata yiye sɛ ɛbɛyɛ adwuma wɔ multiprocessor afiri so, baabi a wobetumi de blocks encrypt wɔ parallel mu.

  • GCM(Galois/Akontaabu Ɔkwan) . yɛ symmetric-key block cipher mode a ɛyɛ adwuma a ɛde amansan hashing di dwuma de ma encryption a wɔagye atom. Wobu GCM sɛ ɛyɛ ahobammɔ sen CBC mode efisɛ ɛwɔ nokwaredi ne nokwaredi nhwehwɛmu a wɔasisi mu na wɔde di dwuma kɛse ma ne dwumadi.

Padding a wɔde hyɛ mu

Wɔ AES modes CBC ne ECB, padding no betumi ayɛ PKCS5PADDING ne NoPadding. PKCS5Padding no, 16-byte string bɛma 32-byte output (16 dodow a edi hɔ).

AES GCM PKCS5Padding yɛ asɛmfua a ɛne NoPadding hyia efisɛ GCM yɛ streaming mode a enhia padding. Ciphertext a ɛwɔ GCM mu no tenten te sɛ plaintext no nkutoo. Enti, nopadding yɛ default a wɔapaw.

AES Safoa Kɛse

AES algorithm no wɔ 128-bit block size, ɛmfa ho sɛ wo key tenten yɛ 256, 192 anaa 128 bits. Sɛ symmetric cipher mode hwehwɛ IV a, ɛsɛ sɛ IV no tenten ne cipher no block kɛse yɛ pɛ. Enti, ɛsɛ sɛ wode IV a ɛyɛ 128 bits (16 bytes) di dwuma bere nyinaa ne AES.

AES Ahintasɛm Safoa

AES ma 128 bits, 192 bits ne 256 bits a ɛyɛ kokoam safoa kɛse ma encryption. Sɛ worepaw bits 128 ama encryption a, ɛnde ɛsɛ sɛ kokoam safoa no tenten yɛ bits 16 na bits 24 ne 32 ma bits 192 ne 256 a ne kɛse yɛ safoa no. Sɛ nhwɛsoɔ no, sɛ safoa no kɛseɛ yɛ 128 a, ɛnde ɛsɛ sɛ kokoam safoa a ɛfata yɛ nkyerɛwdeɛ 16 i.e., 16*8=128 bits