1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Rep Power

    Postgres for password encryption?

    Hey, I'm trying to set up an incredibly simple database for usernames and passwords, but I am concerned about encryption, security, etc. I've never done anything along the lines of encryption or username/pw handling so how might I go about this? Is there a way to have Postgres automatically encrypt/decrypt a particular field? I'm thinking something so simple as

    CREATE TABLE Login (
    username varchar(20) PRIMARY KEY,
    password varchar(20);

    If you can point me in the right direction or maybe a website or something that deals with this i'd appreciate it.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Rep Power
    probably the simplest but still somewhat difficult to crack would be to use a prime number factor on each element in the string. So, add 47 to every ASCII character in the string... or make a scheme like this where it will store the checksum for each password entry in a different table. Sorry I don't have any links but there will probably be other people that post on this
  4. #3
  5. Me likey breadsticks...
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2003
    Los Angeles
    Rep Power
    Try checking the contrib dir of your postgres source for pg_crypto for your postgres encryption needs.

    As an aside, is there a site/guide for all the contrib modules shipped with postgres?
    PostgreSQL, it's what's for dinner...

IMN logo majestic logo threadwatch logo seochat tools logo