I am going to focus this question.
I believe the question is specifically about keeping the "public" from knowing that technology was stolen from somewhere external as opposed to developed internally.
If we are talking about the Modern United States, then we can make some assumptions.
- The "public" refers to anyone that was not part of the top secret project that "stole" the technology.
- The "stolen" technology would be repackaged as "new" technology.
- There would be a whole chain of people related to the "new" technology: manufacturing, research, etc that would likely realize that something is wrong Since most technology is the process of iteration and can be back-traced. And this technology would not be able to be back-traced.
- There would be a small group who knew that the technology was stolen.
In order to maintain the secret from the "public" The government would need to either isolate these people involved in the chain of the "new" technology, or "include" them in the secret and swear them to secrecy. This would probably be the first thing to happen.
Once the "new" technology would be released to the "public" a cover story would need to be created. This cover story would need to include a lot of false evidence and constant care would need to be given to maintain the cover story in case of journalists or curious people looking into it.
Likely, that would mean that anyone getting to close to the information would need to be "removed" from the public or included in the secret and sworn to secrecy.
Assuming that all those sworn to secrecy, involved in the project, or that know about the "stolen" technology would be loyal, and that those who would not be loyal would be "dealt with". You could maintain this cover story for a long time, perhaps indefinitely.
However, once the "war" happens and the troops using the "new" technology would notice the enemy is using the same technology you would have a problem.
There are not many choices for how the enemy would have the same technology. Either they stole it, or we stole it. The only real cover story then can be that the enemy stole the "new" technology. Since it would be unreasonable to say that the enemy must have developed the same technology on their own.
In order to keep this hidden, it would mean that a policy of no prisoners would need to be maintained. Total annihilation of the enemy would be required, as well as all information and technology they had, especially manufacturing plants and scientists who would actually know the process and history of these technologies.
The government would likely need to initiate many strange policies for their soldiers - commanding them not to talk to enemies, shooting them on sight, not taking prisoners, or other actions which break Geneva Convention Rules.
In other words, by the war, the USA would become a tyrannical government with secret police, people disappearing, not adhering to universal laws, and genocidal policies. But hey, at least it would be a secret.