While certificates are an example of public key cryptography, they also contain a lot more information that your library probably isn’t handling correctly, as it’s usually used for x.509-based operations. You can generate your own keypairs whenever you want with the command ssh-keygen -t rsa and follow the prompts.
Now, an important side note. If you are implementing a production system that is protecting confidential information - do not attempt to roll your own cryptography. There are hundreds of small things you can do wrong that leak information and completely break any security in quite insidious ways. You should always use an established and well-vetted library to handle these things. You might be already, we can’t know with the information given, but if what you’re building is going to protect real user information you should be aware of this.
Ok maybe you’re right, I have 2 weeks ahead me to build a complete project and find a way to secure my http request, so I’m stressed and confuse I have to find a quick and easy library as soon as possible, do you have a recommendation ?
(1) Posting part of a private key is still a problem, both because the privkey.pem stores multiple secrets, any one of which may be enough to compromise the key, and because Nadia Heninger has devised mathematical techniques for reconstructing a full private RSA key from a partial key.
(2) As @jared.m notes, implementing your own cryptosystem from scratch is not a recipe for good security. There are tons of pitfalls that are not at all obvious. The "Cryptopals" series of challenges highlights this by having you break realistic encryption implementations because of extraordinarily subtle flaws.
(3) I think we still haven't understood what you're looking to accomplish and why. If you want to protect network connections over the Internet, you can use the existing TLS implementations on your system with your Let's Encrypt certificate and you don't have to write any of your own encryption code. If you want to protect some other information in some other way, as @jared.m said, there's no need to use Let's Encrypt at all.