Foros del Web » Programación para mayores de 30 ;) » Bases de Datos General »

Encriptar Email BD

Estas en el tema de Encriptar Email BD en el foro de Bases de Datos General en Foros del Web. Hola a todos... Quería preguntarles si es posible encriptar los emails de la Base de Datos MySQL? Si es así, por favor, donde encuentro información ...
  #1 (permalink)  
Antiguo 21/04/2008, 00:33
 
Fecha de Ingreso: octubre-2004
Mensajes: 768
Antigüedad: 19 años, 6 meses
Puntos: 3
Encriptar Email BD

Hola a todos...

Quería preguntarles si es posible encriptar los emails de la Base de Datos MySQL?

Si es así, por favor, donde encuentro información o quien me orienta en como poder hacerlo?

Gracias y saludos.-
  #2 (permalink)  
Antiguo 21/04/2008, 10:53
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Sabadell
Mensajes: 4.897
Antigüedad: 16 años, 1 mes
Puntos: 574
Re: Encriptar Email BD

Mira las funciones de encriptacion que tiene definidas el propio MySQL, pero recuerda usar una que se pueda des encriptar por que sino no se de que te serviran esos emails....

Quim

Del help de MySQL Query Browser 1.2.12


Cita:
The functions in this section perform encryption and decryption, and compression and uncompression:

Compression or encryption --> Uncompression or decryption
AES_ENCRYT() --> AES_DECRYPT()
COMPRESS() --> UNCOMPRESS()
ENCODE() --> DECODE()
DES_ENCRYPT() --> DES_DECRYPT()
ENCRYPT() --> Not available
MD5() --> Not available
OLD_PASSWORD() --> Not available
PASSWORD() --> Not available
SHA() or SHA1() --> Not available
Not available --> UNCOMPRESSED_LENGTH()

Note: The encryption and compression functions return binary strings. For many of these functions, the result might contain arbitrary byte values. If you want to store these results, use a BLOB column rather than a CHAR or (before MySQL 5.0.3) VARCHAR column to avoid potential problems with trailing space removal that would change data values.

Note: Exploits for the MD5 and SHA-1 algorithms have become known. You may wish to consider using one of the other encryption functions described in this section instead.


AES_ENCRYPT(str,key_str), AES_DECRYPT(crypt_str,key_str)

These functions allow encryption and 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 secure enough for most purposes.

AES_ENCRYPT() encrypts a string and returns a binary string. AES_DECRYPT() decrypts the encrypted string and returns the original string. The input arguments may be any length. If either argument is NULL, the result of this function is also NULL.

Because AES is a block-level algorithm, padding is used to encode uneven length strings and so the result string length may be calculated using this formula:

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 is 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'));
AES_ENCRYPT() and AES_DECRYPT() can be considered the most cryptographically secure encryption functions currently available in MySQL.


...
  #3 (permalink)  
Antiguo 21/04/2008, 11:06
 
Fecha de Ingreso: octubre-2004
Mensajes: 768
Antigüedad: 19 años, 6 meses
Puntos: 3
Re: Encriptar Email BD

Uy... esto me complica la vida ya que soy un novato!!!

No se si en realidad me expresé bien al usar "encriptar". En realidad, quiero proteger las Direcciones de Correo de los registros que tengo en la BD del spam, pero que al hacer la consulta en la pagina, me lo muestre como dirección de correo. Es decir, que me lo muestre como por ejemplo: "[email protected]".

Creo que lo mejor será una imagen, pero no se como implementar eso en la BD.

Saludos.-
  #4 (permalink)  
Antiguo 22/04/2008, 02:27
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Sabadell
Mensajes: 4.897
Antigüedad: 16 años, 1 mes
Puntos: 574
Re: Encriptar Email BD

No se que decirte, en principio no pueden entrar asi como asi a la base de datos, pero claro todo es posible... y si los muestras por la web aun más...

Haz un post más explícito "Proteger emails de bbdd del span"

Quim
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:18.