Forums: » Register « |  Free Tools |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |

New Free Tools on Dev Shed!

#1
April 23rd, 2012, 06:22 PM
 matthayzon
Contributing User

Join Date: Jan 2012
Posts: 37
Time spent in forums: 6 h 30 m 4 sec
Reputation Power: 2

Hello everyone,
I am having some serious trouble with the two questions below. I have a final exam coming up tomorrow and I know these two problems will be on there. I have been searching for explanations online with no success. Can anyone please help me understand these two problems?

1) A message is made of 100 characters. A hash algorithm creates a digest out of this message by choosing characters 1, 11, 21, 31, 41, 51, 61, 71, 81 and 91. The resulting digest has 10 characters. Does this algorithm meet the first criterion of a hash algorithm? Does it meet the second criterion? Does it meet the third criterion?

2) What are all the possible number combinations of inputs in a 6-by-2 S-box? What is the possible number of outputs?

thank you

#2
April 23rd, 2012, 08:39 PM
 OmegaZero
Contributing User

Join Date: May 2007
Posts: 756
Time spent in forums: 3 Weeks 6 Days 8 h 21 m 48 sec
Reputation Power: 928
First off, we don't do people's homework here. Second, how much help you get is usually dependent on how much effort you show. Posting what you've done so far your problem, where you got stuck, what you understand & where you lose it, etc., go a long way to A: show us what information would be most helpful to you and B: convince us to bother. Anyways, I'm charitable (or maybe just procrastinating) tonight so,

For (1), presumably your text book describes three criteria that an algorithm must satisfy to be a used as a hash. Reading that section would be a good start.

For (2), do you know what an S-box is? Given an S-Box and an input value can you produce the output value? What does the x in x-by-y S-box stand for?

If I write out a 3x2 S-box,
Code:
```  | 00 | 01 | 10 | 11 |
--+----+----+----+----+
0 | 11 | 10 | 01 | 00 |
--+----+----+----+----+
1 | 01 | 11 | 00 | 10 |
--+----+----+----+----+```
Can you tell what the range of the input values is? Or for that matter, can you count the output values?

Incidentally, you may want to spend some time re-evaluating how you search for information on-line. The first (or second depending on search engine) link when you search for "S-Box" is Wikipedia's S-Box article which answers question (2) in the third sentence.
__________________
sub{*{\$::{\$_}}{CODE}==\$_[0]&& print for(%:: )}->(\&Meh);

 Viewing: Dev Shed Forums > System Administration > Security and Cryptography > General Question about has algorithms