# Maximum number of certificates generated by a CA

What is the maximum number of certificates that can be generated from a CA?

The use case is a VPN using certificate authentication and I would like to know what is the theoretical number of unique certificates that I can issue.

## migrated from crypto.stackexchange.comJan 31 at 21:28

This question came from our site for software developers, mathematicians and others interested in cryptography.

• The question is not fully clear: are you asking how much certificates can be issued directly by a single CA certificate (limited by range of serial numbers) or are you asking how much certificates can be issued by a specific CA. Since the CA can have multiple intermediate certificates which then can be used to issue the leaf certificates the number in the latter case is practically unlimited. – Steffen Ullrich Feb 1 at 5:50

RFC 5280 states that "Certificate users MUST be able to handle serialNumber values up to 20 octets. Conforming CAs MUST NOT use serialNumber values longer than 20 octets." Of course one doesn't have to conform...

Edit: an octet is 8 bits so if you have 20 octets that's 160 bits...for binary we have base 2 bits => 2^160 = 1.4615016e+48 AKA a really really big number...

• For scale, this is approximately (within a few orders of magntitude!) the number of atoms in the Earth. – dave_thompson_085 Feb 1 at 7:57

What is the maximum number of certificates that can be generated from a CA?

There is no theoretical limit really.

A private key can be used to generate an almost infinite amount of signatures. Furthermore, the certificate must be unique for each issuer / serial pair. However, with a serial number consisting of a maximum of 20 bytes, the amount of unique pairs is near infinite, even if the serial number is randomly generated (which is less common in itself, commonly it is a counter encoded as a statically sized, big integer, positive number).

Of course, there must be some way of checking if the request for the certificate itself can be trusted. For TLS protected sites this commonly involves checking that the site name really belongs to the requester, but this may be more tricky if IP or IP ranges are targeted. Furthermore, I guess that CRL's and / or databases to keep certificate status through OCSP are not unlimited. So there may certainly be more practical limits to what a CA can do.

And finally, if you obtain the CA software from a commercial party you may want to make sure you don't run out of money when generating a whole bunch of certificates :)

• Ah, now my answer was 3/4th done before DarkMatter updated his answer. Oh well, posted it anyway... – Maarten Bodewes Jan 31 at 22:10
• Sorry :) I updated it in response to your comment. After I saw the comment disappear I figured you were typing up your own answer but I had already submitted the edit at that point :/ – DarkMatter Jan 31 at 22:29