I watched a generic Da-Vinci-Code-like french movie that, in a certain point, featured a secret society trying to find an item of great value that was lost in a vault built centuries ago (millenia, if I remember it correctly). Obviously, to gain access to the vault, a key is needed - since it's the only way to open it.
In this type of narrative, I think that the difficulty in opening the given door, vault, chest or whatever is not in the actual "opening" of the device, but in the process of locating it. All that "it was lost in time" thing is a good explanation as to why no one has opened it before - because no one could find it - 'cause if you think about it, if anyone knew where the vault was located, they could've just blasted their way in without the need for some big search for the goddamn key.
As a narrative element, I'm all for it. But in the real world, people would blow shit up.
Suppose this vault exists and a certain group finds it.
From an engineering point of view, would it be possible for an ancient civilization to build a contraption capable of enduring modern day attempts to break in?
If yes, I would like to know what would this device be like and why dynamite, drills and general modern-day brute force should be useless against it.
The misadventures on Oak Island illustrate this well. Supposedly the treasure of the Templars is there. But no-one has been able to get it. It has not been for lack of trying.
Water in the pit: According to an account written in 1862, after the Onslow Company had excavated to 80–90 feet (24–27 metres) the pit flooded with seawater up to the 33-foot (10 m) level; attempts to remove the water were unsuccessful. Explorers have made claims about an elaborate drainage system extending from the ocean beaches to the pit. Later treasure hunters claimed that coconut fibres were discovered beneath the surface of a beach, Smith's Cove, in 1851. This led to the theory that the beach had been converted into a siphon, feeding seawater into the pit through a man-made tunnel. A sample of this material was reportedly sent to the Smithsonian Institution during the early 20th century, where it was concluded that the material was coconut fibre.
Attempts to access the purported treasure are thwarted again and again by water. People have been killed. The water is so pernicious and so persistent that treasure hunters claim that water access is an intentional and built in part of the treasure site. You cannot blast through water. If you don't know where it is coming from, you cannot stop it. You can bail it out and you can pump it out, but the ocean has more. It is hard for humans to accomplish much when both underwater and underground.
Realistically, the only way you could make this work is by creating a scenario where forcible opening destroys the contents.
All the materials that anybody had to work with in ancient times would yield with extreme speed to any kind of modern power tools. You wouldn't need dynamite, a cordless drill from Home Depot with the appropriate bit would easily handle pretty much anything anybody could have constructed prior to steel coming into common use.
However, an ancient vault, by necessity, would contain ancient contents, and if you're talking about something two thousand years old made of cloth, wood, or paper, it wouldn't be difficult to come up with a scenario where exposing the contents to an abrupt pressure change from either blasting or drilling would (or could) damage or destroy what your characters were trying to acquire.
EDIT: Now that I'm really thinking about it, I'm pretty sure it would only take me about three minutes to have everything in hand I could possibly need to defeat any conceivable security device using ancient materials. I wouldn't even have to put on pants. I have a pretty well-stocked garage though.
This kind of narrative really only works when your heroes are time and/or money constrained. When you only have hours to prevent doom, obtaining the key may be your only option.
If, on the other hand, you have the leisure to bring modern power tools, fibre optics, ground penetrating radar or muon tomography etc. to bear, and professional mechanics and lockpicks, nothing will stop you for long.
And that only holds true for the case that forceful entry would endanger the contents. If not, a packet of C4 will be faster than any key.
From a purely engineering standpoint, no. The strongest materials ancient civilizations could get their hands on would be common metals (bronze or perhaps wrought iron) or bedrock stones like granite. Modern engineers can dig, cut, or blast through either of these in pretty much unlimited quantity, though it isn't something they'd do lightly, and it wouldn't be fast or cheap.
So assuming your treasure is sufficiently valuable that people will bring the full force of modern technology to bear on it - with cost being no object - it will be breached sooner or later. The solution would seem to be what AlexP suggested in comments: a vault designed such that any violent entry into it would destroy the valuable contents. In this case, a more subtle approach is required. With the right failsafes you could also resist more delicate tampering like lockpicks by making them also set off the trap.
I don't think there's any kind of enclosure the ancients (or even people nowadays) could build that would withstand persistent attempts to open with modern technology. Even something designed to destroy the contents if breached could probably be worked-around with sufficient time and resources.
The obvious countermeasure is to ensure that no-one has sufficient time or resources, or that it's not cost-effective to use them.
If the enclosure were in a suitably remote or hazardous environment, it might not be possible to work around it for long enough to safely breach. Extreme temperature or pressure, or some kind of hazardous material (similar to the purported rivers of Mercury in the Mausoleum of the first Qin Emperor) might do this. Locating it in Death Valley or a temple at the top of a mountain in the Himalayas may have a similar effect.
Opening the door causes the vault to collapse.
Say that the doorway is composed of two giant stone doors. Right on top of them is the keystone that supports the whole ceiling. Even just nudging one of the doors open a crack shifts the keystone and collapses the ceiling, destroying everything in the vault, including potential treasure hunters. Using the key would cause supports to slide into place, preventing any collapse from happening.
Consider the following situation: Your ancient vault acts like a safety-deposit system. There are 6 boxes, each containing a separate encoded clue - one of these leads to the McGuffin you need, the others lead you on a wild goose chase at best, or possibly even hasten the encroaching doom you are trying to prevent!
Different keys rotated in the lock will trigger different mechanisms, and open a different one of the boxes. Opening the boxes by force and bypassing the old lock is fairly easy with modern tools - but without the "lost-to-the-ages" key we won't know which box needs to be opened.
You (probably) don't want to activate the mystical artifact of D'Uumal-U'manz instead of the amulet of Xav-Derw'Uld.
Make people believe the treasure is hidden somewhere, preferably a large and inhospitable place, but hide it elsewhere. People are still looking for the Loch Ness monster -- not because we lack the equipment to find such a monster, but because people are not accepting "it isn't here" as an answer.
Tell stories about the treasure hidden beneath an Egyptian temple (preferably without specifying which one), in the belly of a mammoth hidden in Siberia, or to be part of the treasure hoard of a Caribbean pirate, and then hide it in a pit in the Australian outback and modern humans may search for centuries, and never find it, outer than by dumb luck.
But once they found the location, nothing will thwart revealing it.
Hmmm. My wife can attest that whenever we watch one of these Indiana Jones class movies, I tend to comment something to the effect, "We can't make a car that will start after sitting for 6 months. THESE guys make traps tht work 2000 years later...."
Ancient mechanisms that work better depend on gravity as there mode of operation. Trigger mechanisms need to be redundant, so that if one trip stone fails the next one may work. Mechanisms should be different too. If sand friction messed up one, maybe oil lube will let the next one work.
Bio poisons are plausible. Consider a very fine grinding of arsenic tri-oxide as an agent. Put a couple inches deep on the floor. Any one who stirs up the dust gets a lethal does. Dried plagues of various sorts are plausible: Anthrax is viable for 10 years in a moist pasture. How long would it last in a dry tomb?
Tidal traps are another possibility: passages that flood twice a day with the rising tide, but take more than half a day to get through. Major engineering. Long passages.
Consider also gas traps: Tap into a local hotspring that provides a source of H2S. Pipe that into low passages where it fills the bottom of the chamber. This is a passive system, but should catch the first few to venture into Realms of Knowledge Best Left Undiscovered.
Indiana Jones and the Last Crusade comes to mind. But remember, the Nazis weren't prepared to level the vaults: they wanted to enter sneakily and grab the powerful things from inside. I suppose it's like cryptography: any cipher can be unwound with enough brute force, but some ciphers have so much mathematical protection that it's not worth it to try.