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: 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: Security in instant messaging
    ... > authentication and AES 256 for encryption is secure? ... the algorithms are implemented PROPERLY ... the protocol is secure itself (a protocol can be unsecure EVEN if it ... the validity of the RSA key is verified *personally* or through a ...
    (sci.crypt)
  • Re: Secure permutation of a 1e8 element set
    ... RSA would be fine, but very slow, wouldn't it? ... Additionaly I could permute the digits. ... you map to within the nearest higher power of two using bit twiddling, ... A arbitary permutation of 1e8 numbers is equivelent to a key size ...
    (sci.crypt)
  • Re: Python from Wise Guys Viewpoint
    ... > Consider RSA. ... It is secure only if factoring is hard. ... If your notion of a secure crypto systems is one that is NP hard. ...
    (comp.lang.lisp)

Loading