Your front-door lock is a 4,000-year-old idea
The oldest known lock is wooden, about 4,000 years old, dug from the ruins of a palace near ancient Nineveh — and it works exactly like the cylinder on your door today. Small pins drop into a sliding wooden bolt and jam it in place; the right key lifts each pin to just the right height so the bolt can slide free. An American locksmith patented the metal pin-tumbler version in 1848 on that same ancient idea, and we've barely improved on it since.