A key is a device that is used to operate a lock (such as to lock or unlock it). A typical key is a small piece of metal consisting of two parts: the blade, which slides into the keyway of the lock and distinguishes between different keys, and the bow, which is left protruding so that torque can be applied by the user. A key is usually intended to operate one specific lock or a small number of locks that are keyed alike, so each lock requires a unique key. The key serves as a security token for access to the locked area; only persons having the correct key can open the lock and gain access.
Keys provide an inexpensive, though imperfect, method of access control for access to physical properties like buildings, vehicles and cupboards or cabinets. As such, keys are an essential feature of modern living, and are common around the world. It is common for people to carry the set of keys they need for their daily activities around with them, often linked by a keyring, which may be adorned by trinkets, usually known as a keychain.
The earliest known lock and key device was discovered in the ruins of Nineveh, the capital of ancient Assyria. Locks such as this were later developed into the Egyptian wooden pin lock, which consisted of a bolt, door fixture, and key. When the key was inserted, pins within the fixture were lifted out drilled holes within the bolt, allowing it to move. When the key was removed, the pins fell part-way into the bolt, preventing movement.
The warded lock was also present from antiquity and remains the most recognizable lock and key design in the Western world. The first all-metal locks appeared between the years 870 and 900, and are attributed to the English craftsmen. It is also said that the key was invented by Theodore of Samos in the 6th century BC.
Affluent Romans often kept their valuables in secure boxes within their households, and wore the keys as rings on their fingers. The practice had two benefits: It kept the key handy at all times, while signaling that the wearer was wealthy and important enough to have money and jewelry worth securing.
With the onset of the Industrial Revolution in the late 18th century and the concomitant development of precision engineering and component standardisation, locks and keys were manufactured with increasing complexity and sophistication.