• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 691
  • Last Modified:

S-BOX DES style question for encryption assignment

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

thanks in advance

screenshot1.jpg
0
jtiernan2008
Asked:
jtiernan2008
  • 5
  • 3
1 Solution
 
jtiernan2008Author Commented:
the full pdf is as also attached below;
ET4427-2Assignment-2-9938516.pdf
0
 
Kelvin_KingCommented:
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'

Look up 13 in the array and your answer is '15'

Convert '15' back to binary if necessary.

Hope that helps.
0
 
jtiernan2008Author Commented:

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jtiernan2008Author Commented:
Also, I take it that 7049c is Hex?
0
 
Kelvin_KingCommented:
Yep, 7049C is HEX

What language are you supposed to implement this in?
0
 
jtiernan2008Author Commented:
java
0
 
Kelvin_KingCommented:
OK, here's a Java hex to binary converter for your reference.

http://www.roseindia.net/java/java-conversion/HexadecimalToBinaryAndLong.shtml
0
 
jtiernan2008Author Commented:
Excellent put - thanks a million
0

Featured Post

Cyber Threats to Small Businesses (Part 1)

This past May, Webroot surveyed more than 600 IT decision-makers at medium-sized companies to see how these small businesses perceived new threats facing their organizations.  Read what Webroot CISO, Gary Hayslip, has to say about the survey in part 1 of this 2-part blog series.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now