The difference is that classified public key encryption was developed by a public, albeit secretive, government agency. The risk that the OP is worried about is that a private entity would control a powerful AI. If AGI is as powerful as people say it is then it would give a private company an unprecedented amount of power, that is perhaps a greater concern than the dangers of AI itself.