Does MySQL for windows support base 64 encoding ?
Does anyone know if MySQL for windows support base 64 encoding ? Or where this documented ? Jeff Stout CSG Systems, Inc. 303-200-3204 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
SHA literal String Syntax Help
I need help with the proper syntax of my INSERT Statement. I have spoken to the support staff of my RADIUS Vendor they stated that enable to support SHA The Coolum for password has to have the encrypted password prefixed with {SHA} not just the hash I need to include the literal string of {SHA} plus the hash, see below. Quote from support When you select a user password from the table Radius will then retrieve: {SHA}15346b593c4d0cf05fb6e67a5669d852e6550481 This one encrypts the whole string {SHA}'smith' mysql INSERT INTO user_profile (userid,password,alias,profile) - VALUES ('bob',SHA1({SHA}'smith'),'max',default); Query OK, 1 row affected (0.00 sec) This one pukes mysql INSERT INTO user_profile (userid,password,alias,profile) - VALUES ('bob',({SHA}SHA1'smith'),'max',default); ERROR 1064 You have an error in you SQL syntax This one has a could mismatch mysql INSERT INTO user_profile (userid,password,alias,profile) - VALUES ('bob',SHA,HA1'smith'),'max',default); Please help I'm new to SQL and it's syntax flow. Thanks Jeff Stout CSG Systems, Inc. 303-200-3204 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
newbie Quote Question
I know this may seem like a trivial question, however I am new to SQL and it's syntax. I need to know what the difference between single 'quoting' and double quoting a string. When and why do I use one or the other, Any help answering this would be greatly appreciated. Thanks Jeff Stout CSG Systems, Inc. 303-200-3204 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Data store/extract help almost there ,still error's
Thanks John, I'm trying various syntax changes but still getting Empty set mysql INSERT INTO user_profile (userid,password) - VALUES (James,AES_ENCRYPT(bond,007)); Query OK, 1 row affected (0.00 sec) mysql SELECT * FROM user_profile WHERE userid=james AND - AES_DECRYPT(password,bond)=007; Empty set (0.00 sec) -Original Message- From: John Hopkins [mailto:[EMAIL PROTECTED] Sent: Friday, September 19, 2003 6:38 PM To: Stout, Jeff Subject: RE: Data store/extract help almost there I've been following with interest. As I understand the previous messages, you are indeed almost there Try this: mysql INSERT INTO user_profile (userid,password) - VALUES (joeblow,AES_ENCRYPT(spit,swallow)); Query OK, 1 row affected (0.01 sec) mysql SELECT * FROM user_profile WHERE userid=joeblow AND - AES_DECRYPT(password,swallow)=spit; I don't have MySQL running anywhere right now, can't test it. The point is you need to decrypt what's in *password*, and compare that to the unencrypted password (entered by the user?). Hope this helps, John Hopkins Hopkins IT -Original Message- From: Stout, Jeff [mailto:[EMAIL PROTECTED] Sent: Friday, September 19, 2003 4:31 PM To: PF: MySQL; [EMAIL PROTECTED] Subject: RE: Data store/extract help almost there Almost there, here is the error mysql INSERT INTO user_profile (userid,password) - VALUES (joeblow,AES_ENCRYPT(spit,swallow)); Query OK, 1 row affected (0.01 sec) mysql SELECT * FROM user_profile WHERE userid=joeblow AND - password=AES_DECRYPT(spit,swallow); Empty set (0.01 sec) -Original Message- From: PF: MySQL [mailto:[EMAIL PROTECTED] Sent: Friday, September 19, 2003 4:48 PM To: [EMAIL PROTECTED] Subject: RE: Data store/extract help !! Woops, Sorry, Phone call distracted me AES_ENCRYPT(string,key_string) AES_DECRYPT(string,key_string) These functions allow encryption/decryption of data using the official AES (Advanced Encryption Standard) algorithm, previously known as Rijndael. Encoding with a 128-bit key length is used, but you can extend it up to 256 bits by modifying the source. We chose 128 bits because it is much faster and it is usually secure enough. The input arguments may be any length. If either argument is NULL, the result of this function is also NULL. As AES is a block-level algorithm, padding is used to encode uneven length strings and so the result string length may be calculated as 16*(trunc(string_length/16)+1). If AES_DECRYPT() detects invalid data or incorrect padding, it returns NULL. However, it is possible for AES_DECRYPT() to return a non-NULL value (possibly garbage) if the input data or the key are invalid. You can use the AES functions to store data in an encrypted form by modifying your queries: INSERT INTO t VALUES (1,AES_ENCRYPT(text,password)); You can get even more security by not transferring the key over the connection for each query, which can be accomplished by storing it in a server side variable at connection time: SELECT @password:=my password; INSERT INTO t VALUES (1,AES_ENCRYPT(text,@password)); AES_ENCRYPT() and AES_DECRYPT() were added in version 4.0.2, and can be considered the most cryptographically secure encryption functions currently available in MySQL. -Kevin -- MySQL Windows Mailing List For list archives: http://lists.mysql.com/win32 To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL Windows Mailing List For list archives: http://lists.mysql.com/win32 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RADIUS is a Wh*%@
I am using MySQL 4.0.15 on Win2K (not by choice, vendor chose this platform) I user the Database to store user information to Allow RADIUS to authenticate users against the tables. I have to encrypt the password fields, If I use MD5 it is a one way algorithm, enable for me to user MD5 I have to compare the hashes if hashes match then I'm golden and user is granted access, however the flavor of RADIUS the Vendor has chosen to use can not by it's self do a hash comparison thus all Hash encrypted passwords can't be read by Radius and users are denied access. Has any one had experience with this and know of a way to fix this My other thought was to use: INSERT INTO user_profile (userid, password) VALUES ('sam', AES_ENCRYPT(sam,password)); this will allow me to encrypt the password field, but I still need to get RADIUS to do the AES_DECRYPT any thoughts. ugh Jeff Stout CSG Systems, Inc. 303-200-3204
Syntax Query Help DECRYPT
I have added data into MySQL server 4.0.15 INSERT INTO userdata (userid, password) VALUES ('user', AES_ENCRYPT (user,password) I'm having trouble doing the decrypt SELECT userid, password (AES_DECRYPT) FROM userdata blah blah blah Something this this Thanks Jeff Stout
Data store/extract help !!
I'm still unclear on how to do the decrypt syntax, forgive me I'm new to DB work, my background is more security and UNIX admin. I need help with the data extraction/decryption SELECT userid, password FROM user_profile AES_DECRYPT(user,password) ?? What I'm trying to accomplish is I'm using RADIUS to Authenticate users for Network Access, the user info is stored via MySQL DB, I have the need to ENCRYPT the Password Field and Possibly the UserName Field. I need to DECRYPT so RADIUS can read the Password and accept users, I thought of MD5 but this is a one way hash, I'd have to compare the hashes and haven't fiqured out a way to do that through SQL. Any help or suggestions -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: Friday, September 19, 2003 1:31 PM To: Stout, Jeff; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Syntax Query Help DECRYPT At 1:08 PM -0600 9/19/03, Stout, Jeff wrote: I have added data into MySQL server 4.0.15 INSERT INTO userdata (userid, password) VALUES ('user', AES_ENCRYPT (user,password) I'm having trouble doing the decrypt Something this this Thanks Jeff Stout The syntax for both is the same: AES_ENCRYPT(string,key_string) AES_DECRYPT(string,key_string) See: http://www.mysql.com/doc/en/Miscellaneous_functions.html Please note that internals is not for questions of this type. I've removed it from the cc: list. Thanks. -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]