Would it be legal to publish a program to factor large semiprime numbers? If I somehow figured out a way to factor large semiprime numbers in a reasonable amount of time (don't worry, I haven't; this is hypothetical), would it be legal to publish the code? This could be problematic because RSA, an encryption algorithm that Internet security is pretty much based on, can be trivially cracked by an attacker with the ability to factor the large semiprime numbers used. An attacker with such ability could quite easily have read and modified the contents of this page while it was being transferred to your browser if they controlled one of the routers the page passed through over the Internet.
Sure But it’s been done. Admittedly, we don’t yet have the computer to run it for numbers bigger than 15 but the algorithm is ready to go.
I wrote a letter to the Eclipse Foundation. The consultant pointed me to section 5 in their FAQ. My case falls under the term "linking". He warned that he isn't a lawyer, but offered the following short answer: The Eclipse Foundation does not consider linking with EPL content to be a derivative work and so you are not required to disclose your source code.
If you are worried that some secret will become public, you should find and meet with an attorney, not a financial adviser or other nonlawyer. Your attorney is able to shield your secret information from disclosure in ways other professionals cannot. Raise any credit score issues you're concerned about. In general, the public has a right to access judicial records. See Nixon v. Warner Communications, Inc., 435 US 589, 597 (1978) (noting that the right is rarely litigated and not clearly defined). That right is not absolute; some records can be sealed, which means that the public can't read them. Local rules govern when that happens. I don't think the existence of a civil lawsuit could be made secretly except in special circumstances. Likewise, the plaintiff usually must identify herself, except in special circumstances. A plaintiff should assume that everything about the lawsuit--who filed it, against whom, what evidence arises, the trial, and who wins and loses--will be public.
It isn't necessarily "illegal" (in the sense you are committing a crime) but you may be in violation of a verbal contract (which would fall under tort law). Let's take this a bit further. Perhaps Joe Schmoe gave you his debit card information so that you could make deposits for him and he said you could take $5 out for yourself for the trouble. This is a contract between you and Joe for a service. You can't extend Joe's offer to Jane Doe by saying "here is some debit card information, take $2.50 out for yourself". You have no right to extend your contract with Joe to somebody else. Now specifically for passwords it basically boils down to the same thing. Unless Joe gives you explicit permission to give that to somebody else, you can't just decide to unilaterally give what Joe gave you to somebody else. This may be different if Joe said "here, I'm buying you a subscription to service XYZ because you are a nice guy", this may be construed as a gift which transfers ownership. At that point you have control over what is or isn't done with the account. As another example let's say Joe let you borrow his car. You can't turn around and say to Jane, "here's a car you can use", Joe did not extend the offer to Jane, nor did Joe give you the right to extend the offer to another person. It's a moot point though, in the original context of this question, Netflix does restrict you from sharing your passwords "outside your household". Almost every paid service has some restriction against sharing with others. In the end Netflix may shut off Joe's account and Joe may sue you for damages, but you aren't going to be thrown in jail for this. This would be a civil case (tort) which you may be liable for monetary damages.
In the United States, no. For something to be illegal in any meaningful way, you have to be able to point to a law that makes it illegal. If there's no law to break, it's not illegal. I would wonder if your colleague was thinking about question of whether cryptocurrencies are legal tender. For something to be "legal tender," there would need to be some kind of law or regulation requiring people to accept them as payment. There is no such requirement in the United States, so Bitcoin, for instance, is not legal tender. But that doesn't make it illegal tender; it just means that people can decide whether to accept it or not.
Wikipedia explains this well enough: Particular numbers can be trade secrets, and their reproduction and dissemination may be particularly proscribed, e.g., by the U.S. DCMA. As a coarse analogy: Your social security number is not "illegal." But if somebody entrusted with it shared it in violation of law or contract then their communication of the number in a context that allowed potential identity thieves to associate it with you would be illegal. To answer follow-up questions in the comments: Sure, "mere possession" of a number can land one in jail for all sorts of crimes, just like "mere possession" of stolen property can. For example, if you possess a bank account number, credit card number, or PIN, and you "conspire, confederate, or combine with another" person who actually commits fraud or theft using that number, then you can be convicted of the same crime. This is so common that a search for "conspiracy to commit wire fraud" or "credit card fraud" provides ample reading.
In general this is protected by the first amendment. It is not in general a problem describing how one can one can do something illegal. But there are special cases to be careful with. You might want to do some research into the limits on free speech. It would be hard to provide an answer that fully covers all your different cases and you would need to be more specific about what illegal activity you want to describe. In describing how to do something illegal, you might accidentally share information that you are not allowed to share. When you post things online, this can be considered as publishing or exporting. Therefore certain export restrictions might apply. Also, It is illegal to publish bomb making manuals, with the knowledge or intent that this information be used to commit a federal crime of violence. See https://www.law.cornell.edu/uscode/text/18/842. There are restrictions on publishing material relating to cryptography without having an export license. Granted, this isn't necessarily related to publishing things that are illegal, but just to give an idea about how publishing/exporting knowledge can causes problems. See https://en.wikipedia.org/wiki/Export_of_cryptography_from_the_United_States ITAR (International Traffic in Arms Regulations) sets restrictions on what you can publish about arms. What you publish can't be “directed to inciting or producing imminent lawless action.” See for example https://en.wikipedia.org/wiki/Brandenburg_v._Ohio. One might imagine that you could get into trouble if someone interprets what you do as inciting or producing a lawless action. It might sound obvious, but you want to make sure that you have the right to share the information that you have. The information that you are providing might be copyrighted in some way.
In the UK it is an offence to cause a computer to gain unauthorised access to any program or data held in any computer (s1 Computer Misuse Act 1990). It seems likely that other European jurisdictions have similar laws. Certainly Germany does: Penal Code 202a data espionage (German text - English translation). (I mention Germany because the linked thread does.) It might constitute theft in the jurisdiction if the finder did not take reasonable steps to find the owner - which may include informing the police of the find. Depending on the jurisdiction it might count as 'treasure' or abandoned property such that the finder is obliged to inform the authorities (the jurisdiction has the presumption of ownership of abandoned or lost property - e.g. Scotland), which then decide what to do with it. Legally speaking it seems to me that, to declare it legal, we have to get over such hurdles. [edit] There seems to be some dispute in the comments that cryptocurrency is subject to any regulation, counts as property, is something of value or is something that is owned and can be stolen, such that the person in the questioner's scenario could be held to account under the law for his behaviour. Aren't they merely numbers? No - plainly they do have value because people trade them with currency and goods and services. The UK's tax authority, HMRC, "does not consider cryptoassets to be currency or money" but sees them as having economic value because "they can be 'turned to account' - for example, exchanging them for goods, services, fiat currency (that is money declared by a government to be legal tender) or other tokens". They are "a new type of intangible asset". Individuals are liable "to pay UK tax if they are a UK resident and carry out a transaction with their tokens which is subject to UK tax". They are liable for "Income Tax and National Insurance contributions on cryptoassets which they receive from their employer as a form of non-cash payment [or from] mining, transaction confirmation or airdrops." (HMRC cryptoassets for individuals) Are they property? Something that can be owned, something that can be dishonestly appropriate (i.e. stolen)? That's the interesting dispute. Recently, the High Court of England and Wales ruled in a bitcoin ransomware-related case that "for the purpose of granting an interim injunction in the form of an interim proprietary injunction ... crypto currencies are a form of property capable of being the subject of a proprietary injunction". In that judgment there is some discussion of the authorities for considering or deciding they are property. ([2019] EWHC 3556 (Comm)) read from para 50 if not the whole judgment. In at least two other cryptocurrency-related cases the High Court treated the cryptocurrency as property. Vorotyntseva v Money-4 Limited, trading as Nebeus.com [2018] EWHC 2598 (Ch) and Liam David Robertson v Persons Unknown 2019. There was also a suggestion in the comments that the police would not understand and would not be interested. But there are several jurisdictions where people have been investigated, arrested, prosecuted and convicted of crimes relating to cryptocurrencies. A simple internet search for bitcoin theft, fraud or money laundering will result in some reports. In any case their interest or lack of it is irrelevant to what the law may say.