Fast Search on Encrypted Feild

From: "Naoko Reeves" <naoko(at)lawlogix(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Fast Search on Encrypted Feild
Date: 2009-11-14 21:27:37
Message-ID: 076DC33A3D38CE4BBC64D35DDD9DE70C09886B19@mse4be2.mse4.exchange.ms
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a encrypted column use encrypt function.

Querying against this column is almost not acceptable - returning 12
rows took 25,908 ms.

The query was simply Select decrypt(phn_phone_enc) FROM phn WHERE
decrypt(phn_phone_enc,'xxx','xxx') LIKE '123%'

So I built index like: CREATE INDEX idx_phn_phone_dec ON phn
(decrypt(phn_phone_enc, 'xxx', 'xxx'))

This returns 12 rows in 68 ms.

Would this be the solution for the fast encrypted field search or does
this raise the security issue?

Kindest regards,

Naoko Reeves

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2009-11-14 21:39:54 Re: Fast Search on Encrypted Feild
Previous Message Merlin Moncure 2009-11-14 21:04:53 Re: all empty tables