Hashing gets lumped in with encryption though the two differ at the root: SHA-256 squeezes text of any length down to a fixed 256 bits with no way back, whereas encryption must by definition be undoable. Caesar offers only 25 keys, exhausted in an instant, while 128-bit AES stretches the key space to 2¹²⁸, some 3.4×10³⁸ possibilities. RSA uses a lopsided pair in which the public key can lock but never unlock, and a digital signature reverses precisely those roles: signed with the private key, verifiable by anyone holding the public one.
Hashing gets lumped in with encryption though the two differ at the root: SHA-256 squeezes text of any length down to a fixed 256 bits with no way back, whereas encryption must by definition be undoable. Caesar offers only 25 keys, exhausted in an instant, while 128-bit AES stretches the key space to 2¹²⁸, some 3.4×10³⁸ possibilities. RSA uses a lopsided pair in which the public key can lock but never unlock, and a digital signature reverses precisely those roles: signed with the private key, verifiable by anyone holding the public one.
Related topics in Mind & Machine