MD5()

2007-03-10 Thread Neil Tompkins
I'm looking to use MD5() to encrypt credit card numbers.  How do I unencrypt 
this when reading the value ?


Thanks,
Neil

_
Get Hotmail, News, Sport and Entertainment from MSN on your mobile.  
http://www.msn.txt4content.com/



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Int(4) or int(8)

2007-03-10 Thread Yves Goergen
On 09.03.2007 17:12 CE(S)T, Bruno Rodrigues Silva wrote:
 I understand that theses values are unrelated to the range of
 datatype values, however i did not saw any diference when i use
 int(4) or int(8)
 
 Some idea?

Isn't it a bit useless to specify the visual, decimal length of a
numeric data type that's internally stored in bits? I never specify a
length of a number, but use SMALLINT, INT etc instead. If my INT field
holds a value that takes 6 digits in decimal, what should be the output
if the column was declared INT(3)? Is it allowed to drop some data?

(Resending because the list wasn't added to the recipients.)

-- 
Yves Goergen LonelyPixel [EMAIL PROTECTED]
Visit my web laboratory at http://beta.unclassified.de


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MD5()

2007-03-10 Thread Ian P. Christian

Neil Tompkins wrote:
I'm looking to use MD5() to encrypt credit card numbers.  How do I 
unencrypt this when reading the value ?




you can't.
Google for MD5, or better still look at wikipedia, I'm sure they will 
have something


--
Ian P. Christian ~ http://pookey.co.uk

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MD5()

2007-03-10 Thread Neil Tompkins

What do you recommend I use ?




From: Ian P. Christian [EMAIL PROTECTED]
To: Neil Tompkins [EMAIL PROTECTED]
CC: mysql@lists.mysql.com
Subject: Re: MD5()
Date: Sat, 10 Mar 2007 10:18:41 +

Neil Tompkins wrote:
I'm looking to use MD5() to encrypt credit card numbers.  How do I 
unencrypt this when reading the value ?




you can't.
Google for MD5, or better still look at wikipedia, I'm sure they will have 
something


--
Ian P. Christian ~ http://pookey.co.uk


_
MSN Hotmail is evolving - check out the new Windows Live Mail.  
http://ideas.live.co.uk/



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MD5()

2007-03-10 Thread Ian P. Christian

Neil Tompkins wrote:

What do you recommend I use ?


http://dev.mysql.com/doc/refman/5.0/en/encryption-functions.html

That should help you.

However... keep in mind that if your application is likely to be 
accessing this data all the time anyway, if someone compromises your 
database, chances are they will compromise your code, leaving to them 
being able to get your key, and then decrypt all your data anyway.


I'm not saying encrypting it in the database is pointless, it's just far 
from enough to say your data is secure.


A quick google on the subject returned this:

http://forums.mysql.com/read.php?30,14020,14020

which honestly, I've not read - but you might want to :)


--
Ian P. Christian ~ http://pookey.co.uk

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MD5()

2007-03-10 Thread Neil Tompkins
The problem I have is our mysql database version is 3.23 and we are not in a 
position to upgrade.





From: Ian P. Christian [EMAIL PROTECTED]
To: Neil Tompkins [EMAIL PROTECTED]
CC: mysql@lists.mysql.com
Subject: Re: MD5()
Date: Sat, 10 Mar 2007 10:24:45 +

Neil Tompkins wrote:

What do you recommend I use ?


http://dev.mysql.com/doc/refman/5.0/en/encryption-functions.html

That should help you.

However... keep in mind that if your application is likely to be accessing 
this data all the time anyway, if someone compromises your database, 
chances are they will compromise your code, leaving to them being able to 
get your key, and then decrypt all your data anyway.


I'm not saying encrypting it in the database is pointless, it's just far 
from enough to say your data is secure.


A quick google on the subject returned this:

http://forums.mysql.com/read.php?30,14020,14020

which honestly, I've not read - but you might want to :)


--
Ian P. Christian ~ http://pookey.co.uk


_
Txt a lot? Get Messenger FREE on your mobile. 
https://livemessenger.mobile.uk.msn.com/



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MD5()

2007-03-10 Thread Ian P. Christian

Neil Tompkins wrote:
The problem I have is our mysql database version is 3.23 and we are not 
in a position to upgrade.


Because you are unlikely to be selecting on this data directly, you 
could use functions of whatever language you're using to connect to the 
database... for example if you're using PHP...


http://uk2.php.net/manual/en/ref.mcrypt.php

I hope to god though your reason for not upgrading is because this is a 
shared host you're planning on storing credit card details on. Make 
sure you give the users a chance to opt out of you keeping that kind of 
data, and remember to never store the CVV number.


--
Ian P. Christian ~ http://pookey.co.uk

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MD5()

2007-03-10 Thread Mogens Melander
Or you might want to take a look at DES_ENCRYPT/DES_DECRYPT
funktions in the mysql manual.

On Sat, March 10, 2007 11:18, Ian P. Christian wrote:
 Neil Tompkins wrote:
 I'm looking to use MD5() to encrypt credit card numbers.  How do I
 unencrypt this when reading the value ?


 you can't.
 Google for MD5, or better still look at wikipedia, I'm sure they will
 have something

 --
 Ian P. Christian ~ http://pookey.co.uk

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


 --
 This message has been scanned for viruses and
 dangerous content by OpenProtect(http://www.openprotect.com), and is
 believed to be clean.



-- 
Later

Mogens Melander
+45 40 85 71 38
+66 870 133 224



-- 
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MD5()

2007-03-10 Thread Aaron Cannon

-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

Before you implement anything, I would do a lot of research about
encryption.  No offense, but from your question, it is clear that you know
next to nothing about encryption.  That's fine.  A few years ago, I was the
exact same way.  However, encryption is somewhat complex, so if you're going
to do it, you should do it right.  In my opinion, poorly implemented
encryption can be worse than no encryption at all.

You should also think carefully before storing customers credit card
numbers.  You should seriously consider whether or not it is really
necessary to do so.  If it is simply for the purpose of rebilling, a lot of
credit card processing API's will handle this for you.

Finally, what another poster said is right on the money.  If you are in a
shared hosting environment, do not even think about handling customers
credit cards.  There are too many ways security can be compromised on such
systems.  If that is in fact the case, I would suggest you outsource the
customer billing.  Remember also that security breaches of this type can
seriously damage the reputation of any organization.

Aaron


- --
Skype: cannona
MSN/Windows Messenger: [EMAIL PROTECTED] (don't send email to the hotmail
address.)
- - Original Message -
From: Neil Tompkins [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Saturday, March 10, 2007 4:17 AM
Subject: MD5()



I'm looking to use MD5() to encrypt credit card numbers.  How do I
unencrypt this when reading the value ?

Thanks,
Neil

_
Get Hotmail, News, Sport and Entertainment from MSN on your mobile.
http://www.msn.txt4content.com/


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32) - GPGrelay v0.959
Comment: Key available from all major key servers.

iD8DBQFF8tlUI7J99hVZuJcRA+kXAKDEB6EU0QzTrTZu72wPUe+43Pi2TwCeKTFw
UDnwBp4Wwt+/n4YAn6SPfl4=
=HRjm
-END PGP SIGNATURE-

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MD5()

2007-03-10 Thread Neil Tompkins

DES_ENCRYPT/DES_DECRYPT appears to be what we require.

Thanks
Neil






From: Mogens Melander [EMAIL PROTECTED]
To: Neil Tompkins [EMAIL PROTECTED]
CC: mysql@lists.mysql.com
Subject: Re: MD5()
Date: Sat, 10 Mar 2007 12:19:53 +0100 (CET)

Or you might want to take a look at DES_ENCRYPT/DES_DECRYPT
funktions in the mysql manual.

On Sat, March 10, 2007 11:18, Ian P. Christian wrote:
 Neil Tompkins wrote:
 I'm looking to use MD5() to encrypt credit card numbers.  How do I
 unencrypt this when reading the value ?


 you can't.
 Google for MD5, or better still look at wikipedia, I'm sure they will
 have something

 --
 Ian P. Christian ~ http://pookey.co.uk

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



 --
 This message has been scanned for viruses and
 dangerous content by OpenProtect(http://www.openprotect.com), and is
 believed to be clean.



--
Later

Mogens Melander
+45 40 85 71 38
+66 870 133 224



--
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




_
MSN Hotmail is evolving - check out the new Windows Live Mail.  
http://ideas.live.co.uk/



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



FW: Re: MD5()

2007-03-10 Thread Neil Tompkins
Strange the DES_ENCRYPT/DES_DECRYPT  functions work with my version of mySQL 
3.23





From: Neil Tompkins [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
CC: mysql@lists.mysql.com
Subject: Re: MD5()
Date: Sat, 10 Mar 2007 18:20:43 +

DES_ENCRYPT/DES_DECRYPT appears to be what we require.

Thanks
Neil






From: Mogens Melander [EMAIL PROTECTED]
To: Neil Tompkins [EMAIL PROTECTED]
CC: mysql@lists.mysql.com
Subject: Re: MD5()
Date: Sat, 10 Mar 2007 12:19:53 +0100 (CET)

Or you might want to take a look at DES_ENCRYPT/DES_DECRYPT
funktions in the mysql manual.

On Sat, March 10, 2007 11:18, Ian P. Christian wrote:
 Neil Tompkins wrote:
 I'm looking to use MD5() to encrypt credit card numbers.  How do I
 unencrypt this when reading the value ?


 you can't.
 Google for MD5, or better still look at wikipedia, I'm sure they will
 have something

 --
 Ian P. Christian ~ http://pookey.co.uk

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



 --
 This message has been scanned for viruses and
 dangerous content by OpenProtect(http://www.openprotect.com), and is
 believed to be clean.



--
Later

Mogens Melander
+45 40 85 71 38
+66 870 133 224



--
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




_
MSN Hotmail is evolving - check out the new Windows Live Mail.  
http://ideas.live.co.uk/



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




_
MSN Hotmail is evolving - check out the new Windows Live Mail 
http://ideas.live.co.uk



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Innodb corruption help needed!

2007-03-10 Thread Jean-Sebastien Pilon
Hello, 

I am running a mysql database server and we experienced a power failure.
The mysql server does not want to restart because innodb is corrupted.

Version info:

Mysql version 4.1.11-Debian_4sarge7-log
Debian sarge
Reiserfs filesystem

What I have tried:

- Ran reiserfsck to fix corrupted file system. It fixed some problems,
now says no corruption. 
- Restarted mysql with no success
- Restarted mysql with innodb_force_recovery = 4 option, with no success
- Restarted mysql with innodb_force_recovery = 6 option, mysql starts,
but cannot access any data in my different schemas/tables

See below for mysql startup log

What should I do next ? 


Please let me know if you need any additionnal information, such as log
files etc... 


Thanks,

Jean-Sebastien Pilon



*** LOG ***

Mar 10 17:57:21 db01-mtl mysqld_safe[3579]: started
Mar 10 17:57:21 db01-mtl mysqld[3582]: 070310 17:57:21  InnoDB: Database
was not shut down normally!
Mar 10 17:57:21 db01-mtl mysqld[3582]: InnoDB: Starting crash recovery.
Mar 10 17:57:21 db01-mtl mysqld[3582]: InnoDB: Reading tablespace
information from the .ibd files...
Mar 10 17:57:21 db01-mtl mysqld[3582]: InnoDB: Restoring possible
half-written data pages from the doublewrite
Mar 10 17:57:21 db01-mtl mysqld[3582]: InnoDB: buffer...
Mar 10 17:57:21 db01-mtl mysqld[3582]: 070310 17:57:21  InnoDB: Starting
log scan based on checkpoint at
Mar 10 17:57:21 db01-mtl mysqld[3582]: InnoDB: log sequence number 9
4253873524.
Mar 10 17:57:21 db01-mtl mysqld[3582]: InnoDB: Doing recovery: scanned
up to log sequence number 9 4253910595
Mar 10 17:57:21 db01-mtl mysqld[3582]: InnoDB: Probable data corruption
on page 4
Mar 10 17:57:21 db01-mtl mysqld[3582]: InnoDB: Original record PHYSICAL
RECORD: n_fields 7; 1-byte offs TRUE; info bits 0
Mar 10 17:57:21 db01-mtl mysqld[3582]:  0: len 4; hex ; asc
;; 1: len 1; hex 00; asc  ;; 2: len 4; hex 000953be; asc   S ;; 3: len
18; hex 860b00038603000486030004; asc   ;;
4: len 3; hex 8164b7; asc  d ;; 5: len 4; hex 8000; asc ;; 6:
len 4; hex 00d7306e; asc   0n;;
Mar 10 17:57:21 db01-mtl mysqld[3582]:
Mar 10 17:57:21 db01-mtl mysqld[3582]: InnoDB: on that page. Steps 255.
Mar 10 17:57:21 db01-mtl mysqld[3582]: InnoDB: Cannot find the dir slot
for record PHYSICAL RECORD: n_fields 7; 1-byte offs TRUE; info bits 0
Mar 10 17:57:21 db01-mtl mysqld[3582]:  0: len 4; hex ; asc
;; 1: len 1; hex 00; asc  ;; 2: len 4; hex 0009fbbe; asc ;; 3: len
18; hex 860b00038603000486030004; asc   ;;
4: len 3; hex 81624d; asc  bM;; 5: len 4; hex 8000; asc ;; 6:
len 4; hex 00d7166f; asco;;
Mar 10 17:57:21 db01-mtl mysqld[3582]:
Mar 10 17:57:21 db01-mtl mysqld[3582]: InnoDB: on that page!
Mar 10 17:57:21 db01-mtl mysqld[3582]: 070310 17:57:21  InnoDB: Page
dump in ascii and hex (16384 bytes):
Mar 10 17:57:21 db01-mtl mysqld[3582]:  


 removed dump 

Mar 10 17:57:22 db01-mtl mysqld[3582]:  t t t t t t t t t t t t t t t t
t t t t t t t t t t t t t t e;InnoDB: End of page dump
Mar 10 17:57:22 db01-mtl mysqld[3582]: 070310 17:57:22  InnoDB: Page
checksum 3805026483, prior-to-4.0.14-form checksum 706858147
Mar 10 17:57:22 db01-mtl mysqld[3582]: InnoDB: stored checksum
3606072843, prior-to-4.0.14-form stored checksum 9
Mar 10 17:57:22 db01-mtl mysqld[3582]: InnoDB: Page lsn 9 4253873884,
low 4 bytes of lsn at page end 4253873884
Mar 10 17:57:22 db01-mtl mysqld[3582]: InnoDB: Page number (if stored to
page already) 4,
Mar 10 17:57:22 db01-mtl mysqld[3582]: InnoDB: space id (if created with
= MySQL-4.1.1 and stored already) 0
Mar 10 17:57:22 db01-mtl mysqld[3582]: InnoDB: Page may be an update
undo log page
Mar 10 17:57:22 db01-mtl mysqld[3582]: InnoDB: Page may be an index page
where index id is 4294967295 0
Mar 10 17:57:22 db01-mtl mysqld[3582]: 070310 17:57:22InnoDB: Assertion
failure in thread 3083643104 in file page0page.c line 112
Mar 10 17:57:22 db01-mtl mysqld[3582]: InnoDB: We intentionally generate
a memory trap.
Mar 10 17:57:22 db01-mtl mysqld[3582]: InnoDB: Submit a detailed bug
report to http://bugs.mysql.com.
Mar 10 17:57:22 db01-mtl mysqld[3582]: InnoDB: If you get repeated
assertion failures or crashes, even
Mar 10 17:57:22 db01-mtl mysqld[3582]: InnoDB: immediately after the
mysqld startup, there may be
Mar 10 17:57:22 db01-mtl mysqld[3582]: InnoDB: corruption in the InnoDB
tablespace. Please refer to
Mar 10 17:57:22 db01-mtl mysqld[3582]: InnoDB:
http://dev.mysql.com/doc/mysql/en/Forcing_recovery.html
Mar 10 17:57:22 db01-mtl mysqld[3582]: InnoDB: about forcing recovery.
Mar 10 17:57:22 db01-mtl mysqld[3582]: mysqld got signal 11;
Mar 10 17:57:22 db01-mtl mysqld[3582]: This could be because you hit a
bug. It is also possible that this binary
Mar 10 17:57:22 db01-mtl mysqld[3582]: or one of the libraries it was
linked against is corrupt, improperly built,
Mar 10 17:57:22 db01-mtl mysqld[3582]: or misconfigured. This error can
also be caused