A Root Signs Itself
A root certificate names itself as its issuer and carries its own signature, so the signature proves nothing about trust; a verifier trusts it only because it was put among the trusted roots.
The question
Every certificate is signed by its issuer. Who signs the first one, the root? It signs itself: the root's issuer is its own subject, and the signature is made with the key that the certificate names. If anyone can make such a certificate, what makes a root worth anything?
This lesson makes the root of the example chain with one command and looks at what the command does. The key is test material, a 512-bit RSA key, a toy size far too small to use; the same steps are used with 2048-bit keys and larger.
Work it by hand
The root of the example chain has the subject O=Example Test Lab, CN=Example Test Root CA, and the issuer is the same name, byte for byte. Its first part holds the public key; its last part is a signature made with the matching private key, 64 bytes for a 512-bit key. The whole certificate is 427 bytes.
Anyone holding a key can make such a certificate, so the signature adds nothing. A verifier trusts this certificate only if it is in its list of trusted roots, which someone put there; that choice, not the signature, is the trust.
The extensions of the command say what the key may do: basic constraints with the CA flag set, so the key may sign certificates, and key usage with the two bits that allow it to sign certificates and revocation lists.
Run it
The demo is one command (lines 3 to 5): req -x509 -new -key in/root_key.txt -config in/conf.txt -sha256 ... makes the certificate. -x509 makes a certificate and not a request. The subject and the extensions are in the configuration text in/conf.txt; -set_serial 1 and the two dates are fixed so that the output is the same every time. The file out.pem is the certificate.
The kit does not allow an argument that starts with a slash, so the subject comes from the configuration and not from -subj. The result is identical to the file root.pem of the example chain, measured byte for byte.

Public test material, generated for this lesson. Never use it for anything real.
# Makes the root certificate from its key and the configuration.
# Check runs it with other keys in in/root_key.txt.
openssl req -x509 -new -key in/root_key.txt -config in/conf.txt -sha256 \
-set_serial 1 -not_before 20260101000000Z -not_after 20360101000000Z \
-out out.pem
{
"answer": "2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d494942707a43434156476741774942416749424154414e42676b71686b69473977304241517346414441364d526b77467759445651514b44424246654746740a6347786c4946526c63335167544746694d523077477759445651514444425246654746746347786c4946526c63335167556d39766443424451544165467730790a4e6a41784d4445774d4441774d4442614677307a4e6a41784d4445774d4441774d4442614d446f784754415842674e5642416f4d4545563459573177624755670a5647567a6443424d595749784854416242674e5642414d4d4645563459573177624755675647567a644342536232393049454e424d4677774451594a4b6f5a490a6876634e41514542425141445377417753414a42414b42315241734e34484944724f67574e62656d7a52676933375766504476744e357556697555382b4243470a4344384a4836376f68756c7552424b504d34665372617374415235394f6a55545a4a377144472b2f6d4438434177454141614e434d454177485159445652304f0a42425945464f334e415a3770365a77654a634c74476f7675564476742f62782f4d41384741315564457745422f7751464d414d424166387744675944565230500a4151482f42415144416745474d41304743537147534962334451454243775541413045415855467a4874552b79524d516e75436c494c573263687765713547440a527171674443306c664a4f734a4645456f546951575066567a35624f445668445254446e536d4335586146326172772f656755736179703962773d3d0a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a",
"file": "out.pem",
"bytes": 635
}You can change the key or the configuration. Without -set_serial the serial number is random and without the dates the time is the clock: the certificate is then different on every run.
Your turn
Write one command that makes a self-signed certificate from the key in in/key.txt and the configuration in in/conf.txt: serial number 1, notBefore 20260101000000Z, notAfter 20360101000000Z, signed with SHA-256, written to out.pem. The configuration fixes the subject and the extensions. The command below is a starting point. Check runs it with other keys in in/key.txt and on five others.

Public test material, generated for this lesson. Never use it for anything real.
# Writes the self-signed certificate to out.pem.
# Check runs it with other keys in in/key.txt.
openssl req -x509 -new -key in/key.txt -config in/conf.txt -sha256 \
-set_serial 2 -not_before 20260101000000Z -not_after 20360101000000Z \
-out out.pem
{
"answer": "2d2d2d2d2d424547494e2043455254494649434154452d2d2d2d2d0a4d4949427454434341562b674177494241674942416a414e42676b71686b69473977304241517346414442424d526b77467759445651514b44424246654746740a6347786c4946526c63335167544746694d535177496759445651514444427446654746746347786c4946526c63335167553256735a693154615764755a5751670a513045774868634e4d6a59774d5441784d4441774d4441775768634e4d7a59774d5441784d4441774d444177576a42424d526b77467759445651514b444242460a654746746347786c4946526c63335167544746694d535177496759445651514444427446654746746347786c4946526c63335167553256735a693154615764750a5a575167513045775844414e42676b71686b6947397730424151454641414e4c41444249416b4541747a4f58637a507234684b37676a654b575a37706c786b6d0a554f585761354a2b596557316d70693668534d69347669634248526d447a726976356b30584b366b4e396f494c6530454777444e673679503145756d737749440a415141426f3049775144416442674e56485134454667515559746a785a73535756634c59537135785a4276504435364c4b4a517744775944565230544151482f0a42415577417745422f7a414f42674e56485138424166384542414d43415159774451594a4b6f5a496876634e4151454c4251414451514350764c51336a5352610a717075396f384a3854366b4f51456b7965596e706d586455386a644b39545248482f4b5648486e374276316676735766416c4c6c4c38706e4b3630547870447a0a464e6335796b73614b344b710a2d2d2d2d2d454e442043455254494649434154452d2d2d2d2d0a",
"file": "out.pem",
"bytes": 652
}Write one openssl command that makes a self-signed certificate from the RSA key in in/key.txt, using the configuration in in/conf.txt (it fixes the subject and the extensions), with serial number 1, notBefore 20260101000000Z, notAfter 20360101000000Z and SHA-256, and writes it to out.pem in PEM form. Check runs your command with other keys in in/key.txt.
Read the result carefully
Measured with openssl verify -attime 1790000000 on the example chain: the root given as the trusted root and as the certificate to check gives OK; the same root given as a certificate to check against another trusted file fails with error 18 at 0 depth lookup: self-signed certificate. A self-signed certificate is accepted only as a trust anchor; why anchors are trusted is the subject of A Certificate Chain Trusts a Root.
A certificate authority here is a command line and a key file. The page does not describe how a real authority protects its key, checks who asks or is audited, and it does not call this chain secure.
Recap
- A root's issuer is its own subject, and it carries its own signature.
- Its signature proves nothing about trust: whoever holds a key can make one.
- A verifier trusts a root because it is in the list of trusted roots.
- Serial number and dates must be fixed in the command or the output differs on every run.