I’m still learning this, but just because something is encrypted, it doesn’t mean that it’s hashed. Encryption is for the confidentiality of the file, where hashing is for the integrity. With encryption, if you have a decryption key, you can reverse it. Hashing isn’t reversible. With encryption, you can use that decryption key to return a file to plaintext. You can’t do that with a hash.
Basically, you encrypt the file to make sure only people who can decrypt it can access it. You hash the file to make sure it doesn’t get altered without your permission. You can check the file against your hashed version of it. If they match, then the data wasn’t altered. If they don’t, then you know someone changed it in some way.
With the public/private key pairs, you need to have both in order to decrypt the message. Using a key pair is Asymmetric encryption. You encrypt with one and decrypt with the other. If it were a symmetric encryption, then there’s only one key, and if that’s compromised, then so is the security of whatever’s encrypted.
Latest Answers