The earliest known locks are more than 6,000 years old. It seems, according to archaeologists, that ancient Mesopotamians used locks that weren’t too terribly different than the locks we use today.
They were made of wood, which is different; but, just like a lot of modern locks, they had pins of different lengths that required the correct key to be used in order to open the lock. We can’t help but wonder if these locks put a bunch of guards out of business because we would imagine that before the invention of these locks, the only option for security was to have some big burly dudes with spears standing watch at your door 24/7.
Brass is still a popular metal today, and it was first used in locks when the Egyptians used it for pins in their locks. This simple change was a vast improvement to the security provided by the original Mesopotamian locks.
Over the next few hundred years, this basic locking mechanism found its way to Europe via the Greek and Roman Empires. And, like a lot of technology today, it kept shrinking and getting better along the way.
The Romans, who were apparently the first people to have anything small that was worth locking up, started putting locking mechanisms on drawers and other small boxes and containers.