If it was not possible to control the Faro Plague robots during GAIA construction, how is it possible that HADES can control them now?
As you said, the robots were encrypted with a poly-phasic entangled waveform protocol. However, it was not impossible because of this - the humans could not deactivate the robots because they did not have time to crack the deactivation codes
If we had their deactivation codes, we could shut them all down. The entire swarm. But since their cryptographic protocols use polyphasic entangled waveforms, cracking a code set would take half a century. At best, we've got 16 months
The Bad News
Because they were not able to crack the codes in the time that they had, this was the purpose of MINERVA. As one of the sub-functions of GAIA, MINERVA's role was to decrypted the deactivation codes through brute-force and broadcast the codes with help of HEPHAESTUS.
HEPHAESTUS's first task will be to fabricate the robots that will construct the waveform broadcast towers MINERVA will use to transmit the deactivation codes
Full Steam Ahead
Shortly after the fall of humanity, MINERVA successfully decrypted the codes and broadcasted the deactivation signal to shutdown the robots.
Within 100 years after the extinction of life, GAIA succeeded in brute-forcing the swarm's deactivation codes and transmitted them worldwide, shutting the robots down
The Faro Plague
Being that HADES was another sub-function of GAIA, he had access to all the resources that the other sub-functions had ... including the deactivation codes. Given that MINERVA was able to decrypt the deactivation codes, she also likely discovered the re-activation codes as well.
In possession of the swarm's activation codes, which it knew from its existence as one of GAIA's subfunctions [...]
Presumably, GAIA would have had the Plague’s activation codes as part of its ultimately successful efforts to brute-force its deactivating codes. Thus, as part of Zero Dawn, HADES would have had access to them as well
Why then do they respond to the master key?
As you said, the Master Override has the power to deactivate HADES. The Master Override was an integral part of GAIA, and was created during the development phases. This was Ted's idea to which GAIA supported.
Flew out last night to oversee installation of the central armature and the master override (you're welcome, Ted) which was completed by 0430
Sobeck Journal, 7-16-65 R
Throughout the events of game, HADES was building an army to achieve his goal of resurrecting all the Faro Robots. HADES had no way of broadcasting the re-activation signal on a global level, so there was only a subset of Faro Robots at their disposal during the climax of the story.
After Aloy defeats HADES, she stabs him with the Master Override. This does not only purge HADES, but also broadcasts the deactivation signal through the Spire.
The activation of the override also broadcast the very same deactivation codes that GAIA had brute-forced and used to shut down the Faro Plague, shutting the reactivated Deathbringers down again