It was the CIA and anyone who aren't starry eyed tech dorks has known this forever
This is obviously that which we know of and we're both essentially agreeing as the NSA/CIA work together often and in secret ala Stuxnet.
Who employs the most mathematicians?
Tor was contracted out to MIT grads, the need came from the navy, but they didn’t have the ability internally to make it happen (and also wanted it to be public so it wasn’t just intel operatives using it which would identify them).