Subject: Re: [Cfrg] Derivation of an AES key from hash function (SHA-1, 256, 5

From: ngaga Gisse <[email-masked]>
Date: Tue, 18 Jul 2006 10:06:09 -0700 (PDT)

Thank you Finney for the advice.   I have the following question wrt to the third advice:
   
   How can the  hash collision be guaranteed if only a subset of bits of the hash ouput will be used as the AES input? (e.g. the hash ouput is 256 bits, and the AES key is 128 bits). 
   
  Ngaga

[email-masked] wrote:      Today's Topics:

1. Derivation of an AES key from hash function (SHA-1, 256,
512) (ngaga Gisse)
2. Derivation of an AES key from hash function (SHA-1, 256,
512) (ngaga Gisse)
3. Re: Derivation of an AES key from hash function (SHA-1, 256,
512) (Hal Finney)

----------------------------------------------------------------------

Message: 1
Date: Mon, 17 Jul 2006 09:21:46 -0700 (PDT)
From: ngaga Gisse 
Subject: [Cfrg] Derivation of an AES key from hash function (SHA-1,
256, 512)
To: [email-masked]
Cc: ngaga Gisse 
Message-ID: <[email-masked]>
Content-Type: text/plain; charset="iso-8859-1"

Dear Sir,
I have the following problem:
I propose to use the hash function output as an input to the AES algorithm.
The output of the AES is used to encrypt message M. 

Question:
1) I want to use a hash output (e.g. 160 bits stream) as an input to the the AES algorithm 1) I want to use a hash output. What techniques should be used to match the hash ouput and the AES input ?, Or what actually should be done?
2) Question1, but Hash(160 bits) ouput less than the AES (192 bits) input. 
3) Are there any known functions that can solve the problem? 

Kind regards,
Ngaga

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www1.ietf.org/pipermail/cfrg/attachments/20060717/3063f315/attachment.html

------------------------------

Message: 2
Date: Mon, 17 Jul 2006 09:23:20 -0700 (PDT)
From: ngaga Gisse 
Subject: [Cfrg] Derivation of an AES key from hash function (SHA-1,
256, 512)
To: [email-masked]
Cc: ngaga Gisse 
Message-ID: <[email-masked]>
Content-Type: text/plain; charset="iso-8859-1"

Dear Sir,
I have the following problem:
I propose to use the hash function output as an input to the AES algorithm.
The output of the AES is used to encrypt message M. 

Question:
1) I want to use a hash output (e.g. 160 bits stream) as an input to the the AES algorithm 1) I want to use a hash output. What techniques should be used to match the hash ouput and the AES input ?, Or what actually should be done?
2) Question1, but Hash(160 bits) ouput less than the AES (192 bits) input. 
3) Are there any known functions that can solve the problem? 

Kind regards,
Ngaga

---------------------------------
Want to be your own boss? Learn how on Yahoo! Small Business. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www1.ietf.org/pipermail/cfrg/attachments/20060717/c0fb773e/attachment.html

------------------------------

Message: 3
Date: Mon, 17 Jul 2006 10:00:02 -0700
From: "Hal Finney" 
Subject: Re: [Cfrg] Derivation of an AES key from hash function
(SHA-1, 256, 512)
To: "ngaga Gisse" 
Cc: [email-masked]
Message-ID:

Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Here's what I would suggest.

1. If the hash function output is the same size as the AES key, use it directly.

2. If the hash function output is bigger than the AES key, use a
subset of bits of the hash function, for example the leftmost bits.

3. If the hash function output is smaller than the AES key, get a
bigger hash function. There are several 256-bit hash functions in use
that will be big enough for the largest AES key. Probably the best
known is SHA-256.

Hal Finney

------------------------------

_______________________________________________
Cfrg mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/cfrg

End of Cfrg Digest, Vol 23, Issue 2
***********************************

---------------------------------
Want to be your own boss? Learn how on  Yahoo! Small Business. 

_______________________________________________
Cfrg mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/cfrg

---

From: ngaga Gisse <[email-masked]>
Date: Tue, 18 Jul 2006 10:10:20 -0700 (PDT)

Ngaga

[email-masked] wrote:
  Send Cfrg mailing list submissions to
[email-masked]

To subscribe or unsubscribe via the World Wide Web, visit
https://www1.ietf.org/mailman/listinfo/cfrg
or, via email, send a message with subject or body 'help' to
[email-masked]

You can reach the person managing the list at
[email-masked]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Cfrg digest..."

Today's Topics:

Message: 1

Dear Sir,

Question:

Kind regards,
Ngaga

-------------- next part --------------

Message: 2

Dear Sir,

Question:

Kind regards,
Ngaga

-------------- next part --------------

Message: 3

Hal Finney