When creating a Certificate Signing Request (CSR), the public key is embedded directly into the request in plaintext. The CSR includes various fields, such as the subject's distinguished name and the public key, without any encryption or ciphertext involved.
The CSR is typically encoded in a specific format, such as PEM (Privacy-Enhanced Mail) or DER (Distinguished Encoding Rules), to facilitate transmission and storage. These encoding formats are used to represent the binary data of the CSR in a readable form, often using Base64 encoding. This encoding ensures that the CSR can be safely transmitted over text-based protocols like email or included in configuration files.
It's important to note that while the public key is included in the CSR in plaintext, the private key is not part of the CSR and should remain confidential. The private key is used to sign the CSR, providing proof of ownership of the public key, but it is not transmitted or included in the CSR itself.
In summary, the public key is included in the CSR in plaintext and encoded in a specific format for transmission and storage, while the private key remains confidential and is not part of the CSR.