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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old April 5th, 2008, 11:41 PM
spiderpig spiderpig is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2007
Posts: 5 spiderpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 1 m 59 sec
Reputation Power: 0
Crypto Algorithm Question - Quick question about AES

Hello,
When people talk about the key length of AES (128, 192, 256, etc.), is this the same as the length of the shared secret? If this is true, I am confused as to how you can have 128-bit (or more) strength AES encryption if you use a shared secret of only eight characters, like "password"?

Any info is appreciated!

Reply With Quote
  #2  
Old April 6th, 2008, 09:32 AM
fishtoprecords's Avatar
fishtoprecords fishtoprecords is offline
Contributing User
Click here for more information.
 
Join Date: Sep 2007
Location: outside Washington DC
Posts: 964 fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 23 h 26 m 10 sec
Reputation Power: 418
its considered bad form to use short ascii as the key. In most langauges, ascii words don't use the high order bit and have fairly restricted range.

The normal model is to take the passphrase and process it through SHA or other cryptographic hash to get the key.
Usually these have a salt phrase, google HMAC

Reply With Quote
  #3  
Old April 7th, 2008, 07:12 PM
B-Con's Avatar
B-Con B-Con is offline
Crypto-Con
Dev Shed God 4th Plane (6500 - 6999 posts)
 
Join Date: Apr 2004
Location: UC Davis
Posts: 6,647 B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 5 Days 17 h 55 m 33 sec
Reputation Power: 852
Since AES can only deal with a key of a certain size, a user password will be expanded to a better password in a way fish mentioned, or, worst case, simply padded to an appropriate length.
__________________
- "Cryptographically secure linear feedback shift register based stream ciphers" -- a phrase that'll get any party started.
- Why know the ordinary when you can understand the extraordinary?


- Sponsor my caffeine addiction! (36.70 USD recieved so far -- Latest donor: Mark Foxvog
)

Reply With Quote
  #4  
Old April 7th, 2008, 07:29 PM
fishtoprecords's Avatar
fishtoprecords fishtoprecords is offline
Contributing User
Click here for more information.
 
Join Date: Sep 2007
Location: outside Washington DC
Posts: 964 fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)fishtoprecords User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 23 h 26 m 10 sec
Reputation Power: 418
Quote:
Originally Posted by B-Con
worst case, simply padded to an appropriate length.


I don't think AES has any known "bad keys" that are really weak, but I would expect that any constant padding is a bad idea.

its not hard to use a HMAC, and it sure feels a lot safer.

Reply With Quote
  #5  
Old April 8th, 2008, 11:54 AM
B-Con's Avatar
B-Con B-Con is offline
Crypto-Con
Dev Shed God 4th Plane (6500 - 6999 posts)
 
Join Date: Apr 2004
Location: UC Davis
Posts: 6,647 B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level)B-Con User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 5 Days 17 h 55 m 33 sec
Reputation Power: 852
Quote:
Originally Posted by fishtoprecords
I don't think AES has any known "bad keys" that are really weak, but I would expect that any constant padding is a bad idea.

its not hard to use a HMAC, and it sure feels a lot safer.
I wasn't thinking of weak keys (of which AES has none), but rather the fact that using the user's ASCII key directly (the only way to do so would be to pad) is kind of ugly. Like you say, HMAC is so easy to use its hard to justify not using it.

Reply With Quote
  #6  
Old April 9th, 2008, 05:11 AM
IamPatrick IamPatrick is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2007
Posts: 145 IamPatrick Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 2 Days 5 h 4 m 44 sec
Reputation Power: 0
Also worth considering that while encrypting with a 128 bit key gives 128 bit strength and can therefore be considered uncrackable with current technology your average attacker won't try to crack it directly but will try to guess your passphrase instead. If you chose "password" as your passphrase it won't take him very long and will waste all the effort of the clever people who designed AES.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationSecurity and Cryptography > Crypto Algorithm Question - Quick question about AES


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 5 hosted by Hostway