Pregunta de entrevista de Amazon

What are the differences between encryption, hashing and encoding and describe each process in detail.

Respuesta de la entrevista

Anónimo

25 abr 2017

Symmetric encryption: Both communicating parties will need a copy of the same key to decrypt and encrypt data. Asymmetric encryption (Public/Private key): Both parties will need each others public key. An encrypted message which is encrypted with a public key, can only be decrypted with each users private key which is kept hidden. The problem with this initial key exchange is that before the two parties exchange keys, they cannot communicate securely. This introduces the problem of a Man-In-The-Middle attack. Hashing is irreversible where as encryption is reversible. MD5 and SHA-1 are fairly common hashing types but are no longer considered secure. SHA-256 is considered much stronger. A salt which appends a random value to a password before it is hashed can be used to prevent having the same hashes in a database if two users happen to use the same password. This makes it more difficult to carry out dictionary or rainbow table attacks. Encoding converts data to a common form to be transferred over a medium in order to protect the integrity of the data.

1