I am learning TLS protocol and I don't like one moment. A moment of CSR creating. Why is it encoded? What encoding does it use? And the biggest question is "Why a CSR-creating command requires a private key?" Isn't it a security breach?
The typical command is:
openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privatekey.key
Where "CSR.csr" is CSR-request and "privatekey.key" is my private key.
All I found in Google is "it is made for practical reasons". What reasons? It's very suspicious that my request for PUBLIC key publication requires my PRIVATE key for useless CSR encoding which contains just only my data and public key and which can be decoded by everyone. It's too suspicious. I think this breach was made for Certificate Authority to somehow get a private key during decoding and than provide it to some interested persons.