DES kapena DESDE , symmetric-key algorithm for the encryption of electronic data, ndiye wolowa m'malo mwa DES(Data Encryption Standard) ndipo imapereka kubisa kotetezeka kuposa DES. DES imaphwanya kiyi yoperekedwa ndi ogwiritsa ntchito kukhala ma subkeys atatu monga k1, k2, ndi k3. Uthenga umasungidwa ndi k1 poyamba, kenaka amasiyidwa ndi k2 ndikubisidwanso ndi k3. Kukula kwa kiyi ya DESede ndi 128 kapena 192 bit ndikutchinga kukula kwa 64 bit. Pali njira ziwiri zogwirira ntchito—Triple ECB (Electronic Code Book) ndi Triple CBC (Cipher Block Chaining).
Pansipa pali chida chaulere chapaintaneti chomwe chimapereka DES encryption ndi decryption ndi njira ziwiri zogwirira ntchito pamawu aliwonse osavuta.
Mtengo uliwonse wachinsinsi womwe mumalowetsa, kapena timapanga sunasungidwe patsamba lino, chidachi chimaperekedwa kudzera pa URL ya HTTPS kuwonetsetsa kuti makiyi achinsinsi sangabedwe.
DES Encryption
- Kusankha Mfungulo:DES imagwiritsa ntchito makiyi atatu, omwe amatchedwa K1, k2, k3. Kiyi iliyonse ndi 56 bits kutalika, koma chifukwa cha ma parity bits, makiyi ogwira ntchito ndi 64 bits pa kiyi.
- Njira Yachinsinsi::
- Lembani ndi K1Cholembacho chimasungidwa koyamba pogwiritsa ntchito kiyi yoyamba ya K1, zomwe zimapangitsa kuti pakhale ciphertext C1
- Decrypt ndi K2:C1 imasinthidwa pogwiritsa ntchito kiyi yachiwiri ya K2, kutulutsa zotsatira zapakatikati.
- Lembani ndi K3:Pomaliza, zotsatira zapakatikati zimabisidwanso pogwiritsa ntchito kiyi yachitatu ya K3 kupanga mawu omaliza a C2.
DES Decryption
Decryption mu DES kwenikweni ndiyosiyana ndi kubisa:
- Njira Yomasulira:
- Decrypt ndi K3Ciphertext C2 imasinthidwa pogwiritsa ntchito kiyi yachitatu ya K3 kuti mupeze zotsatira zapakatikati.
- Lembani ndi K2:Zotsatira zapakatikati zimasungidwa pogwiritsa ntchito kiyi yachiwiri ya K2, ndikupanga zotsatira zina zapakatikati.
- Decrypt ndi K1:Pomaliza, chotsatirachi chimasinthidwa pogwiritsa ntchito kiyi yoyamba ya K1 kuti mupeze mawu omveka bwino.
Kuwongolera Kwachinsinsi
- Kukula Kwakiyi:Kiyi iliyonse mu DES ndi 56 bits utali, zomwe zimapangitsa kukula kokwanira kwa makiyi 168 (popeza K1, K2 ndi K3 amagwiritsidwa ntchito motsatizana).
- Kugwiritsa Ntchito Kwambiri:K1 ndi K3 zitha kukhala kiyi yofananira yakubwerera m'mbuyo ndi DES wamba, koma tikulimbikitsidwa kuti K2 ikhale yosiyana kuti ilimbikitse chitetezo.
Malingaliro a Chitetezo
- DES imatengedwa kuti ndi yotetezeka koma ndiyochedwa poyerekeza ndi ma aligorivimu amakono ngati AES.
- Chifukwa cha kutalika kwake kofunikira, 3DES imatha kuvutitsidwa ndi zina ndipo sivomerezedwanso pamapulogalamu atsopano pomwe njira zina zabwinoko (monga AES) zilipo.
DES ikugwiritsidwabe ntchito m'makina obadwa kumene komwe kumagwirizana ndi DES kumafunikira, koma mapulogalamu amakono amagwiritsa ntchito AES ya symmetric encryption chifukwa chakuchita bwino kwake komanso chitetezo champhamvu.
DES Encryption Maupangiri Ogwiritsa Ntchito
Lowetsani mawu osamveka kapena mawu achinsinsi omwe mukufuna kubisa. Pambuyo pake, sankhani mawonekedwe a encryption kuchokera kumunsi. Pansipa pali ma vales omwe amapezeka:
-
ECB: Ndi mawonekedwe a ECB, zolemba zilizonse zimagawidwa m'ma block angapo, ndipo chipika chilichonse chimasungidwa ndi kiyi yoperekedwa ndipo chifukwa chake midadada yofananira imasiyidwa kukhala midadada yofananira. Chifukwa chake, njira yobisa iyi imawonedwa ngati yosatetezedwa pang'ono poyerekeza ndi CBC. Palibe IV yofunikira pamachitidwe a ECB popeza chipika chilichonse chimasungidwa m'malembo ofanana. Kumbukirani, kugwiritsa ntchito IV kumawonetsetsa kuti zolemba zofananira zimasungidwa m'malemba osiyanasiyana.
-
CBC: Mawonekedwe a CBC encryption amaonedwa kuti ndi otetezeka kwambiri poyerekeza ndi mawonekedwe a ECB, popeza CBC imafuna IV yomwe imathandizira kubisala mwachisawawa midadada yofananira mosiyana ndi mawonekedwe a ECB. Kukula kwa vector ya CBC kukuyenera kukhala 64 bit kutanthauza kuti ikhale yayitali zilembo 8 mwachitsanzo, 8*8 = 64 bits.