How is CSR encrypted?


Using openssl to generate a CSR:

> openssl req -newkey rsa:2048 -nodes -keyout key -out mycsr.csr 

It outputs the mycsr.csr file along with the key file.

The content of mycsr.csr:

-----BEGIN CERTIFICATE REQUEST----- MIICsDCCAZgCAQAwazELMAkGA1UEBhMCRUcxDjAMBgNVBAgMBUNhaXJvMREwDwYD VQQHDAhTaGVyYXRvbjEMMAoGA1UECgwDRm9vMQ4wDAYDVQQLDAVGb29JVDEbMBkG A1UEAwwSd3d3LmZvb2NvbXBhbnkuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A MIIBCgKCAQEA1nAiC9voU4s+sBDWuP8Mi99gdCN9hQviL2pagloOydCsqDRkGTeK nxqkK7xVE0EdgogMGUX1eVls7EYJI/6oQUjQR2rSKYaZoKm5eVntG8TST17SHUKm eFZlbsabb6scdsQ1765u5oG8iY/o5fM7WG1RU+MSq2bB+I68ogeY6n0oKK6sYZIH Wbrw7VSehgijXUpRuMNkZBbQXkvKqIG9rYxfIQ47O4hwPrFcO3aVAMop3ZvC/CiE mMtxJw+lfg29ArrQNbvNwrqWuo9MUEUXQk2YeTAJQUme9oaagbQR108GzUM/RAvk LxLt2gFLrD7N+FmfqOMngt99qQMJelUQiQIDAQABoAAwDQYJKoZIhvcNAQELBQAD ggEBAMuCpbBLXPCpRabJbdIW3stCPizuYYbkL0Y4vWJvdP0OWeyfc7jDsAtMeHgB qEaCAg6f4mwyMGAcY3JOKwzfiaCv4busj7S6qdV4q4+1iP7eCMyojrcmT0eVMN6G 9dPvkE82pNJvC4S7hZBDed3Wtwnol9UV5dGqsuRv1tb6WNBZU8+BLeb8NyeNJ5vl Kt5WMwCPLGfG99ghzzTjd/fGue0PJYeWH1x0piZb17Sw5RpZ8CQecUnPYffw+jun 6onLsao5jIXFzA/J1r089p9lM4Xvb3sWegB7SBK2yO4zlyH//R8iNn7JJsFv6JB4 OfhkNv9TAwOPncqPs5IHFddScdM= -----END CERTIFICATE REQUEST----- 

And to see the actual content:

> openssl req -text -noout -verify -in mycsr.csr  verify OK Certificate Request:     Data:         Version: 1 (0x0)         Subject: C = EG, ST = Cairo, L = Sheraton, O = Foo, OU = FooIT, CN = www.foocompany.com         Subject Public Key Info:             Public Key Algorithm: rsaEncryption                 RSA Public-Key: (2048 bit)                 Modulus:                     00:d6:70:22:0b:db:e8:53:8b:3e:b0:10:d6:b8:ff:                     0c:8b:df:60:74:23:7d:85:0b:e2:2f:6a:5a:82:5a:                     0e:c9:d0:ac:a8:34:64:19:37:8a:9f:1a:a4:2b:bc:                     55:13:41:1d:82:88:0c:19:45:f5:79:59:6c:ec:46:                     09:23:fe:a8:41:48:d0:47:6a:d2:29:86:99:a0:a9:                     b9:79:59:ed:1b:c4:d2:4f:5e:d2:1d:42:a6:78:56:                     65:6e:c6:9b:6f:ab:1c:76:c4:35:ef:ae:6e:e6:81:                     bc:89:8f:e8:e5:f3:3b:58:6d:51:53:e3:12:ab:66:                     c1:f8:8e:bc:a2:07:98:ea:7d:28:28:ae:ac:61:92:                     07:59:ba:f0:ed:54:9e:86:08:a3:5d:4a:51:b8:c3:                     64:64:16:d0:5e:4b:ca:a8:81:bd:ad:8c:5f:21:0e:                     3b:3b:88:70:3e:b1:5c:3b:76:95:00:ca:29:dd:9b:                     c2:fc:28:84:98:cb:71:27:0f:a5:7e:0d:bd:02:ba:                     d0:35:bb:cd:c2:ba:96:ba:8f:4c:50:45:17:42:4d:                     98:79:30:09:41:49:9e:f6:86:9a:81:b4:11:d7:4f:                     06:cd:43:3f:44:0b:e4:2f:12:ed:da:01:4b:ac:3e:                     cd:f8:59:9f:a8:e3:27:82:df:7d:a9:03:09:7a:55:                     10:89                 Exponent: 65537 (0x10001)         Attributes:             a0:00     Signature Algorithm: sha256WithRSAEncryption          cb:82:a5:b0:4b:5c:f0:a9:45:a6:c9:6d:d2:16:de:cb:42:3e:          2c:ee:61:86:e4:2f:46:38:bd:62:6f:74:fd:0e:59:ec:9f:73:          b8:c3:b0:0b:4c:78:78:01:a8:46:82:02:0e:9f:e2:6c:32:30:          60:1c:63:72:4e:2b:0c:df:89:a0:af:e1:bb:ac:8f:b4:ba:a9:          d5:78:ab:8f:b5:88:fe:de:08:cc:a8:8e:b7:26:4f:47:95:30:          de:86:f5:d3:ef:90:4f:36:a4:d2:6f:0b:84:bb:85:90:43:79:          dd:d6:b7:09:e8:97:d5:15:e5:d1:aa:b2:e4:6f:d6:d6:fa:58:          d0:59:53:cf:81:2d:e6:fc:37:27:8d:27:9b:e5:2a:de:56:33:          00:8f:2c:67:c6:f7:d8:21:cf:34:e3:77:f7:c6:b9:ed:0f:25:          87:96:1f:5c:74:a6:26:5b:d7:b4:b0:e5:1a:59:f0:24:1e:71:          49:cf:61:f7:f0:fa:3b:a7:ea:89:cb:b1:aa:39:8c:85:c5:cc:          0f:c9:d6:bd:3c:f6:9f:65:33:85:ef:6f:7b:16:7a:00:7b:48:          12:b6:c8:ee:33:97:21:ff:fd:1f:22:36:7e:c9:26:c1:6f:e8:          90:78:39:f8:64:36:ff:53:03:03:8f:9d:ca:8f:b3:92:07:15:          d7:52:71:d3 

How all these data got encoded (is this the right word?) in the base64 text? I’m not talking about the mathematical operations specifically, but using which techniques? is it encryption or hashing ..?

my definitions of:

Encryption: converting information into unreadable text using a key, the resulting text can be decrypted to the original text using the same key or another private key.

hashing: a one-way conversion of text into unreadable text.

signing: encrypting using the private key then hashing the resulting text.