Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I'm investigating the HTML5 attribute Keygen and discovered that it sends this data on a Form POST to the server. Here is an example POST:


When I parse this using an ASN.1 parser it contains

  • A RSA key (oid 1.2.840.113549.1.1.1),
  • A MD5 hash (oid 1.2.840.113549.1.1.4)
  • A 2048 bit string which is the signature.

Further investigation reveals this is likely called the Signed Public Key and Challenge (SPKAC) format and this format is accepted by the Microsoft CA server.


  1. The keygen docs at Mozilla, and the keygen docs at w3 don't specify a return format after the POST. What should I return?
  2. After keygen is run, (see links at the bottom of this page) I don't see a certificate in my local store. Where is it?
  3. My understanding is that Keygen is used to create a Browser Certificate. What logical steps do I need to complete in order to finish this process?
share|improve this question

1 Answer 1

It seems that the answer lies in the updated w3 link I just found. Specifically

This specification does not specify how the private key generated is to be used. It is expected that after receiving the SignedPublicKeyAndChallenge (SPKAC) structure, the server will generate a client certificate and offer it back to the user for download; this certificate, once downloaded and stored in the key store along with the private key, can then be used to authenticate to services that use TLS and certificate authentication.

The process of saving the certificate into the local store is up to each browser. (IE uses the Windows store, some other browsers have their own private store)

Validation of the browser certificate would involve verifying the CA chain matches the internal CA root, and associating the browser cert with the user.

If the application is designed to permit the user to have multiple certificates for a single account, then this many to one relationship should be tracked on a per user basis. (This is useful if mutual authentication of the TLS session is considered the primary feature of Browser Certificates, and forms based (even multifactor) authentication is done in addition to this)

share|improve this answer
Also this may be helpful: lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/… –  fatfredyy Jan 3 '13 at 13:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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