Let's take what I often here cited as one of the best software patents (personally, I think it is the worst.. but that's another story), RSA. Did that patent really prevent others from using/profiting on it? Hardly (although in most cases the "profiting off of" thing is a stretch, unless the explicit purpose of their product was cryptographic in nature.
Now, what if they had kept it a trade secret? Just look at their RC4. They kept it a secret and got a few years of exclusivity but eventually we all got the algorithm, because that's just how software works.
20 year exclusivity contracts are waaaay too long. I think the trade secrets route where "you have it until others figure it out" is far more fair and workable.