SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Similaire à 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
 

Similaire à 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
 

Dernier

ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
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
 
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
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
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
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
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
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
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
 
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
 
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
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 

Dernier (20)

ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
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
 
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
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
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
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.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
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
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
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
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
 
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...
 
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
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 

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 :