The long term solution is to get to the point where lawmakers talk about encryption, authentication and integrity as things they actually understand. Rather than having people with ulterior motives explain these things to them with snail mail analogies.
However, that is many decades off. For now we have encryption and the means to ensure MITM attacks are ineffective.
... as justified by many arguments from ignorance, like "I don't think everyone ...", and "There is no technical reason..." over and over. Even one counterexample for those (some helpfully supplied in comments hereabouts) makes the arguments invalid.
I gave one very practical example of encryption being applied to file transfers without a technical reason why that has to be. The same applies to the majority of resources fetched from CDNs. The only reason we use SSL for that is because there is no other method that browsers currently support for guaranteeing the integrity of the loaded information.
When it comes down to it, it's nobody else's business what python code-modules I'm downloading, it might give them enough information to attack my servers, so secrecy isn't a bad thing either.
I also think it's a bit of a shame that we're having to do all this encryption these days. Think of all that wonderful caching capability we're losing. Still, I come down on the side of "necessary evil", given the increasingly malicious attacks on parties that aren't using it.
There is much bigger issue there: nobody verifies package signatures. Most packages do not even have ones. So you fundamentally have no way to verify that what you downloaded is what you wanted. Someone could have stolen my PyPI access credentials and uploaded a broken package under one of my releases.
Or I'm just a bad person and would ship you bad code.
SSL does not solve that problem.
This is bad practice, and is not solved by less integrity and authenticity checking!
>> Or I'm just a bad person and would ship you bad code.
Nobody said it solves everything, but it does help prevent unrelated third parties getting in on the act, actively or passively.
No, it's a completely orthogonal issue which was my point. But you were bringing up a potential security issue which is that people might know what packages you are using. I'm bringing up that you are installing completely untrusted packages which is your actual issue there, not that someone might be able to know what you are using.
Let alone that with AGPL libraries for instance you are required to disclose that anyways.
There are multiple 'actual' issues here.
One, you have identified, is that the content on the server is not very well verified. This is a problem I agree, and solutions are likely non-trivial. TLS will not fix this for you.
The second one is making sure that what is on the server is accurately replicated on the client. Authentication (am I talking to the real server?) and integrity checking (did I really get what the server tried to send me?) are important here. TLS can address this.
The third is giving away information about modules installed, which may be another risk. TLS will mitigate this.
You're right that the AGPL would require you to disclose to any user which modules are in use and give over the source to anyone that uses your service and asks for it, and in general security by obscurity is a bad idea anyway - however I may not have users, I may be setting up a server only for me to access, and I may not want passive traffic sniffers to know that my experimental server is likely to be running an easily-compromised version of a service for the next five minutes until I patch it.
While this may make short-term practical sense, it's fundamentally wrong. Nobody should be raped, short skirt or not. It's the law enforcement that needs to change and prevent such things, not women. Women, if anything, should carry pepper spray.
Same thing applies to the privacy of communication. Nobody should be a subject to an unreasonable search. Yes, having your communication open provokes any number of three-letter agencies to want to snoop on it, just in case. And if they find it encrypted, they want to crack it — again, just in case. Why not yield?
Again, this is fundamentally wrong, it goes against the letter of the law and the spirit of it. It's the law enforcement that needs to change, not citizens. First have a probable case, preferably a court order, etc. Citizens, id anything, should use encryption more.
This discussion went emotional very quickly.
> It's the law enforcement that needs to change, not citizens.
Last time I was looking there was no world government. What a country has to do and does not have to do is fundamentally decided by it's lawmakers. In some countries those are elected, in others they are not. I'm a programmer and as such I limit my general impact on technical things. I might have the opportunity to shape legislation but I do not claim that I know what every country should do.
Also please note that nobody is forced to wear revealing skirts or use concealing encryption. You are free to do what you think is right. I very much appreciate what you do, and wish you to continue unhindered. I hope we can disagree on the point of usefulness of encryption in certain cases without affecting everything else.
I never said that we don't need encryption, far form it. I said we do not need to encrypt everything and I firmly stand by that. If we do want to encrypt the entirety of the internet traffic then I believe we need to consider all the consequences this causes. That was my point, not more, not less.