Newbie question on encryption keys

Newbie question on encryption keys

Secure Home | Search | About
 General Computer Security    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content add this group's latest topics to your Google content
Subject Author Date
Newbie question on encryption keys rohanm79 07-10-2007
Posted by Mark Shroyer on July 11, 2007, 1:56 am
If you were  Registered and logged in, you could reply and use other advanced thread options
>> No, you shouldn't need to enter a 32-character password (although I
>> can't say for sure because you still haven't specified what software
>> you're talking about :) ). What usually happens is that the 256-bit
>> symmetric key is generated as some hash of whatever password you
>> provide. The longer and more random the password (until you get past
>> 32 random ASCII characters, anyway), the more entropy in your 256-bit
>> AES key and therefore the more theoretically secure it is -- but in
>> practice a dozen or so characters should be all the entropy you need,
>> depending on the quality of your software's hash algorithm and how
>> sensitive your data is.
>
> This is imprecise. 32 characters will by far not be enough for the
> password to have 256 bits of entropy. Remember that users only use a
> subset of all possible characters (and they shouldn't use them all,
> because of localization issues).
>
> In most cases one character of the password will have slightly less than
> seven bits of entropy, because you don't type eight bit characters, and
> you also don't type control characters.

Yes, you're right of course; by "32 random ASCII characters" I
actually meant 32 characters from all possible ASCII values 0-127,
printable or not. Just thought I'd leave out the discussion of
practical specifics in the interest of brevity.

>> There's no de-facto standard algorithm for converting passwords into
>> symmetric encryption keys (as far as I know -- maybe someone here
>> knows better?), [...]
>
> There is: PBKDF2, for example.

Thanks, I hadn't realized there is an IETF standard for this. Even
so, because AES software doesn't inherently use PBKDF2, the original
poster cannot rely on his program to be password-compatible with
whatever arbitrary decryption package his recipient may decide to
use.

>> [...] so different software might interpret the same password as
>> signifying different keys. You probably won't be able to determine
>> the actual AES key that your software used unless you're willing to
>> dig into its source code.
>
> If they both use the same protocol together with the same specification,
> then most likely they will be compatible.

--
Mark Shroyer
http://markshroyer.com/

Posted by Ertugrul Soeylemez on July 11, 2007, 10:22 am
If you were  Registered and logged in, you could reply and use other advanced thread options

> > This is imprecise. 32 characters will by far not be enough for the
> > password to have 256 bits of entropy. Remember that users only use
> > a subset of all possible characters (and they shouldn't use them
> > all, because of localization issues).
> >
> > In most cases one character of the password will have slightly less
> > than seven bits of entropy, because you don't type eight bit
> > characters, and you also don't type control characters.
>
> Yes, you're right of course; by "32 random ASCII characters" I
> actually meant 32 characters from all possible ASCII values 0-127,
> printable or not. Just thought I'd leave out the discussion of
> practical specifics in the interest of brevity.

The set of printable ASCII characters is a less-than-seven bit character
set, as you see directly from the fact that it contains only 95
characters (32..126). You need 39 completely random characters of this
kind to get (slightly more than) 256 bits of entropy.

You cannot include the non-printable subset, because there is no easy
and portable way to type them, especially in GUIs. Though, even
including the non-printables, you will still need 37 random characters
for 256 bits of entropy.


Regards,
Ertugrul S=C3=B6ylemez.


--=20
Security is the one concept, which makes things in your life stay as
they are. Otto is a man, who is afraid of changes in his life; so
naturally he does not employ security.

Posted by Mark Shroyer on July 11, 2007, 11:28 am
If you were  Registered and logged in, you could reply and use other advanced thread options
>
>> > This is imprecise. 32 characters will by far not be enough for the
>> > password to have 256 bits of entropy. Remember that users only use
>> > a subset of all possible characters (and they shouldn't use them
>> > all, because of localization issues).
>> >
>> > In most cases one character of the password will have slightly less
>> > than seven bits of entropy, because you don't type eight bit
>> > characters, and you also don't type control characters.
>>
>> Yes, you're right of course; by "32 random ASCII characters" I
>> actually meant 32 characters from all possible ASCII values 0-127,
>> printable or not. Just thought I'd leave out the discussion of
>> practical specifics in the interest of brevity.
>
> The set of printable ASCII characters is a less-than-seven bit character
> set, as you see directly from the fact that it contains only 95
> characters (32..126). You need 39 completely random characters of this
> kind to get (slightly more than) 256 bits of entropy.
>
> You cannot include the non-printable subset, because there is no easy
> and portable way to type them, especially in GUIs. Though, even
> including the non-printables, you will still need 37 random characters
> for 256 bits of entropy.

And that's what I meant by saying "past 32 random ASCII characters"
instead of "to 32 random ASCII characters". Again, that's all
correct -- it just wasn't relevant in the interest of succinctly
answering the original poster's question.

--
Mark Shroyer
http://markshroyer.com/

Posted by Ertugrul Soeylemez on July 11, 2007, 10:41 pm
If you were  Registered and logged in, you could reply and use other advanced thread options

> And that's what I meant by saying "past 32 random ASCII characters"
> instead of "to 32 random ASCII characters". Again, that's all correct
> -- it just wasn't relevant in the interest of succinctly answering the
> original poster's question.

"Past 38 random ASCII characters" would be correct. With 34 characters,
you don't get 256 bits of entropy, but only slightly more than 223 bits.


Regards,
Ertugrul S=C3=B6ylemez.


--=20
Security is the one concept, which makes things in your life stay as
they are. Otto is a man, who is afraid of changes in his life; so
naturally he does not employ security.

Posted by Ari on July 11, 2007, 2:47 pm
If you were  Registered and logged in, you could reply and use other advanced thread options
On Tue, 10 Jul 2007 09:15:03 +0000 (UTC), Mark Shroyer wrote:

> No, you shouldn't need to enter a 32-character password (although I
> can't say for sure because you still haven't specified what software
> you're talking about :) ). What usually happens is that the 256-bit
> symmetric key is generated as some hash of whatever password you
> provide. The longer and more random the password (until you get
> past 32 random ASCII characters, anyway), the more entropy in your
> 256-bit AES key and therefore the more theoretically secure it is --
> but in practice a dozen or so characters should be all the entropy
> you need, depending on the quality of your software's hash algorithm
> and how sensitive your data is.

Mark, nice job with the answers, noobs often get handed their asses
here.

Is it fair to say that if you used a passphrase such as:

6:Q?-jiF

Then repeated it to make a 16 character passphrase, under attack to
break, that you haven't gained much entropy or protection? My thinking
is that a powerful adversary would have a passphrase breaking program
that would constantly search for replication.

Similar ThreadsPosted
X.509 Digital Certificate Newbie Question April 12, 2005, 3:55 am
Question from a newbie -- protecting files July 20, 2005, 3:01 pm
A basic/newbie question on https. January 30, 2008, 8:55 pm
hiding encryption keys August 12, 2005, 3:32 pm
typical approach for encryption using keys? June 27, 2007, 6:20 am
RSA encryption - practical question March 14, 2006, 12:11 pm
Tunneling newbie? February 21, 2005, 8:52 pm
Newbie... need basics August 10, 2006, 8:01 pm
Spoofing fingerprint scanners - NEWBIE() May 1, 2006, 1:57 pm
Newbie: (unwanted) incoming traffice on static DSL line November 20, 2005, 8:17 pm

The site map in XML format XML site map

Contact Us | Privacy Policy