SlideShare una empresa de Scribd logo
1 de 8
(DES)Data Encryption Standard:
A block cipher processes the plaintext
input in fixed-sized blocks and produces a
block of cipher text of equal size for each
plaintext block
The plaintext is 64 bits in length and the key
(k) is 56 bits in length (16 rounds of
processing (16 sub keys (k (left shift to k1)
k1…..k16 are generated for each round
based on left shift)

The plaintext block is divided into two
halves, LE0 and RE0. The two halves of the
data pass through 16 rounds of processing
and then combine to produce the cipher
text block.
A substitution is performed on the left half
of the data. This is done by applying a
round function F(left circular shift shuffles
the input block) to the right half of the data
and then taking the exclusive-OR (XOR) of
the output of that function and the left half
of the data.
Permutation is performed that consists of
the interchange of the two halves of the
data.
Implemtation of simple DES
            Algorithm
Program:
import java.security.*; // Java Security
Packages There are three security-
related packages in java 1. JCA/JCE
(Java Cryptography Architecture & Java
Cryptography Extensions) 2. JSSE( Java
Secure-Sockets Extension). 3. JAAS( Java
Authentication & Authorization Service)
import javax.crypto.*; // Provides the
classes and interfaces for cryptographic
operations. Operation include
encryption, key generation and key
agreement, and Message Authentication
Code (MAC) generation.
public class PrivateExample
{
public static void main(String[] args)
throws Exception
{
if (args.length != 1)
{
System.err.println("Usage:Java
PrivateExample text");
System.exit(1);
}
byte[] plainText =
args[0].getBytes("UTF8"); /* 8-bit
Unicode Transformation Format */
System.out.println("n start generating
DES key");
KeyGenerator KeyGen =
KeyGenerator.getInstance("DES");
KeyGen.init(56);
Key key= KeyGen.generateKey();
System.out.println("n finish generating
DES key");
Cipher cipher=
Cipher.getInstance("DES/ECB/PKCS5Pa
dding");//electronic code book : public
key crypto standard 5
System.out.println("n"+cipher.getProvid
er().getInfo());
System.out.println("n start encryption ");
cipher.init(Cipher.ENCRYPT_MODE,ke
y);
byte[] cipherText =
cipher.doFinal(plainText);
System.out.println("Finish Encryption");
System.out.println(new
String(cipherText,"UTF8"));
System.out.println("n Start
Decryption");
cipher.init(Cipher.DECRYPT_MODE,ke
y);
byte[] newPlainText =
cipher.doFinal(cipherText);
System.out.println("Final decryption");
System.out.println(new
String(newPlainText, "UTF8"));
}
}
Output :
Des1
Des1

Más contenido relacionado

Similar a Des1

New modification on feistel DES algorithm based on multi-level keys
New modification on feistel DES algorithm based on  multi-level keys New modification on feistel DES algorithm based on  multi-level keys
New modification on feistel DES algorithm based on multi-level keys IJECEIAES
 
AES effecitve software implementation
AES effecitve software implementationAES effecitve software implementation
AES effecitve software implementationRoman Oliynykov
 
Comparison of AES and DES Algorithms Implemented on Virtex-6 FPGA and Microbl...
Comparison of AES and DES Algorithms Implemented on Virtex-6 FPGA and Microbl...Comparison of AES and DES Algorithms Implemented on Virtex-6 FPGA and Microbl...
Comparison of AES and DES Algorithms Implemented on Virtex-6 FPGA and Microbl...IJECEIAES
 
Network Security UNIT-II
Network Security UNIT-IINetwork Security UNIT-II
Network Security UNIT-IIrathnadeepa2
 
Next generation block ciphers
Next generation block ciphersNext generation block ciphers
Next generation block ciphersRoman Oliynykov
 
Computer security module 2
Computer security module 2Computer security module 2
Computer security module 2Deepak John
 
Network security R.Rathna Deepa 2nd M.sc.,Computer Science
Network security R.Rathna Deepa 2nd M.sc.,Computer ScienceNetwork security R.Rathna Deepa 2nd M.sc.,Computer Science
Network security R.Rathna Deepa 2nd M.sc.,Computer ScienceRathnaDeepa1
 
Aes 128 192_256_bits_project_report
Aes 128 192_256_bits_project_reportAes 128 192_256_bits_project_report
Aes 128 192_256_bits_project_reportsakhi rehman
 
Chapter 3-block-cipher-des1
Chapter 3-block-cipher-des1Chapter 3-block-cipher-des1
Chapter 3-block-cipher-des1Shiraz316
 
FPGA Implementation of Mix and Inverse Mix Column for AES Algorithm
FPGA Implementation of Mix and Inverse Mix Column for AES AlgorithmFPGA Implementation of Mix and Inverse Mix Column for AES Algorithm
FPGA Implementation of Mix and Inverse Mix Column for AES Algorithmijsrd.com
 
Using Cipher Key to Generate Dynamic S-Box in AES Cipher System
Using Cipher Key to Generate Dynamic S-Box in AES Cipher SystemUsing Cipher Key to Generate Dynamic S-Box in AES Cipher System
Using Cipher Key to Generate Dynamic S-Box in AES Cipher SystemCSCJournals
 
Implementation of Various Cryptosystem Using Chaos
Implementation of Various Cryptosystem Using ChaosImplementation of Various Cryptosystem Using Chaos
Implementation of Various Cryptosystem Using ChaosIOSR Journals
 
A General Session Based Bit Level Block Encoding Technique Using Symmetric Ke...
A General Session Based Bit Level Block Encoding Technique Using Symmetric Ke...A General Session Based Bit Level Block Encoding Technique Using Symmetric Ke...
A General Session Based Bit Level Block Encoding Technique Using Symmetric Ke...ijcseit
 
Security Analysis of AES and Enhancing its Security by Modifying S-Box with a...
Security Analysis of AES and Enhancing its Security by Modifying S-Box with a...Security Analysis of AES and Enhancing its Security by Modifying S-Box with a...
Security Analysis of AES and Enhancing its Security by Modifying S-Box with a...IJCNCJournal
 
Java implementation and performance evaluation of some
Java implementation and performance evaluation of someJava implementation and performance evaluation of some
Java implementation and performance evaluation of someAlexander Decker
 

Similar a Des1 (20)

icwet1097
icwet1097icwet1097
icwet1097
 
New modification on feistel DES algorithm based on multi-level keys
New modification on feistel DES algorithm based on  multi-level keys New modification on feistel DES algorithm based on  multi-level keys
New modification on feistel DES algorithm based on multi-level keys
 
AES effecitve software implementation
AES effecitve software implementationAES effecitve software implementation
AES effecitve software implementation
 
Comparison of AES and DES Algorithms Implemented on Virtex-6 FPGA and Microbl...
Comparison of AES and DES Algorithms Implemented on Virtex-6 FPGA and Microbl...Comparison of AES and DES Algorithms Implemented on Virtex-6 FPGA and Microbl...
Comparison of AES and DES Algorithms Implemented on Virtex-6 FPGA and Microbl...
 
Network Security UNIT-II
Network Security UNIT-IINetwork Security UNIT-II
Network Security UNIT-II
 
Next generation block ciphers
Next generation block ciphersNext generation block ciphers
Next generation block ciphers
 
Computer security module 2
Computer security module 2Computer security module 2
Computer security module 2
 
Network security R.Rathna Deepa 2nd M.sc.,Computer Science
Network security R.Rathna Deepa 2nd M.sc.,Computer ScienceNetwork security R.Rathna Deepa 2nd M.sc.,Computer Science
Network security R.Rathna Deepa 2nd M.sc.,Computer Science
 
Unit 2
Unit 2Unit 2
Unit 2
 
Aes 128 192_256_bits_project_report
Aes 128 192_256_bits_project_reportAes 128 192_256_bits_project_report
Aes 128 192_256_bits_project_report
 
Chapter 3-block-cipher-des1
Chapter 3-block-cipher-des1Chapter 3-block-cipher-des1
Chapter 3-block-cipher-des1
 
FPGA Implementation of Mix and Inverse Mix Column for AES Algorithm
FPGA Implementation of Mix and Inverse Mix Column for AES AlgorithmFPGA Implementation of Mix and Inverse Mix Column for AES Algorithm
FPGA Implementation of Mix and Inverse Mix Column for AES Algorithm
 
Using Cipher Key to Generate Dynamic S-Box in AES Cipher System
Using Cipher Key to Generate Dynamic S-Box in AES Cipher SystemUsing Cipher Key to Generate Dynamic S-Box in AES Cipher System
Using Cipher Key to Generate Dynamic S-Box in AES Cipher System
 
Implementation of Various Cryptosystem Using Chaos
Implementation of Various Cryptosystem Using ChaosImplementation of Various Cryptosystem Using Chaos
Implementation of Various Cryptosystem Using Chaos
 
A General Session Based Bit Level Block Encoding Technique Using Symmetric Ke...
A General Session Based Bit Level Block Encoding Technique Using Symmetric Ke...A General Session Based Bit Level Block Encoding Technique Using Symmetric Ke...
A General Session Based Bit Level Block Encoding Technique Using Symmetric Ke...
 
Security Analysis of AES and Enhancing its Security by Modifying S-Box with a...
Security Analysis of AES and Enhancing its Security by Modifying S-Box with a...Security Analysis of AES and Enhancing its Security by Modifying S-Box with a...
Security Analysis of AES and Enhancing its Security by Modifying S-Box with a...
 
Java implementation and performance evaluation of some
Java implementation and performance evaluation of someJava implementation and performance evaluation of some
Java implementation and performance evaluation of some
 
Unit 2
Unit  2Unit  2
Unit 2
 
Renas Rajab Asaad
Renas Rajab AsaadRenas Rajab Asaad
Renas Rajab Asaad
 
Aes
AesAes
Aes
 

Último

ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 

Último (20)

ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 

Des1

  • 1. (DES)Data Encryption Standard: A block cipher processes the plaintext input in fixed-sized blocks and produces a block of cipher text of equal size for each plaintext block The plaintext is 64 bits in length and the key (k) is 56 bits in length (16 rounds of processing (16 sub keys (k (left shift to k1) k1…..k16 are generated for each round based on left shift) The plaintext block is divided into two halves, LE0 and RE0. The two halves of the data pass through 16 rounds of processing and then combine to produce the cipher text block. A substitution is performed on the left half of the data. This is done by applying a round function F(left circular shift shuffles the input block) to the right half of the data and then taking the exclusive-OR (XOR) of
  • 2. the output of that function and the left half of the data. Permutation is performed that consists of the interchange of the two halves of the data.
  • 3. Implemtation of simple DES Algorithm Program: import java.security.*; // Java Security Packages There are three security- related packages in java 1. JCA/JCE (Java Cryptography Architecture & Java Cryptography Extensions) 2. JSSE( Java Secure-Sockets Extension). 3. JAAS( Java Authentication & Authorization Service) import javax.crypto.*; // Provides the classes and interfaces for cryptographic operations. Operation include encryption, key generation and key agreement, and Message Authentication Code (MAC) generation. public class PrivateExample
  • 4. { public static void main(String[] args) throws Exception { if (args.length != 1) { System.err.println("Usage:Java PrivateExample text"); System.exit(1); } byte[] plainText = args[0].getBytes("UTF8"); /* 8-bit Unicode Transformation Format */ System.out.println("n start generating DES key"); KeyGenerator KeyGen = KeyGenerator.getInstance("DES"); KeyGen.init(56); Key key= KeyGen.generateKey();
  • 5. System.out.println("n finish generating DES key"); Cipher cipher= Cipher.getInstance("DES/ECB/PKCS5Pa dding");//electronic code book : public key crypto standard 5 System.out.println("n"+cipher.getProvid er().getInfo()); System.out.println("n start encryption "); cipher.init(Cipher.ENCRYPT_MODE,ke y); byte[] cipherText = cipher.doFinal(plainText); System.out.println("Finish Encryption"); System.out.println(new String(cipherText,"UTF8")); System.out.println("n Start Decryption"); cipher.init(Cipher.DECRYPT_MODE,ke y);
  • 6. byte[] newPlainText = cipher.doFinal(cipherText); System.out.println("Final decryption"); System.out.println(new String(newPlainText, "UTF8")); } } Output :