DES Encryption na Decryption Kumurongo

DES cyangwa DESede , impuzamikorere-urufunguzo algorithm yo gushishoza amakuru ya elegitoronike, ni umusimbura wa DES (Data Encryption Standard) kandi itanga umutekano wibanga kuruta DES. DES isenya urufunguzo rwatanzwe nabakoresha mubice bitatu nka k1, k2, na k3. Ubutumwa bwabitswe hamwe na k1 mbere, hanyuma bukabikwa hamwe na k2 hanyuma bukabikwa hamwe na k3. Ingano yingenzi ya DESede ni 128 cyangwa 192 biti kandi ihagarika ubunini 64 bit. Hariho uburyo 2 bwo gukora - Triple ECB (Igitabo cya elegitoroniki Igitabo) na Triple CBC (Urunigi rwa Cipher).

Hasi nigikoresho cyubuntu kumurongo gitanga DES encryption na decryption hamwe nuburyo bubiri bwimikorere kubwinyandiko isanzwe.

DES Encryption

Base64 Hex

DES Kubanga

Base64 Ikibaya

Agaciro kingenzi kingenzi winjiye, cyangwa twabyaye ntabwo kibitswe kururu rubuga, iki gikoresho gitangwa hifashishijwe URL ya HTTPS kugirango umenye neza ko urufunguzo rwibanga rudashobora kwibwa.

Niba ushima iki gikoresho noneho urashobora gutekereza gutanga.

Turashimira inkunga yawe idashira.

DES Encryption

  • Guhitamo Ibyingenzi:DES ikoresha urufunguzo eshatu, mubisanzwe bita K1, k2, k3. Buri rufunguzo rufite uburebure bwa 56, ariko bitewe nuburinganire, ingano yingenzi yingenzi ni 64 bits kuri urufunguzo.
  • Uburyo bwo gushishoza ::
    • Shishoza hamwe na K1Guhagarika ibisobanuro byabanje gushishoza ukoresheje urufunguzo rwa mbere K1, bivamo ciphertext C1
    • Kuramo na K2:C1 noneho ibanga ikoresheje urufunguzo rwa kabiri K2, itanga ibisubizo hagati.
    • Shishoza hamwe na K3:Hanyuma, igisubizo giciriritse cyongeye gushishoza ukoresheje urufunguzo rwa gatatu K3 kugirango rutange ciphertext ya nyuma C2.

DES Kubanga

Gufungura muri DES mubyukuri ni ihinduka ryibanga:
  • Uburyo bwo gufungura:
    • Kuramo hamwe na K3Ciphertext C2 yifunguye ukoresheje urufunguzo rwa gatatu K3 kugirango ubone ibisubizo hagati.
    • Shishoza hamwe na K2:Igisubizo giciriritse noneho kirahishwa ukoresheje urufunguzo rwa kabiri K2, rutanga ikindi gisubizo hagati.
    • Kuramo hamwe na K1:Hanyuma, iki gisubizo kirafunguye ukoresheje urufunguzo rwa mbere K1 kugirango ubone umwimerere usobanutse.

Ubuyobozi bw'ingenzi

  • Ingano y'ingenzi:Buri rufunguzo muri DES ni 56 bits z'uburebure, bivamo ubunini bwuzuye bwingenzi bwa 168 bits (kuva K1, K2 na K3 bikoreshwa bikurikiranye).
  • Imikoreshereze y'ingenzi:K1 na K3 birashobora kuba urufunguzo rumwe rwo gusubira inyuma guhuza na DES isanzwe, ariko birasabwa ko K2 itandukanye kugirango izamure umutekano.

Ibitekerezo byumutekano

  • DES ifatwa nkumutekano ariko iratinda ugereranije na algorithm igezweho nka AES.
  • Bitewe n'uburebure bwacyo bwingenzi, 3DES irashobora kwibasirwa nibitero bimwe na bimwe kandi ntigisabwa inama nshya aho ubundi buryo bwiza (nka AES) burahari.

DES isigaye ikoreshwa muri sisitemu yumurage aho bisabwa guhuza na DES, ariko porogaramu zigezweho zikoreshwa AES kubanga kubera imikorere yayo n'umutekano ukomeye.

DES Encryption Ikoreshwa

Injira inyandiko-isanzwe cyangwa ijambo ryibanga ushaka gushishoza. Nyuma yibyo, hitamo uburyo bwo kugenzura uhereye kumanuka. Hano hepfo hari ibibaya bishoboka:

  • ECB: Hamwe nuburyo bwa ECB, inyandiko iyariyo yose igabanijwemo ibice byinshi, kandi buri gice kiba gifite urufunguzo rwatanzwe bityo rero ibice bisa byanditse bihishe muburyo bumwe bwa cipher. Kubwibyo, ubu buryo bwo gushishoza bufatwa nkumutekano muke kuruta uburyo bwa CBC. Nta IV isabwa muburyo bwa ECB nkuko buri gice kibitswe muburyo bumwe bwa cipher. Wibuke, gukoresha IV byemeza ko inyandiko zisa zihishe kuri ciphertexts zitandukanye.

  • CBC: Uburyo bwa enterineti bwa CBC bufatwa nkumutekano ugereranije nuburyo bwa ECB, kuko CBC isaba IV ifasha muguhitamo ibanga ryibice bisa nuburyo bwa ECB. Ingano ya vector yuburyo bwa CBC igomba kuba 64 bit bivuze ko igomba kuba inyuguti 8 ndende ni ukuvuga, 8 * 8 = 64 bits