Re: Secure permutation of a 1e8 element set



"Joseph Ashwood" <ashwood@xxxxxxx> writes:

"Maaartin" <grajcar1@xxxxxxxxx> wrote in message
news:175f3983-1471-4a97-aa3e-47a4eefdb739@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I need to encrypt customer numbers so, that the result is also a valid
customer numbers. The reason is simple, I need to store them back in
the database and do all the operations as it were the original plain
data. I need it in order to get rid of all the sensitive data while
still being able to work as before and also to find out the original
(I already replaced names and addresses etc. by some Gibberish, this
was easy).

Let's say, allowed are all numbers from the set 0..99999999. I can't
use any strong cipher, as imho they all deal with huge sets. I can't
use some home cooked bit twiddling as the cardinality of the set is
1e8 which is no power of two. I could generate a permutation of the
set using a deterministic secure random generator, but it takes a lot
of memory (and there are also numbers consisting of more digits).

You simply will not find a secure permutiation, as you noted any permutation
could be simply stored in memory making it inherently weak. Based on that I
would choose RSA, it won't be secure, but limiting the range arbitrarily is
easier. Don't worry about secure formatting, whatever you do won't be secure
anyway, just use the original RSA algorithm.
Joe

Except that there is no modulus N for RSA which will take 0-9999999
into 0-9999999 . 10^8 is a horribly composite number whith the only
prime factors being 2 and 5, and both are multiple factors.
Of course if there are numbers consisting of more digits, then all bets are
off. What is it you want to do? Do you reallywant to use 10 different
encryptions, one for each number limit?

I think you have to decide on one maximum. If it does not reallymatter then
choose some RSA number and use his suggestion. You could always cook up a
Feistel cypher based on digits, not bits (use base 10 modulus addition as
the combiner).

.



Relevant Pages

  • Re: Symmetric encryption algorithm with group like properties
    ... >> Solutions that exist today are not as secure as they can be. ... I wouldn't expect more than PGP / GPG type encryption, ... > versions - with the key, protected by RSA encryption under a RSA public key ... > Alice needs a secure decryption mechanism to read her emails, ...
    (sci.crypt)
  • Re: Feasibility of constructing backdoors in non-open-source RSA software
    ... RSA public key cryptography relies on the general computational ... implanted with backdoors by Mafia & Co. that render the factorization ... addition that k of its leading digits to ... Some people keep prattling on that crypto does ...
    (comp.security.misc)
  • Feasibility of constructing backdoors in non-open-source RSA software
    ... RSA public key cryptography relies on the general computational ... implanted with backdoors by Mafia & Co. that render the factorization ... The software contains a predetermined list of public keys and their ... addition that k of its leading digits to ...
    (comp.security.misc)
  • Re: How Secure is RSA-SHA1 ?
    ... RSA and SHA1 are the building blocks that could be used ... for building very secure as well as absolutely unsecure protocols. ... if authentication protocol was developed by your ...
    (microsoft.public.dotnet.security)
  • Re: Is encrypting twice much more secure?
    ... secure practical cipher today is the Blum Blum Shub generator. ... when you consider we haven't be able to prove this result for RSA. ... Public key cryptography has been invented to overcome some ... we introduce a new trapdoor one-way ...
    (sci.crypt)