I am surprised to read that you think the NSA actions were not unconstitutional. Again, I am no legal scholar, but a quick Google search throws several newspaper articles citing court rules that declared it illegal, and articles by legal scholars supporting the idea that it is unconstitutional.
I certainly don’t like what they did, but that has nothing to do with my opinion on whether it was legal or constitutional (legal scholars say it was neither).
On the second point. The analogy that Cook used, comparing such software to a master key that opens every door is pretty clear. They are asking Apple to create such a master key for every iPhone. It is naïve to think that government will not use it at discretion once it exists.