I'm working on a project using a trusted-peer setup. I want a way to uniquely identify each actor in the system, ideally across certificate re-issues as well.

In my understanding, the modulus of a TLS cert uniquely identifies the client, and should not change when the cert is re-issued. The only thing that would change the modulus would be if the private key were compromised and therefore changed. Is this correct?

EDIT: also, is it correct to assume there is a 1:1 mapping between private keys and moduli?

  • The modulus is not the unique value, the private key is the unique value. – RoraΖ Jul 9 '15 at 13:56

If we are talking about RSA, then the public key is, nominally, the combination of:

  • The modulus n
  • The public exponent e

while the private key is the knowledge of the prime factors of n (traditionally, n is the product of two prime factors p and q of similar size). Formally, the private key is really the combination of the modulus and the private exponent d, but if you know n, e and d then you can recompute the factors p and q.

Therefore, if two distinct public keys share the same modulus (hence the same factors), then they have the "same" private key, in the sense that anybody who knows the private key for one of the public keys also knows the private key for the other public key. Thus, the two keys are "the same" or at least correspond to the same private knowledge.

So you can, indeed, claim that the RSA modulus alone uniquely identifies a private key, hence (presumably) a private key owner.

However, you must take care that while a private key is normally known to a single owner (otherwise it is not really "private"), a single person may perfectly own several key pairs. In particular, when a certificate is "re-issued", this really is a brand new certificate, which may or may not contain the same key. This depends on the CA procedures: some will reissue certificates with the same public key, while some others will insist on the generation of a new key pair. You cannot reliably assume that when a server "renews" its certificate, the new certificate will include the same public key.

Also, the notion of "modulus" is specific to RSA, and does not apply to other pubic key types, in particular EC keys (used e.g. for ECDSA). If you want to identify things by public key, you are encouraged to simply use the whole public key, as encoded in the certificate.

  • You wrote: "some others will insist on the generation of a new key pair." Cool. I didn't know that. Can you name one such CA? Have you got a link handy? – StackzOfZtuff Jul 9 '15 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.