Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this section, you will implement a simplified version of the DES block cipher algorithm. Naturally enough, it is called SDES, and it is designed

In this section, you will implement a simplified version of the DES block cipher algorithm. Naturally enough, it is called SDES, and it is designed to have the features of the DES algorithm but scaled down so it is more tractable to understand. (Note however, that SDES is in no way secure and should not be used for serious cryptographic applications.) Here is the detailed specifications of SDES.

SDES encryption takes a 10 bit raw key (from which two 8 bit keys are generated as describedin the handout) and encrypts an 8 bit plaintext to produce an 8 bit ciphertext. Implement the SDES algorithm in a class called SDES. The encryption an decryption methods should match the interface below: public static byte[] Encrypt(byte[] rawkey, byte[] plaintext) public static byte[] Decrypt(byte[] rawkey, byte[] ciphertext) Here, rather than compactly representing the SDES plaintext and ciphertext using byte-sized (8-bit) variables, the data is represented using byte arrays of length 8. Similarly the 10 bit keys are represented as arrays of length 10. Although this design is extremely inefficient (it uses 8 times more space), it makes the algorithm easier to implement and experiment with. For example, one might declare a 10-bit raw key in a test program like this: byte key1[] = {1, 1, 1, 0, 0, 0, 1, 1, 1, 0}; To verify that your implementation of SDES is correct, try the following test cases:

Raw Key Plaintext Ciphertext

0000000000 10101010 00010001

1110001110 10101010 11001010

1110001110 01010101 01110000

1111111111 10101010 00000100

Use your implementation to complete the following table:

Raw Key Plaintext Ciphertext 0000000000 00000000 ? 1111111111 11111111 ? 0000011111 00000000 ? 0000011111 11111111 ? 1000101110 ? 00011100 1000101110 ? 11000010 0010011111 ? 10011101 0010011111 ? 10010000

Pleas check here for details of SDES.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions

Question

1-1 Why is communication important to your career? [LO-1]

Answered: 1 week ago