Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The SPKAC ASN.1 description:

PublicKeyAndChallenge ::= SEQUENCE {
    spki SubjectPublicKeyInfo,
    challenge IA5STRING

SignedPublicKeyAndChallenge ::= SEQUENCE {
    publicKeyAndChallenge PublicKeyAndChallenge,
    signatureAlgorithm AlgorithmIdentifier,
    signature BIT STRING

What's the point of the challenge string?

share|improve this question
I'm not familiar with this protocol, but usually challenge strings prevent replay attacks. – CodesInChaos Dec 16 '12 at 16:03
up vote 0 down vote accepted

From the OpenSSL documentation on the subject:

The challenge string permits a primitive form of proof of possession of private key. By checking the SPKAC signature and a random challenge string some guarantee is given that the user knows the private key corresponding to the public key being certified. This is important in some applications. Without this it is possible for a previous SPKAC to be used in a "replay attack".

share|improve this answer
To expand on tylerl's answer the following is a use case. 1. HTML5 KeyGen element generates private key, derives public key, prompts for user challenge and encodes new SPKAC which is sent to server. 2. Server registers challenge, uses SPKAC to generate new CSR. 3. Once CA signs CSR (created from initial SPKAC), the PEM formatted certificate is pushed back to client. 4. Following/subsequent visits to server (when configured to perform 'certificate based authentication') can be used for authentication. This is where a relay may be implemented and the challenge can be used to prevent it. – jas- Mar 31 '14 at 13:46

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.