"a maker of locks," early 13c., from lock (n.1) + smith (n.).
Entries linking to locksmith
lock n.1
"means of fastening," Old English loc "bolt, appliance for fastening a door, lid, etc.; barrier, enclosure; bargain, agreement, settlement, conclusion," from Proto-Germanic *lukana-, a verbal root meaning "to close" (source also of Old Frisian lok "enclosure, prison, concealed place," Old Norse lok "fastening, lock," Gothic usluks "opening," Old High German loh "dungeon," German Loch "opening, hole," Dutch luik "shutter, trapdoor").
Ordinary mechanical locks work by means of an internal bolt or bar which slides and catches in an opening made to receive it. "The great diversity of meaning in the Teut. words seems to indicate two or more independent but formally identical substantival formations from the root" [OED]. The Old English sense "barrier, enclosure" led to the specific meaning "barrier on a stream or canal" (c. 1300), and the more specific sense "gate and sluice system on a water channel used as a means of raising and lowering boats" (1570s).
From 1540s as "a fastening together," hence "a grappling in wrestling" (c. 1600). In firearms, the part of the mechanism which explodes the charge (1540s, probably so called for its resemblance to a door-latching device), hence figurative phrase lock, stock, and barrel (which add up to the whole firearm) "the whole of something" (1842). Phrase under lock and key attested from early 14c.
smith n.
Middle English smith, from Old English smið "blacksmith, armorer, one who works in metal" (jewelers as well as blacksmiths), more broadly, "handicraftsman, practitioner of skilled manual arts" (also including carpenters), from Proto-Germanic *smithaz "skilled worker" (source also of Old Saxon smith, Old Norse smiðr, Danish smed, Old Frisian smith, Old High German smid, German Schmied, Gothic -smiþa, in aiza-smiþa "coppersmith"), from a suffixed form of PIE root *smi- "to cut, work with a sharp instrument" (source also of Greek smilē "knife for cutting and carving, chisel").
Attested as a surname by c. 975. Also used in a Middle English psalter of God, when he created light. Other common surnames meaning "smith" include Ferraro (Italian), Haddad (Arabic), Kovács (Hungarian, a Slavic loan-word), Kowalski (Polish), Herrero (Spanish), Kuznets (Russian), MacGowan (Irish, "son of the blacksmith").