The One Ring would presumably still talk to whoever carries the metal box.
There is plenty of proof of the Ring talking to whoever it chooses (though they must be nearby). It always selects the easiest target to manipulate. That choice is intentional, and shows that the Ring is capable of understanding both its current environments, and the character of those in its current environment.
There is no proof of the Ring only being able to speak to those who know its true identity. Sméagol is a good example of this, as he considered the Ring he found to be a pretty object; not a source of power.
The One Ring is insidious. It has a mind of its own. It chooses who to manipulate. It chooses who it talks to, specifically those who are prone to succumb to it, and it convinces them that they should keep the Ring for themselves.
The Ring's MO is also very particular. It tries to change the good idea that
This power must be destroyed
into the misguided idea that
I can only achieve my goal if I use this power
But, as I will address in a little bit, that is not the only way in which the Ring works. It's simply a very effective manipulation tactic, that many people fall victim to at soem point in their lives.
To misquote Harvey Dent:
You either die trying to destroy the evil power, or you live long enough that you will wield the evil power in a misguided attempt to use it to destroy the evil power.
To summarize the below explanations:
- The Ring is smart enough to pick the weakest link. It is only limited by proximity to the target, but it knows them inside out.
- The Ring is smart enough to change how it manipulates. It tailors the manipulation of Frodo to the instillment of paranoia (about Sam), as opposed to the promise of power (Sam, Boromir, Isildur).
- The Ring is aware of its environment. It promised power to Boromir when Boromir was capable of taking the Ring from a weak Hobbit. But it changed its tactics when that was no longer viable.
- Sméagol had no idea of the Ring's identity; yet he was still swayed by it. He never truly cared about the Ring's power even when he was told about it. Gollum had his own reasons for desiring the Ring: pure and simple greed. This proves that the Ring can manipulate as it chooses to manipulate, it is not a one trick pony that always revolves around either the desire for personal power (Boromir) or the fear of others' desire for power (Frodo, about Sam).
- It just so happens that it's pretty easy to sway people with the promise of power, and imbuing its wearer with power is exactly the reputation of the One Ring. Its identity is a tool in its manipulation arsenal, but not a requirement.
From this, we can conclude that if an unknowing subject were to carry a sealed metallic box, the Ring could still speak to it. It probably couldn't instill the promise of power by wielding the Ring (as the subject is not aware of it), but it could instill paranoia as to what was inside the box; urging the subject to open it. Or it could instill the idea that the box is very valuable, and can be sold to the right people for money; which is a promise of financial power.
Let's say we encase it in stone, somewhere inside a mountain. While the Ring could never really instill a miner with the idea that "by opening this rock, I will wield supreme power and destroy my enemies", it could still urge the miner to pick that spot by instilling the idea that "my gut tells me that there's precious metal in this stone".
I am foregoing any theories that encasing the Ring in a box of a particular material would block the telepathic powers of the Ring. I cannot recall any case where magic has an elemental weakness; it is not part of the lore as far as I can remember.
If that were the case, we would have seen some sort of magical armor in one for or another;
Gandalf was a desirable but hard to manipulate target, and did not have a prolonged exposure to the Ring.
Gandalf has a strong mind and is not easily swayed nor manipulated. Other than Saruman, Gandalf has not shown to be a bad judge of character, both of himself and others. He is aware of his surroundings, and incredibly pragmatic.
It's likely that Gandalf never handled the One Ring long enough that it could actually manipulate him.
Gandalf may sense that the Ring would be trying to manipulate him; which means that the Ring reveals itself to Gandalf as a Ring of Power. The Ring may have actively decided against trying to sway Gandalf, because it would work to the detriment of the goal of getting back to Sauron.
This may have been different if Gandalf had carried the Ring for an extended amount of time. Maybe he would not notice subtle manipulations. Gandalf quickly identifies this possibility and therefore passes the Ring to someone he knows well enough to know that he has no desire for power, lacks a violent trait and has no combat prowess even if he wanted to.
In this way, Frodo is a polar opposite to Gandalf.
Gandalf, while definitely not omnipotent, is already more capable than practically any other living creature in Middle Earth (save Saruman and Sauron). He has less desire for an additional boost of power, compared to e.g. Boromir, who has been the victim of violence (Orc raiders from the east) for his entire life and has so far been unable to put a stop to it.
Frodo has a prolonged exposure to the Ring, but is not a desirable target for the Ring to manipulate.
Frodo is no one important. Even if Frodo was easy prey for the Ring (easily tempted by the promise of power), a Hobbit wouldn't achieve much. Not only do they grow up without any real training or experience of violence; but their short stature makes them ill suited for combat.
This is often the case when the Hobbits partake in combat. They are no swordsmen. And although Aragorn has imparted some swordsmanship to Merry and Pippin; Frodo and Sam are not seen sparring with Aragorn (referencing the movie here, it's been too long since I read the books). To their credit, Hobbits have strong convictions, and are not easily swayed (although their peaceful upbringing makes them averse to violence).
From all that we have seen from him, Frodo is not a violent Hobbit even when provoked. Even by a Hobbit's standards, Frodo is a less than ideal target for the Ring to manipulate.
But the Ring got to Frodo after a while. I believe that this is due to the Ring's own decisions. In the beginning, it mainly tried to sway others to take it from Frodo (who couldn't put up a fight if the others tried to take it).
This is what happens to Boromir. Boromir is a much easier target for the Ring. He has an emotional need to overcome the wrongs of the world (the Orcs' relentless raiding of Gondorian lands), he is trained and ready for combat, would appreciate a boost in power, and is relatively easily swayed by the promise of that power.
Why Boromir, and not someone else? Boromir seems to be the weakest link in the fellowship. The Hobbits are ill suited targets for the Ring, Gandalf intentionally stays away from it, Aragorn, Legolas and Gimli have no desire for power, they are happy being who they currently are. Boromir is the only one with a burning desire that he is currently unable to overcome, but would be able to overcome when wielding the One Ring.
However, when Frodo and Sam split off from the group, the Ring loses that opportunity. The only additional opportunity the Ring gets is Gollum, who is already completely convinced that he needs the Ring and needs no further coercion. However, part of Gollum (which is referred to as Sméagol) has also come to understand that the Ring is bad for him. To that end, the Ring should not reenforce its hold over Gollum, because that might be the straw that breaks the camel's back, when Gollum sees the damage the Ring has caused to him.
Frodo and Sam avoid people as much as they can, so the Ring is stuck with them and no one else. This is key to the Ring not being able to find its way to Sauron in the end.
The Ring spoke to Frodo, because it realized that Sam was stronger than Frodo. While it could not sway Frodo with the promise of power, it did manage to make Frodo paranoid that Sam wants the power for himself.
Since it is clear to us that Frodo needs Sam to get through the adventure; it should have been laughably obvious to the Ring, who knows everyone inside out.
The Ring's reputation can be enough to sway people, without the Ring needing to manipulate them
Faramir comes to mind. His decisions were not driven by the Ring's manipulation. Faramir did not need to be coerced to want the Ring. He already had plenty of personal reasons to want it: to redeem himself in the eyes of the father who does not love him.
If Faramir had not been geographically close to the Ring, e.g. he commanded his men to do his bidding via messages; he would've made the exact same decision. He was not driven by any promise that the Ring made to him.
This proves that the Ring's reputation can be very powerful. The Ring, being a masterful manipulator, will of course utilize that reputation if it is a useful tool to achieve its goal.
EDIT Direct response to part of your question:
This leads me to wonder. If Gandalf (a wizard, mind you) had instead encased the Ring in steel and stuffed it in a bag, and didn't tell Frodo what it was, only that the bag and its contents had to be destroyed at Mount Doom, would it have affected Frodo or anyone else? Surely there must have been a safer way to carry the Ring without risking corrupting the bearer so much.
Let's say Frodo carries an unidentified box, unaware of its importance.
- Why would he hide its existence? If he does not know its importance; there's no reason to not talk about it. Frodo comes from a place where everyone is happy and there is no real struggle.
- Frodo would still know that it must be destroyed in Mount Doom; or he may have disposed of it in another seemingly equivalent fashion. Assuming Frodo never hears of the One Ring; someone else can still figure out that the thing that can only be destroyed in Mount Doom is the One Ring. And then they can convice Frodo to let them take it there.
- Why would Frodo risk his life for a wizard who, although Frodo likes him very much, is the cause of Bagginses to be considered "weird" in the Shire? He doesn't particularly carry resentment about it, but he mentions that to Gandalf in one of the first scenes of the movie. Why would he risk his life for an undisclosed object, simply because it was asked of him by somemone who has a past of sending Hobbits out on adventures beyond their capabilities (as far as Bilbo/Frodo were aware of their own capabilities at the time of embarking on the journey)?
You are sent on a mysterious journey by a wizard who is known for sending people on dangerous quests; to a land that compared to your home region is the embodiment of Hell; without any explanation as to why you're the best candidate for the job; with a mysterious requirement to do it all by yourself; while you have never been outside of your own home region; with a very real chance of dying on the way.
Why on (Middle) Earth would you do that?
Gimli states something similar.
Certainty of death, small chance of success... What are we waiting for?
Now consider the following:
- Gimli knows the importance of the Ring, and evil that powers it.
- Gimli is battleworthy, and even enjoys combat (as per his friendly rivalry with Legolas)
- As a soldier, Gimli knows the importance of self sacrifice for the greater good.
- Gimli knows more than just his own home region. Although not the most diplomatic of characters; he is still capable of traversing the world without much problems.
Even with all that, Gimli's statement is still considered comical. Because even Gimli would have to logically conclude that he should not go on this mission; but he comically subverts it by going on it anyway. The fact that the others laugh at his statement confirms that everyone thinks that the logical choice is to not go on this mission.
Except that destroying Sauron is the best reason to sacrifice yourself.
But without knowing that, Frodo can have no possible reason to accept Gandalf's mission.
Unless Gandalf relied on Frodo's naive desire to see the world; but then again, why would Gandalf entrust such an important task to someone who can be swayed by naive desires without thinking things through?