Can somebody point me in the right direction?



I am very new to encryption and I was tasked to solve a seemingly common
problem. I don't mind doing the research but I need at least some kind of
direction in the beginning.

My problem is very similar to validating serial keys on software packages.
Here is what I need to accomplish:

1. I need to create a black box that is capable of generating a large number
(let's say 1 million) of fix 10 character length pseudo-random strings
2. I need a second black box that is capable validating those strings that
they were generated by black box one. I think this is pretty standard affair
so far although I have no idea how this is accomplished.
3. Here is the twist: When validating a string I need more than just a
passed/failed result. I need to be able to dig out a value between one and
ten from the ten character string. So box number two would either say no,
this was not generated by box number one or it would spit out a number that
was embedded by box number one.
4. Obviously there should be no way of figuring out what number is embedded
in the string or if it is valid or not without using box number two. A
single person would have only access to a small set of the strings so I
don't think this will be difficult to accomplish.
5. There should be little probability of entering a random character string
that would yield a passing result.

For what little I know about encryption I came up with this scheme that is
most likely totally flawed:

Let' say I needed one hundred thousand strings for each digit between zero
and nine so I would end up with one million ten character strings at the
end.

I figured I would pick a random range of sequential numbers for each one
hundred thousand lot so let's say 0 would have a range of
2,005,000-2,105,000 and 1 would have 46,234,125,000-46,234,225,000 etc.

Once I have a range of numbers then I would encrypt them with some kind of
publicly available encryption algorithm using a fixed password. I can use
leading zeros to try to help the encryption to come up with fixed length
results. Is it possible to produce fixed length results or I would have to
discard some of the resulting string? I don't know. If I do have to discard
some results, I could extend the original range from 100,000 to 200,000 or
more but I still would know what the last number in the range was when I
have my 100,000 ten character strings.

At the second black box I would simply decrypt a string with the same
password and see if the result falls into any of the ten ranges that I
originally set up. If the resulting number falls into one of the ranges then
I would know which digit it was used for.

I am a web designer not a mathematician. I am certain that this problem has
been solved a long time ago and published somewhere. I would really
appreciate if somebody could point me in the right direction of how to
approach this problem if my thinking is flawed.

Thank you,
Yosh
.



Relevant Pages

  • Problem with TEA implementation - help needed
    ... standard libraries for encryption. ... // # both take two parameters, a value and a key as strings, ... // # decrypt by 32 loops. ... private static function stringToHex:String { ...
    (sci.crypt)
  • Re: Help Encrypting Connection String
    ... configuration file. ... encrypt and decrypt arbitrary strings, so that will certainly work for what ... connection strings defined in the configuration if you want. ... >> The biggest decision for you here is how you want to store the encryption ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Can somebody point me in the right direction?
    ... of fix 10 character length pseudo-random strings ... For what little I know about encryption I came up with this scheme that is ... and nine so I would end up with one million ten character strings at the ... Put these in a database. ...
    (sci.crypt)
  • Urgent: Trouble with CAPICOM and Triple DES Encryption/Decryption
    ... I am using CAPICOM to encrypt/decrypt strings, but not sure why I am ... Here is the sample VB Code which does the Encryption and Decryption. ... Now, I don't understand, in all the three cases, my Password/Key is ...
    (microsoft.public.platformsdk.security)
  • Re: Can somebody point me in the right direction?
    ... ten from the ten character string. ... There should be little probability of entering a random character string ... If you use encryption you have a potential problem at the second black ...
    (sci.crypt)