Cryptography and patents First of all, I've seen a question marked as off topic because OP doesn't cover any issue related to cryptographic work, but the legal aspects, but I'm unsure where to attend to ask the following questions.

I've never thought I was going to ask such a question, since I always thought that cryptography should be an open field, because the majority of information I know is on the public domain. But advices received from partners and relatives encouraged me to experiment with the idea. I know that some schemes were patented in their beginning: DH, RSA, DES, NTRU, some schemes on ECC.

Imagine that I own various schemes that are based on existing ideas, but the construction of these schemes are different from the original description, resulting in a different scheme that is believed to have better security or it is more efficient (optimized). I haven't studied any subject related to patents since I started my career so I'm not very familiarized with the scenarios that can arise:

Can you patent a cryptographic scheme and publish a paper opening your method entirely, which is descriptive enough, so its security can be analyzed by the cryptographic community? Could I provide an implementation of the scheme?

Can you patent a cryptographic scheme based on an scheme/idea that was previously patented but lacks of patent nowadays, considering that this scheme is a modification of the original one?

I just don't want to hit a barrier considering this option. I'd like everyone to read and study the presented schemes, so I can still contribute onward with the community I've always thought that patenting make your idea less interesting or restrictive because you can't disclose any technical secret related to it, but maybe I'm wrong because I'm lacking of information. Thanks in advance.
But advices received from partners and relatives encouraged me to experiment with the idea. I know that some schemes were patented in their beginning: DH, RSA, DES, NTRU, some schemes on ECC.


Note that there is considerable reluctance in significant parts of the community to use any algorithm with any intellectual property claims.  If you patent your algorithm, that pretty much guarantees that no one will use it, unless (or even if) it has very significant advantages over unburdened algorithms. For example, (EC)DSA has extra operations in it to avoid a (now expired) patent. DSA itself was introduced partly due to concerns over patents on RSA. OCB is virtually unused largely because of patents which led to the adoption of the slower CCM. Patents delayed the adoption of elliptic-curve cryptography.

However, to address your questions (and while I am not a lawyer, I do have some familiarity with how patent law works):


  Can you patent a cryptographic scheme and publish a paper opening your method entirely, which is descriptive enough, so its security can be analyzed by the cryptographic community? Could I provide an implementation of the scheme?


Absolutely; a patent (or a pending patent) does not rely on the secrecy of the invention (unlike, say, a trade secret); in fact, the entire point of the patent process is to give you an incentive to publish your invention (by giving you a monopoly on it for a limited period of time).  On the other hand, you have to do things in the correct order.  In the US, you have a year after publishing your invention to file for a patent; in Europe (and, AFAIK, the rest of the world), you don't have any grace period - once you've published, you can't file for a patent.


  Can you patent a cryptographic scheme based on an scheme/idea that was previously patented but lacks of patent nowadays, considering that this scheme is a modification of the original one?


You can, if the modification doesn't itself have prior art, and is sufficiently nonobvious to one "skilled in the art" (and, yes, that is a rather nebulous criteria).


  I've always thought that patenting make your idea less interesting or restrictive because you can't disclose any technical secret related to it, but maybe I'm wrong because I'm lacking of information.


No, after you file for your patent, you can disclose any details you want.  What makes your idea less interesting to other people is that they're concerned about the legal ramifications of using your idea (and you possibly taking them to court for patent infringement).  Now, if you release your patent for general use, that's no longer an issue for them; however it begs the question "why did you file for a patent in the first place?"