Re: [SQL] How to index encrypted colums ?

Поиск
Список
Период
Сортировка
От Klaus Kaisersberger
Тема Re: [SQL] How to index encrypted colums ?
Дата
Msg-id VI1PR0901MB12958EF603D04CE28B44538AE34C0@VI1PR0901MB1295.eurprd09.prod.outlook.com
обсуждение исходный текст
Ответ на Re: [SQL] How to index encrypted colums ?  (ROS Didier <didier.ros@edf.fr>)
Ответы Re: [SQL] How to index encrypted colums ?  (Steve Midgley <science@misuse.org>)
Список pgsql-sql
What I meant was, that indexing an encrypted column with a plain, unencrypted index renders the whole effort of
encryptionvoid.
 
Do _not_ do that! Otherwise, there would be no sense whatsoever in encrypting the column first.

Just for completeness, though: pgp_pub_decrypt() accepts binary, which you can specify in one of many ways, e.g.
* https://www.postgresql.org/docs/9.0/static/datatype-binary.html
* dearmor(<ASCII-armored private key>)

But once again: Do _not_ do this! It would completely negate your attempts at providing the security obviously mandated
byyour client!
 
-Klaus

-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of ROS Didier
Sent: Tuesday, October 17, 2017 9:49 AM
To: pgsql-sql-owner@postgresql.org; pgsql-sql@postgresql.org
Subject: Re: [SQL] How to index encrypted colums ?

Hi Klaus
We need encryption because we need to protect sensitive data. I need to create an index on encrypted columns and I
don'tknow how to insert private key.
 
Example:
CREATE INDEX cartedecredit_cc_idx ON cartedecredit(pgp_pub_decrypt(cc, '--------'));

Best Regards
Didier ROS 
DSP/CSP IT-DMA/Solutions Groupe EDF/Expertise Applicative
Expertise SGBD
32 Avenue Pablo Picasso
92000 NANTERRE 
Bureau : E2 565D (aile Nord-Est)
Tél. : 01.78.66.61.14

-----Message d'origine-----
De : pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] 
Envoyé : lundi 16 octobre 2017 17:47
À : pgsql-sql-owner@postgresql.org; pgsql-sql@postgresql.org
Objet : Re: [SQL] How to index encrypted colums ?

What is the point of encrypting a column in the first place, if you then want to store the index data unencrypted?
-Klaus

From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of ROS Didier
Sent: Monday, October 16, 2017 3:38 PM
To: pgsql-sql-owner@postgresql.org; pgsql-sql@postgresql.org
Subject: [SQL] How to index encrypted colums ?

Hi
               I would to create an index on an encrypted column :

CREATE INDEX cartedecredit_cc_idx ON cartedecredit(pgp_pub_decrypt(cc, '--------'));

How can I do to indicate the private key '--------'  in the sql query ?

Thanks in advance

Best Regards

Didier ROS
DSP/CSP IT-DMA/Solutions Groupe EDF/Expertise Applicative Expertise SGBD
32 Avenue Pablo Picasso
92000 NANTERRE
Bureau : E2 565D (aile Nord-Est)
Tél. : 01.78.66.61.14
Tél. mobile : 06.49.51.11.88

Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires
etles informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa
destination,toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
 
Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le
divulguerou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre
système,ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous
remercionségalement d'en avertir immédiatement l'expéditeur par retour du message.
 
Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont
sécuriséesou dénuées de toute erreur ou virus.
 
____________________________________________________
This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in
thisMessage is confidential. Any use of information contained in this Message not in accord with its purpose, any
disseminationor disclosure, either whole or partial, is prohibited except formal approval.
 
If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this
messagein error, please delete it and all copies from your system and notify the sender immediately by return message.
 
E-mail communication cannot be guaranteed to be timely secure, error or virus-free.

--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires
etles informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa
destination,toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
 

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le
divulguerou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre
système,ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous
remercionségalement d'en avertir immédiatement l'expéditeur par retour du message.
 

Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont
sécuriséesou dénuées de toute erreur ou virus.
 
____________________________________________________

This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in
thisMessage is confidential. Any use of information contained in this Message not in accord with its purpose, any
disseminationor disclosure, either whole or partial, is prohibited except formal approval.
 

If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this
messagein error, please delete it and all copies from your system and notify the sender immediately by return message.
 

E-mail communication cannot be guaranteed to be timely secure, error or virus-free.

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

В списке pgsql-sql по дате отправления:

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: [SQL] How to index encrypted colums ?
Следующее
От: Steve Midgley
Дата:
Сообщение: Re: [SQL] How to index encrypted colums ?