PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.databases.mysql > md5 has as primary id
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
md5 has as primary id

Réponse
 
LinkBack Outils de la discussion
Vieux 06/02/2008, 11h00   #1
Casper F.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut md5 has as primary id

Hello,

I have a table filled with sensitive data. I wanted to avoid the
conicidental retrieval or results through "guessing" an id. I
therefore thought of using a md5-hash as the primary id. What
implications will I have as the database fills? Will it be
significantly slower than using a simple integer id, or will there not
be that much of a difference, since it is unique and indexed?

Thanks for your reply
Casper
  Réponse avec citation
Vieux 06/02/2008, 11h17   #2
Captain Paralytic
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: md5 has as primary id

On 6 Feb, 10:00, "Casper F." <casper.feldm...@googlemail.com> wrote:
> Hello,
>
> I have a table filled with sensitive data. I wanted to avoid the
> conicidental retrieval or results through "guessing" an id. I
> therefore thought of using a md5-hash as the primary id. What
> implications will I have as the database fills? Will it be
> significantly slower than using a simple integer id, or will there not
> be that much of a difference, since it is unique and indexed?
>
> Thanks for your reply
> Casper


It will be lower. How significant this is depends on many factors.
  Réponse avec citation
Vieux 06/02/2008, 11h27   #3
Casper F.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: md5 has as primary id

On Feb 6, 11:17 am, Captain Paralytic <paul_laut...@yahoo.com> wrote:
>
> It will be lower. How significant this is depends on many factors.
>


Woudl this be the way of common practice? Is there a better way?
  Réponse avec citation
Vieux 06/02/2008, 12h56   #4
Pavel Lepin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: md5 has as primary id


Casper F. <casper.feldmann@googlemail.com> wrote in
<a4751755-8b65-468e-963f-512ab04c09bd@i72g2000hsd.googlegroups.com>:
> I have a table filled with sensitive data. I wanted to
> avoid the conicidental retrieval or results through
> "guessing" an id.


<http://en.wikipedia.org/wiki/Security_through_obscurity>

Leaving aside cryptographic weaknesses of MD5, which I'm not
qualified enough to discuss, if you want to prevent
unauthorised access, check whether the actor requesting the
data has the right to do so.

Burdening the unique ID with the additional semantics of
access authorisation seems fundamentally wrong to me. There
might be very legitimate reasons of communicating a unique
ID of something to a third-party without simultaneously
transferring your access rights to that same party.

> I therefore thought of using a md5-hash as the primary id.
> What implications will I have as the database fills?


First of all, you cannot guarantee that there won't be
collisions, although this is very, extremely,
near-impossibly highly unlikely. Still, 'unlikely' is not a
guarantee. And if you just happen to have two records that
have the same data in the fields you would use for hashing,
guess how loud the resulting KA-BOOM! is going to be.

Secondly, an ID obtained without guessing will allow
unauthorised access unless you implement a real security
model.

If you want your system to be secure, design it that way.

Note that if your data really is sensitive, governmental
regulations may apply, and your proposed security model
probably won't fly by any even semi-competent security
auditor.

--
When all you have is a transformation engine, everything
looks like a tree.
  Réponse avec citation
Vieux 07/02/2008, 16h05   #5
Peter H. Coffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: md5 has as primary id

On Wed, 6 Feb 2008 02:00:32 -0800 (PST), Casper F. wrote:
> Hello,
>
> I have a table filled with sensitive data. I wanted to avoid the
> conicidental retrieval or results through "guessing" an id. I
> therefore thought of using a md5-hash as the primary id. What
> implications will I have as the database fills? Will it be
> significantly slower than using a simple integer id, or will there not
> be that much of a difference, since it is unique and indexed?


You'll lose the time you spend calculating those MD5 for every record.

More generally, obscurity is a suboptimal replacement for security. If
your machine is generally otherwise secure, remove select access from
everyone except the role user ID that your front-end application uses,
and have the application manage selecting records based on whatever
rules you've got coded in. If an unauthorized person knows the ID of a
record, they still won't be able to get it, because they won't be able
to convince the application to fetch it for them, won't have access to
the table through another DB user ID, and won't be able to read the file
because they don't have access to the database's files on the host.

--
Every normal man must be tempted at times to spit upon his hands, hoist
the black flag, and begin slitting throats.
-- HL Mencken
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h06.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11157 seconds with 13 queries