Security and Cryptography
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationSecurity and Cryptography

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 9th, 2008, 09:52 AM
IamPatrick IamPatrick is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2007
Posts: 172 IamPatrick Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 3 Days 1 h 55 m 51 sec
Reputation Power: 0
HMAC valid key lengths

Hi,

I looking to approve keys for use with an HMAC. Am I right in saying that there is no such thing as an invalid key length for an HMAC but being shorter than the hash algorithm's block length would lower the security while being longer wouldn't add any?

Thanks in advance,
Patrick

Reply With Quote
  #2  
Old April 10th, 2008, 06:30 AM
IamPatrick IamPatrick is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2007
Posts: 172 IamPatrick Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 3 Days 1 h 55 m 51 sec
Reputation Power: 0
If anyone is interested the above statement is correct according to section 3.1 of http://w3.antd.nist.gov/iip_pubs/draft-ietf-ipsec-ciph-sha-256-01.txt : "A key length of 256-bits was chosen based on the recommendations in [HMAC] (i.e. key lengths less than the authenticator length decrease security strength and keys longer than the authenticator length do not significantly increase security strength)."

Reply With Quote
  #3  
Old April 10th, 2008, 10:38 AM
fishtoprecords's Avatar
fishtoprecords fishtoprecords is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Sep 2007
Location: outside Washington DC
Posts: 1,117 fishtoprecords User rank is Colonel (50000 - 60000 Reputation Level)fishtoprecords User rank is Colonel (50000 - 60000 Reputation Level)fishtoprecords User rank is Colonel (50000 - 60000 Reputation Level)fishtoprecords User rank is Colonel (50000 - 60000 Reputation Level)fishtoprecords User rank is Colonel (50000 - 60000 Reputation Level)fishtoprecords User rank is Colonel (50000 - 60000 Reputation Level)fishtoprecords User rank is Colonel (50000 - 60000 Reputation Level)fishtoprecords User rank is Colonel (50000 - 60000 Reputation Level)fishtoprecords User rank is Colonel (50000 - 60000 Reputation Level)fishtoprecords User rank is Colonel (50000 - 60000 Reputation Level)fishtoprecords User rank is Colonel (50000 - 60000 Reputation Level)fishtoprecords User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 20 h 5 m 3 sec
Reputation Power: 574
Your cite is from SHA256. Other hashes have shorter results.

While it is weaker to throw away bits from the result of the hash, it is acceptable in some cases. It really depends upon the threat model that you are protecting against.

If you need the strength of SHA256, its pretty silly to throw away half of its output, just use SHA1

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationSecurity and Cryptography > HMAC valid key lengths


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway