Ver Mensaje Individual
  #3  
Antiguo 05-09-2017
Avatar de mamcx
mamcx mamcx is offline
Moderador
 
Registrado: sep 2004
Ubicación: Medellín - Colombia
Posts: 3.911
Reputación: 25
mamcx Tiene un aura espectacularmamcx Tiene un aura espectacularmamcx Tiene un aura espectacular
Hash NO ES SUBSTITUTO DE UN ALGORITMO DE ENCRIPTACION.

----

Es increíble el inmenso daño que tutoriales de "seguridad" le han hecho a la comunidad!!!

---

Que es un hash?

https://en.wikipedia.org/wiki/Hash_function

Cita:
A hash function is any function that can be used to map data of arbitrary size to data of fixed size.
....

One use is a data structure called a hash table, widely used in computer software for rapid data lookup.

.....

They are also useful in cryptography. (Nota que son utiles en criptografia, pero NO ES LO QUE DEBES USAR PARA LOS PASWORDS, sigue leyendo...)

A cryptographic hash function allows one to easily verify that some input data maps to a given hash value, but if the input data is unknown, it is deliberately difficult to reconstruct it (or equivalent alternatives) by knowing the stored hash value. This is used for assuring integrity of transmitted data

....

Hash functions are related to (and often confused with) checksums, check digits, fingerprints, lossy compression, randomization functions, error-correcting codes, and ciphers. <----- ESTO ES LO QUE BUSCAS!
Nota que hay varios tipos y usos de hashes.

Hash *precisamente* esta diseñado para *evitar* "recuperar la información". Osea, no son "reversibles". Eso derrota su proposito.

Si vas a encriptar, debes usar un algoritmo de *encriptacion*. Nota como "hash" no es parecido ni a palos a "encrypt". Hashing puede ser parte de los *pasos* en la encriptacion.

Un cipher, por el contrario:

https://en.wikipedia.org/wiki/Cipher
Cita:
In cryptography, a cipher (or cypher) is an algorithm for performing encryption or decryption—a series of well-defined steps that can be followed as a procedure.
Ves, esto si es lo que quieres!

Pero CUAL algoritmo de encriptacion?

Mas importante aun, usa una libreria ya hecha y probada, no lo "inventes".

https://paragonie.com/blog/2016/02/h...ssword-in-2016
Cita:
We've previously said that even security advice should carry an expiration date.
Nota que que es lo "mejor" va cambiando con los tiempos.

LibSodium es considerado una de las mejores librerias y esta disponible para Delphi!

https://download.libsodium.org/doc/b...ges/index.html
__________________
El malabarista.
Responder Con Cita