Re: Newbie - Are You Sure That's the Correct Pass Phrase?



Civitas Fenniae wrote:
On 5-Jul-2006, Larry Lindstrom <nobody@xxxxxxxxxxx> wrote:
Civitas Fenniae wrote:
On 5-Jul-2006, Larry Lindstrom <nobody@xxxxxxxxxxx> wrote:

Yes. If the user name and password match I ask for the pass
phrase. The pass phrase is run through PKCS # 5 algo 2. This
produces the crypto key for certain columns in database accesses.

Sorry, my mistake, I thought passphrase was used when the user signs in. So
you have a (different) password for that purpose. So the passphrase is not
needed before the user uses the application.

Thanks again Civitas, and all who are trying to help me:

I'm still very inexperienced in this crypto stuff. You folks
have been there. I'll defend my plan so you to have a stationary
target to shoot at in order to expose its weaknesses. I'll be
glad to change my approach.

User name and matching password gains access to the program.
The user can change their password when ever they want, and their
user name can be removed.

The pass phrase encrypts the information, so someone who gains
access to the database, and uses a command line SQL tool to query
the data, will see the sensitive fields in the table in cyphertext.

I'm using the LibTomCrypt crypto library.

I'm reading "Practical Cryptography" by Ferguson and Schneier.
Skipping ahead to the "Storing Secrets" chapter, it is apparent
that having a field for the hash of the pass phrase used to
encrypt the private fields is a bad idea.
So you use the same passphrase to encrypt the data?
Yes. The pass phrase is used to generate the key.

Sorry, my mistake, the passphrase is not the password used to enter the
system.

That is correct. Passwords can be changed on a dime,
propagating a new pass phrase through the database will
be more ponderous.

Hmmm, I'm not quite sure what you mean ... Is the hash of the passphrase
(more or less) directly the encryption key?
Yes, more or less. PKCS # 5 algo 2 uses the pass phrase, a
salt, and a hash to generate the encryption key. At least that's
my plan.

That certainly doesn't sound
like a good idea.

Well, on the other hand, maybe it is ... I wouldn't know ...

Ok, maybe that's not my plan. :)

But how else would you get the data which has been
encrypted using a lost passphrase? You don't store the passphrases, do
you, just their hashes?
I'm not trying to tell someone the pass phrase if they loose
it. I would like to give them a hint if they have a typeo when
they enter it and add a bunch of records to the database that
they will never be able to decrypt again.

Do you store the passphrases 'in the clear'?

No, the only place the pass phrase is stored is in the
head of the users. The business may have a policy that all
records are to be encrypted with the same pass phrase, which
will allow all data to be shared. Some may let users have
their own pass phrase.

How about using the pass phrase to decrypt and display the
first and last names of the last 10 records the user entered?
If they see garbage in those names, it will suggest that
perhaps they mis-typed the pass phrase. This isn't perfect,
perhaps they intend to use a different pass phrase for this
particular entry.

It's a database app used by clubs and similar businesses.
The database will have members personal information, names,
addresses and phone numbers. It may be run on laptops. I
just want to offer a reasonable level of protection if a
laptop is stolen. There are, of course, many other threats
which I'm sure people who post in this newsgroup know better
than I.

I expect people to pick one pass phrase and stick to it.

Am I misunderstanding Ferguson and Schneier? They talk of
someone storing the checksum of the password, "which defeated
the entire salting and stretching procedure." Is it secure to
keep a hash of the pass phrase with the data?
I think a cryptographic hash of the passphrase is secure in general (for
access control). But the big question seems to be "how do you generate
the decryption key?".
I'm not currently planning on saving a hash of the pass
phrase. That seems to be one method to see if I'm going to
determine if the pass phrase has been used before. But is
it safe to store these hashes? Is this giving information
that could be used in an attack?

I don't see the safety problem of storing the cryptographic-quality hashes.
They are produced by a one-way function which is supposed to be practically
impossible to invert. Easy to make the hash from the passphrase, next to
impossible to tell which passphrase (which are not stored in the database)
produces a particular hash. If the passphrases are long enough, I wouldn't
be too worried about the safety of the hashes ... unless the decryption key
is easy to find given the hash ...

Ok, I think I'll keep a hash of the hash of the pass phrase
each encrypted record. And the first hash will probably be
PKCS # 5 algo 2.

I hope somebody more knowledgeable will be able to answer to your concerns.

You are helping a lot. I appreciate your input.

Thanks
Larry
.



Relevant Pages

  • Re: SQL query
    ... but it also can be a search phrase with several words at the same time. ... I have a database with "documents", ... I already have stored in the database all the Spanish words with their ... But I got stuck trying to build a recordset with the list of Document_ID's ...
    (microsoft.public.vb.general.discussion)
  • Re: Newbie - Are You Sure Thats the Correct Pass Phrase?
    ... The pass phrase is run through PKCS # 5 algo 2. ... produces the crypto key for certain columns in database accesses. ... Sorry, my mistake, I thought passphrase was used when the user signs in. ... and a hash to generate the encryption key. ...
    (sci.crypt)
  • Re: The crazy encryption madmans codebook
    ... encoded to any word in the database. ... Why would it not be possible, the offset number is just an integer ... where each entry have an index, realworld word or phrase and a madman ... would call *offset keys* an offset key is used to encode *one and just ...
    (sci.crypt)
  • Security issue of cross server job on UNIX and the solution
    ... and database using account ... The application generates data that will send to server delta, ... for public key authentication, or else, you have to choose public key ... authentication with no pass phrase protection for the private key. ...
    (alt.computer.security)
  • Re: The crazy encryption madmans codebook
    ... Suppose database ranging 0-5 000 000 indexed word and phrases ... where each entry have an index, realworld word or phrase and a madman ... letters" when used off course you could use a hash algorithm that put ... discarding almost all of those resulting in an approximate entropy of 20-25 ...
    (sci.crypt)