Solved

# S-BOX DES style question for encryption assignment

Posted on 2008-11-09
642 Views
Newbie here, have a question here, screenshot attached where by plaintext is applied to a block cipher using sboxes and permutation network. The specifications are in the picture.
what I am stuck on is as follows;
1) 7049c and 30f75 do these need to be converted into binary first and then applied to the system?
2) For the SBOX mapping do these need to be turned into binary first or how they turned into the table as outlined in the link below;
http://en.wikipedia.org/wiki/S-box

screenshot1.jpg
0
Question by:jtiernan2008

LVL 1

Author Comment

the full pdf is as also attached below;
ET4427-2Assignment-2-9938516.pdf
0

LVL 13

Accepted Solution

Hi there,

As this is an assignment question, please be aware that we cannot post exact code implementations.

1. Yes, you'll have to convert it into binary first, use Windows calculator to do it, and be aware of the most significant bit.

2. For the SBOX mapping, the simplest way I see you can do it is to use an array like this

int nSbox[16] = {9, 6, 5, 10 .......} ;

When you split your binary input into equal parts of 4...

Say for example, your first block is 1101

1101 = '13'

Convert '15' back to binary if necessary.

Hope that helps.
0

LVL 1

Author Comment

So, just to make sure I got ye, I convert 7049c into binary giving 01110000010010011100 then I split up into equal parts of 4 and follow your instructions above? Next I do the same for 30f75..
0

LVL 1

Author Comment

Also, I take it that 7049c is Hex?
0

LVL 13

Expert Comment

Yep, 7049C is HEX

What language are you supposed to implement this in?
0

LVL 1

Author Comment

java
0

LVL 13

Expert Comment

OK, here's a Java hex to binary converter for your reference.

0

LVL 1

Author Closing Comment

Excellent put - thanks a million
0

## Featured Post

You cannot be 100% sure that you can protect your organization against crypto ransomware but you can lower down the risk and impact of the infection.
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…