Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^5: Creating a rainbow table for a ten-digit number: Advice?

by ikegami (Pope)
on Apr 11, 2010 at 19:04 UTC ( #834127=note: print w/replies, xml ) Need Help??

in reply to Re^4: Creating a rainbow table for a ten-digit number: Advice?
in thread Creating a rainbow table for a ten-digit number: Advice?

What I am trying to prevent is to have a collection of "important" numbers in plaintext on a laptop

Noone suggested that. We said specifically said to put that information in the secret database, the one "that's under lock and key (of course)".

You're ok with haveing a secret table that maps public ids to real ids. You were thinking of implementing that table as a rainbow table. All we're suggesting is that you implement that table in a much more straightforward manner:

work db secret db (laptop) (under lock and key) +-----------+--- +-----------+---------+ | public id | ... | public id | real id | +-----------+--- +-----------+---------+

The public id would simply be a unique random number. (Safer than a hash, and avoids the problem of collisions.)

Now, this assumes the database is created before being placed on the laptop, but that's consistent with everything you've told us so far. You can still use the above method if you collect the numbers in the field, but only if the field has access to the a remote service that provides the following function:

$public_id = get_new_public_for($real_id);

Replies are listed 'Best First'.
Re^6: Creating a rainbow table for a ten-digit number: Advice?
by willyyam (Priest) on Apr 11, 2010 at 20:31 UTC

    This is a good solution, save that I am not in constant contact with the people collecting the data, nor their laptops. So, to do this I would require some means of pre-arranging the relationship between "public" and "real" ids.

      I think you may be misuderstanding the Public Key advice.

      1. Back at base, you generate a public/private key pair. (Using say; Crypt::RSA.
      2. You give the public key to the laptop users.
      3. Within the script on the laptop, you use that public key to encrypt the numbers and you store the encrypted data in their DBs.

        You discard the numbers immediately.

      4. When they return to base, you can use the private key to decrypt those databases.

      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

        I think you may be misuderstanding the Public Key advice.

        I wish I could claim credit for the PKE idea (illustrated below), but he understood what I meant correctly. The advice I gave was based on the fact that the OP only said that the laptops used the data. Since I wrote that post, he has changed the requirements such that the laptops now collect the data.

        work db secret db (laptop) (under lock and key) +------------+ +-------------+ | public key | | private key | +------------+ +-------------+ +-----------+--- | public id | ... +-----------+--- | public id | ... +-----------+--- | . | . | .

        The public id would be the real id encrypted using the public key.

        The Public Key idea is excellent, and is part of the solution. Unfortunately, I cannot use a public key as part of the data entry toolset - because I am restrained by using MS Access for data entry. If I was able to do the data entry system in Perl, your suggestion (and the module that would likely get most of the heavy lifting done) would be a godsend.

        I fear I have asked a question without a complete enough spec, and so have become mired in clarifications, rather than looking at solutions. I should learn my lesson, but apparently, I have not yet done so.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://834127]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2021-01-27 05:03 GMT
Find Nodes?
    Voting Booth?