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:

MIICQDCCASgwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCXZtZkfOZOvCaMGVeFqCyhZdvs1NAP2+SwgE7Bz+JxSqVVkPAF+vyQ6dUvUNv2xtgeXnKt5Vz6lO8CoF3W9lsdKjLZWAPYfnAbjmoXHGFFY5uxFCyLUZAi+wrPmH2yorzJDTLC07hAfxb3XFRX6OSCYKUnF4L1g+5PtCxkQGaQ0Nd8K9GWffzAw915H7zsADB4TqK4vkyOItJ5RXaI+G+l9rb7yQeK6cd7P6OaIpWJctErv6m/BIlTuMOtYlZig29VWqc/0/J++QS49pbNrKULf+2GUheQ1JleA9wzy5ECUfkfboU0NoZt1Co9MSOJ0J+dSND4zs09kFNawFF1bXtHAgMBAAEWADANBgkqhkiG9w0BAQQFAAOCAQEAJwemsDE/5s3cYTv72sZ4ScKfxw0ROorxcmmmml3v1o9kepCirI9DmNlGWk5yVaAfP647YkLVF8xitdqr0c2ixboihoPsYuQH7h5CLFWv42SKddH5QzsfM/3JVwvxDw38v6kgWNcl1kTiz/1vXZZYBasjfmuosW4IGtZYS/JY6Zjq11BFi8dBvzGEyKu6eppssDZRJ/JGPuTudWiZqsVhxyW6pdz8weHpEBnUAFUdyGOyKJj5BqTRyuYbo/VKNxdcIo1Grs1VW2rD+0iEFv9Pwz4WEMZt9QSCiQkP2cIKsSrvpR5/6a8JA7fXndf6cEVJOgS1r+ewx9f3KJhuqbwJsA==

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.

Question

  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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.