RFC2510 - Internet X.509 Public Key Infrastructure Certifica(2)

时间:2005-02-16 来源: 作者: 点击:
the end entity must generate a symmetric key based on its private DH key value and the DH public key of the recipient of the PKI message. PKIProtection will contain a MAC value keyed with this derive
  
the end entity must generate a symmetric key based on its private DH
key value and the DH public key of the recipient of the PKI message.
PKIProtection will contain a MAC value keyed with this derived
symmetric key and the protectionAlg will be the following:

DHBasedMac ::= OBJECT IDENTIFIER --{1 2 840 113533 7 66 30}

DHBMParameter ::= SEQUENCE {
owf AlgorithmIdentifier,
-- AlgId for a One-Way Function (SHA-1 recommended)
mac AlgorithmIdentifier
-- the MAC AlgId (e.g., DES-MAC, Triple-DES-MAC [PKCS11],
} -- or HMAC [RFC2104, RFC2202])

In the above protectionAlg OWF is applied to the result of the
Diffie-Hellman computation. The OWF output (called "BASEKEY" for ease
of reference, with a size of "H") is what is used to form the
symmetric key. If the MAC algorithm requires a K-bit key and K <= H,
then the most significant K bits of BASEKEY are used. If K > H, then
all of BASEKEY is used for the most significant H bits of the key,
OWF("1" || BASEKEY) is used for the next most significant H bits of
the key, OWF("2" || BASEKEY) is used for the next most significant H
bits of the key, and so on, until all K bits have been derived. [Here
"N" is the ASCII byte encoding the number N and "||" represents
concatenation.]

- signature

Where the sender possesses a signature key pair it may simply sign
the PKI message. PKIProtection will contain the signature value and
the protectionAlg will be an AlgorithmIdentifier for a digital
signature (e.g., md5WithRSAEncryption or dsaWithSha-1).

- multiple protection

In cases where an end entity sends a protected PKI message to an RA,
the RA MAY forward that message to a CA, attaching its own protection
(which MAY be a MAC or a signature, depending on the information and
certificates shared between the RA and the CA). This is accomplished
by nesting the entire message sent by the end entity within a new PKI
message. The structure used is as follows.

NestedMessageContent ::= PKIMessage

3.2 Common Data Structures

Before specifying the specific types that may be placed in a PKIBody
we define some data structures that are used in more than one case.

3.2.1 Requested Certificate Contents

Various PKI management messages require that the originator of the
message indicate some of the fields that are required to be present
in a certificate. The CertTemplate structure allows an end entity or
RA to specify as much as it wishes about the certificate it requires.
CertTemplate is identical to a Certificate but with all fields
optional.

Note that even if the originator completely specifies the contents of
a certificate it requires, a CA is free to modify fields within the
certificate actually issued. If the modified certificate is
unacceptable to the requester, the Confirmation message may be
withheld, or an Error Message may be sent (with a PKIStatus of
"rejection").

See [CRMF] for CertTemplate syntax.

3.2.2 Encrypted Values

Where encrypted values (restricted, in this specification, to be
either private keys or certificates) are sent in PKI messages the
EncryptedValue data structure is used.

See [CRMF] for EncryptedValue syntax.

Use of this data structure requires that the creator and intended
recipient respectively be able to encrypt and decrypt. Typically,
this will mean that the sender and recipient have, or are able to
generate, a shared secret key.

If the recipient of the PKIMessage already possesses a private key
usable for decryption, then the encSymmKey field MAY contain a
session key encrypted using the recipient's public key.

3.2.3 Status codes and Failure Information for PKI messages

All response messages will include some status information. The
following values are defined.

PKIStatus ::= INTEGER {
granted (0),
-- you got exactly what you asked for
grantedWithMods (1),
-- you got something like what you asked for; the
-- requester is responsible for ascertaining the differences
rejection (2),
-- you don't get it, more information elsewhere in the message

waiting (3),
-- the request body part has not yet been processed,
-- expect to hear more later
revocationWarning (4),
-- this message contains a warning that a revocation is
-- imminent
revocationNotification (5),
-- notification that a revocation has occurred
keyUpdateWarning (6)
-- update already done for the oldCertId specified in
-- the key update request message
}

Responders may use the following syntax to provide more information
about failure cases.

PKIFailureInfo ::= BIT STRING {
-- since we can fail in more than one way!
-- More codes may be added in the future if/when required.
badAlg (0),
-- unrecognized or unsupported Algorithm Identifier
badMessageCheck (1),
-- integrity check failed (e.g., signature did not verify)
badRequest (2),
-- transaction not permitted or supported
badTime (3),
-- messageTime was not sufficiently close to the system time,
-- as defined by local policy
badCertId (4),
-- no certificate could be found matching the provided criteria
badDataFormat (5),
-- the data submitted has the wrong format
wrongAuthority (6),
-- the authority indicated in the request is different from the
-- one creating the response token
incorrectData (7),
-- the requester's data is incorrect (used for notary services)
missingTimeStamp (8),
-- when the timestamp is missing but should be there (by policy)
badPOP (9)
-- the proof-of-possession failed
}
PKIStatusInfo ::= SEQUENCE {
status PKIStatus,
statusString PKIFreeText OPTIONAL,
failInfo PKIFailureInfo OPTIONAL
}

3.2.4 Certificate Identification

In order to identify particular certificates the CertId data
structure is used.

See [CRMF] for CertId syntax.

3.2.5 "Out-of-band" root CA public key

Each root CA must be able to publish its current public key via some
"out-of-band" means. While such mechanisms are beyond the scope of
this document, we define data structures which can support such
mechanisms.

There are generally two methods available: either the CA directly
publishes its self-signed certificate; or this information is
available via the Directory (or equivalent) and the CA publishes a
hash of this value to allow verification of its integrity before use.

OOBCert ::= Certificate

The fields within this certificate are restricted as follows:

- The certificate MUST be self-signed (i.e., the signature must be
verifiable using the SubjectPublicKeyInfo field);
- The subject and issuer fields MUST be identical;
- If the subject field is NULL then both subjectAltNames and
issuerAltNames extensions MUST be present and have exactly the same
value;
- The values of all other extensions must be suitable for a self-
signed certificate (e.g., key identifiers for subject and issuer
must be the same).

OOBCertHash ::= SEQUENCE {
hashAlg [0] AlgorithmIdentifier OPTIONAL,
certId [1] CertId OPTIONAL,
hashVal BIT STRING
-- hashVal is calculated over the self-signed
-- certificate with the identifier certID.
}

The intention of the hash value is that anyone who has securely
received the hash value (via the out-of-band means) can verify a
self- signed certificate for that CA.

3.2.6 Archive Options

Requesters may indicate that they wish the PKI to archive a private
key value using the PKIArchiveOptions structure

See [CRMF] for PKIArchiveOptions syntax.

3.2.7 Publication Information

Requesters may indicate that they wish the PKI to publish a
certificate using the PKIPublicationInfo structure.

See [CRMF] for PKIPublicationInfo syntax.

3.2.8 Proof-of-Possession Structures

If the certification request is for a signing key pair (i.e., a
request for a verification certificate), then the proof of possession
of the private signing key is demonstrated through use of the
POPOSigningKey structure.

See [CRMF] for POPOSigningKey syntax, but note that
POPOSigningKeyInput has the following semantic stipulations in this
specification.

POPOSigningKeyInput ::= SEQUENCE {
authInfo CHOICE {
sender [0] GeneralName,
-- from PKIHeader (used only if an authenticated identity
-- has been established for the sender (e.g., a DN from a
-- previously-issued and currently-valid certificate))
publicKeyMAC [1] PKMACValue
-- used if no authenticated GeneralName currently exists for
-- the sender; publicKeyMAC contains a password-based MAC
-- (using the protectionAlg AlgId from PKIHeader) on the
-- DER-encoded value of publicKey
},
publicKey SubjectPublicKeyInfo -- from CertTemplate
}

On the other hand, if the certification request is for an encryption
key pair (i.e., a request for an encryption certificate), then the
proof of possession of the private decryption key may be demonstrated
in one of three ways.

1) By the inclusion of the private key (encrypted) in the
CertRequest (in the PKIArchiveOptions control structure).

2) By having the CA return not the certificate, but an encrypted
certificate (i.e., the certificate encrypted under a randomly-
generated symmetric key, and the symmetric key encrypted under
the public key for which the certification request is being
made) -- this is the "indirect" method mentioned previously in
Section 2.3.2. The end entity proves knowledge of the private
decryption key to the CA by MACing the PKIConfirm message using
a key derived from this symmetric key. [Note that if more than
one CertReqMsg is included in the PKIMessage, then the CA uses
a different symmetric key for each CertReqMsg and the MAC uses
a key derived from the concatenation of all these keys.] The
MACing procedure uses the PasswordBasedMac AlgId defined in
Section 3.1.

3) By having the end entity engage in a challenge-response
protocol (using the messages POPODecKeyChall and
POPODecKeyResp; see below) between CertReqMessages and
CertRepMessage -- this is the "direct" method mentioned
previously in Section 2.3.2. [This method would typically be
used in an environment in which an RA verifies POP and then
makes a certification request to the CA on behalf of the end
entity. In such a scenario, the CA trusts the RA to have done
POP correctly before the RA requests a certificate for the end
entity.] The complete protocol then looks as follows (note
that req' does not necessarily encapsulate req as a nested
message):

EE RA CA
---- req ---->
<--- chall ---
---- resp --->
---- req' --->
<--- rep -----
---- conf --->
<--- rep -----
---- conf --->

This protocol is obviously much longer than the 3-way exchange given
in choice (2) above, but allows a local Registration Authority to be
involved and has the property that the certificate itself is not
actually created until the proof of possession is complete.

If the cert. request is for a key agreement key (KAK) pair, then the
POP can use any of the 3 ways described above for enc. key pairs,
with the following changes: (1) the parenthetical text of bullet 2)
is replaced with "(i.e., the certificate encrypted under the
symmetric key derived from the CA's private KAK and the public key
for which the certification request is being made)"; (2) the first

parenthetical text of the challenge field of "Challenge" below is
replaced with "(using PreferredSymmAlg (see Appendix B6) and a
symmetric key derived from the CA's private KAK and the public key
for which the certification request is being made)". Alternatively,
the POP can use the POPOSigningKey structure given in [CRMF] (where
the alg field is DHBasedMAC and the signature field is the MAC) as a
fourth alternative for demonstrating POP if the CA already has a D-H
certificate that is known to the EE.

The challenge-response messages for proof of possession of a private
decryption key are specified as follows (see [MvOV97, p.404] for
details). Note that this challenge-response exchange is associated
with the preceding cert. request message (and subsequent cert.
response and confirmation messages) by the nonces used in the
PKIHeader and by the protection (MACing or signing) applied to the
PKIMessage.

POPODecKeyChallContent ::= SEQUENCE OF Challenge
-- One Challenge per encryption key certification request (in the
-- same order as these requests appear in CertReqMessages).

Challenge ::= SEQUENCE {
owf AlgorithmIdentifier OPTIONAL,
-- MUST be present in the first Challenge; MAY be omitted in any
-- subsequent Challenge in POPODecKeyChallContent (if omitted,
-- then the owf used in the immediately preceding Challenge is
-- to be used).
witness OCTET STRING,
-- the result of applying the one-way function (owf) to a
-- randomly-generated INTEGER, A. [Note that a different
-- INTEGER MUST be used for each Challenge.]
challenge OCTET STRING
-- the encryption (under the public key for which the cert.
-- request is being made) of Rand, where Rand is specified as
-- Rand ::= SEQUENCE {
-- int INTEGER,
-- - the randomly-generated INTEGER A (above)
-- sender GeneralName
-- - the sender's name (as included in PKIHeader)
-- }
}

POPODecKeyRespContent ::= SEQUENCE OF INTEGER
-- One INTEGER per encryption key certification request (in the
-- same order as these requests appear in CertReqMessages). The
-- retrieved INTEGER A (above) is returned to the sender of the
-- corresponding Challenge.

3.3 Operation-Specific Data Structures

3.3.1 Initialization Request

An Initialization request message contains as the PKIBody an
CertReqMessages data structure which specifies the requested
certificate(s). Typically, SubjectPublicKeyInfo, KeyId, and Validity
are the template fields which may be supplied for each certificate
requested (see Appendix B profiles for further information). This
message is intended to be used for entities first initializing into
the PKI.

See [CRMF] for CertReqMessages syntax.

3.3.2 Initialization Response

An Initialization response message contains as the PKIBody an
CertRepMessage data structure which has for each certificate
requested a PKIStatusInfo field, a subject certificate, and possibly
a private key (normally encrypted with a session key, which is itself
encrypted with the protocolEncKey).

See Section 3.3.4 for CertRepMessage syntax. Note that if the PKI
Message Protection is "shared secret information" (see Section
3.1.3), then any certificate transported in the caPubs field may be
directly trusted as a root CA certificate by the initiator.

3.3.3 Registration/Certification Request

A Registration/Certification request message contains as the PKIBody
a CertReqMessages data structure which specifies the requested
certificates. This message is intended to be used for existing PKI
entities who wish to obtain additional certificates.

See [CRMF] for CertReqMessages syntax.

Alternatively, the PKIBody MAY be a CertificationRequest (this
structure is fully specified by the ASN.1 structure
CertificationRequest given in [PKCS10]). This structure may be
required for certificate requests for signing key pairs when
interoperation with legacy systems is desired, but its use is
strongly discouraged whenever not absolutely necessary.

3.3.4 Registration/Certification Response

A registration response message contains as the PKIBody a
CertRepMessage data structure which has a status value for each
certificate requested, and optionally has a CA public key, failure
information, a subject certificate, and an encrypted private key.

CertRepMessage ::= SEQUENCE {
caPubs [1] SEQUENCE SIZE (1..MAX) OF Certificate OPTIONAL,
response SEQUENCE OF CertResponse
}

CertResponse ::= SEQUENCE {
certReqId INTEGER,
-- to match this response with corresponding request (a value
-- of -1 is to be used if certReqId is not specified in the
-- corresponding request)
status PKIStatusInfo,
certifiedKeyPair CertifiedKeyPair OPTIONAL,
rspInfo OCTET STRING OPTIONAL
-- analogous to the id-regInfo-asciiPairs OCTET STRING defined
-- for regInfo in CertReqMsg [CRMF]
}

CertifiedKeyPair ::= SEQUENCE {
certOrEncCert CertOrEncCert,
privateKey [0] EncryptedValue OPTIONAL,
publicationInfo [1] PKIPublicationInfo OPTIONAL
}

CertOrEncCert ::= CHOICE {
certificate [0] Certificate,
encryptedCert [1] EncryptedValue
}

Only one of the failInfo (in PKIStatusInfo) and certificate (in
CertifiedKeyPair) fields can be present in each CertResponse
(depending on the status). For some status values (e.g., waiting)
neither of the optional fields will be present.

Given an EncryptedCert and the relevant decryption key the
certificate may be obtained. The purpose of this is to allow a CA to
return the value of a certificate, but with the constraint that only
the intended recipient can obtain the actual certificate. The benefit
of this approach is that a CA may reply with a certificate even in
the absence of a proof that the requester is the end entity which can
use the relevant private key (note that the proof is not obtained

until the PKIConfirm message is received by the CA). Thus the CA will
not have to revoke that certificate in the event that something goes
wrong with the proof of possession.

3.3.5 Key update request content

For key update requests the CertReqMessages syntax is used.
Typically, SubjectPublicKeyInfo, KeyId, and Validity are the template
fields which may be supplied for each key to be updated. This
message is intended to be used to request updates to existing (non-
revoked and non-expired) certificates.

See [CRMF] for CertReqMessages syntax.

3.3.6 Key Update response content

For key update responses the CertRepMessage syntax is used. The
response is identical to the initialization response.

See Section 3.3.4 for CertRepMessage syntax.

3.3.7 Key Recovery Request content

For key recovery requests the syntax used is identical to the
initialization request CertReqMessages. Typically,
SubjectPublicKeyInfo and KeyId are the template fields which may be
used to supply a signature public key for which a certificate is
required (see Appendix B profiles for further information).

See [CRMF] for CertReqMessages syntax. Note that if a key history is
required, the requester must supply a Protocol Encryption Key control
in the request message.

3.3.8 Key recovery response content

For key recovery responses the following syntax is used. For some
status values (e.g., waiting) none of the optional fields will be
present.

KeyRecRepContent ::= SEQUENCE {
status PKIStatusInfo,
newSigCert [0] Certificate OPTIONAL,
caCerts [1] SEQUENCE SIZE (1..MAX) OF
Certificate OPTIONAL,
keyPairHist [2] SEQUENCE SIZE (1..MAX) OF
CertifiedKeyPair OPTIONAL
}

3.3.9 Revocation Request Content

When requesting revocation of a certificate (or several certificates)
the following data structure is used. The name of the requester is
present in the PKIHeader structure.

RevReqContent ::= SEQUENCE OF RevDetails

RevDetails ::= SEQUENCE {
certDetails CertTemplate,
-- allows requester to specify as much as they can about
-- the cert. for which revocation is requested
-- (e.g., for cases in which serialNumber is not available)
revocationReason ReasonFlags OPTIONAL,
-- the reason that revocation is requested
badSinceDate GeneralizedTime OPTIONAL,
-- indicates best knowledge of sender
crlEntryDetails Extensions OPTIONAL
-- requested crlEntryExtensions
}

3.3.10 Revocation Response Content

The response to the above message. If produced, this is sent to the
requester of the revocation. (A separate revocation announcement
message MAY be sent to the subject of the certificate for which
revocation was requested.)

RevRepContent ::= SEQUENCE {
status SEQUENCE SIZE (1..MAX) OF PKIStatusInfo,
-- in same order as was sent in RevReqContent
revCerts [0] SEQUENCE SIZE (1..MAX) OF CertId OPTIONAL,
-- IDs for which revocation was requested (same order as status)
crls [1] SEQUENCE SIZE (1..MAX) OF CertificateList OPTIONAL
-- the resulting CRLs (there may be more than one)
}

3.3.11 Cross certification request content

Cross certification requests use the same syntax (CertReqMessages) as
for normal certification requests with the restriction that the key
pair MUST have been generated by the requesting CA and the private
key MUST NOT be sent to the responding CA.

See [CRMF] for CertReqMessages syntax.

3.3.12 Cross certification response content

Cross certification responses use the same syntax (CertRepMessage) as
for normal certification responses with the restriction that no
encrypted private key can be sent.

See Section 3.3.4 for CertRepMessage syntax.

3.3.13 CA Key Update Announcement content

When a CA updates its own key pair the following data structure MAY
be used to announce this event.

CAKeyUpdAnnContent ::= SEQUENCE {
oldWithNew Certificate, -- old pub signed with new priv
newWithOld Certificate, -- new pub signed with old priv
newWithNew Certificate -- new pub signed with new priv
}

3.3.14 Certificate Announcement

This structure MAY be used to announce the existence of certificates.

Note that this message is intended to be used for those cases (if
any) where there is no pre-existing method for publication of
certificates; it is not intended to be used where, for example, X.500
is the method for publication of certificates.

CertAnnContent ::= Certificate

3.3.15 Revocation Announcement

When a CA has revoked, or is about to revoke, a particular
certificate it MAY issue an announcement of this (possibly upcoming)
event.

RevAnnContent ::= SEQUENCE {
status PKIStatus,
certId CertId,
willBeRevokedAt GeneralizedTime,
badSinceDate GeneralizedTime,
crlDetails Extensions OPTIONAL
-- extra CRL details(e.g., crl number, reason, location, etc.)
}

A CA MAY use such an announcement to warn (or notify) a subject that
its certificate is about to be (or has been) revoked. This would
typically be used where the request for revocation did not come from
the subject concerned.

The willBeRevokedAt field contains the time at which a new entry will
be added to the relevant CRLs.

3.3.16 CRL Announcement

When a CA issues a new CRL (or set of CRLs) the following data
structure MAY be used to announce this event.

CRLAnnContent ::= SEQUENCE OF CertificateList

3.3.17 PKI Confirmation content

This data structure is used in three-way protocols as the final
PKIMessage. Its content is the same in all cases - actually there is
no content since the PKIHeader carries all the required information.

PKIConfirmContent ::= NULL

3.3.18 PKI General Message content

InfoTypeAndValue ::= SEQUENCE {
infoType OBJECT IDENTIFIER,
infoValue ANY DEFINED BY infoType OPTIONAL
}
-- Example InfoTypeAndValue contents include, but are not limited to:
-- { CAProtEncCert = {id-it 1}, Certificate }
-- { SignKeyPairTypes = {id-it 2}, SEQUENCE OF AlgorithmIdentifier }
-- { EncKeyPairTypes = {id-it 3}, SEQUENCE OF AlgorithmIdentifier }
-- { PreferredSymmAlg = {id-it 4}, AlgorithmIdentifier }
-- { CAKeyUpdateInfo = {id-it 5}, CAKeyUpdAnnContent }
-- { CurrentCRL = {id-it 6}, CertificateList }
-- where {id-it} = {id-pkix 4} = {1 3 6 1 5 5 7 4}
-- This construct MAY also be used to define new PKIX Certificate
-- Management Protocol request and response messages, or general-
-- purpose (e.g., announcement) messages for future needs or for
-- specific environments.

GenMsgContent ::= SEQUENCE OF InfoTypeAndValue
-- May be sent by EE, RA, or CA (depending on message content).
-- The OPTIONAL infoValue parameter of InfoTypeAndValue will typically
-- be omitted for some of the examples given above. The receiver is

-- free to ignore any contained OBJ. IDs that it does not recognize.
-- If sent from EE to CA, the empty set indicates that the CA may send
-- any/all information that it wishes.

3.3.19 PKI General Response content

GenRepContent ::= SEQUENCE OF InfoTypeAndValue
-- The receiver is free to ignore any contained OBJ. IDs that it does
-- not recognize.

3.3.20 Error Message content

ErrorMsgContent ::= SEQUENCE {
pKIStatusInfo PKIStatusInfo,
errorCode INTEGER OPTIONAL,
-- implementation-specific error codes
errorDetails PKIFreeText OPTIONAL
-- implementation-specific error details
}

4. Mandatory PKI Management functions

The PKI management functions outlined in Section 1 above are
described in this section.

This section deals with functions that are "mandatory" in the sense
that all end entity and CA/RA implementations MUST be able to provide
the functionality described (perhaps via one of the transport
mechanisms defined in Section 5). This part is effectively the
profile of the PKI management functionality that MUST be supported.

Note that not all PKI management functions result in the creation of
a PKI message.

4.1 Root CA initialization

[See Section 1.2.2 for this document's definition of "root CA".]

A newly created root CA must produce a "self-certificate" which is a
Certificate structure with the profile defined for the "newWithNew"
certificate issued following a root CA key update.

In order to make the CA's self certificate useful to end entities
that do not acquire the self certificate via "out-of-band" means, the
CA must also produce a fingerprint for its public key. End entities
that acquire this fingerprint securely via some "out-of-band" means
can then verify the CA's self-certificate and hence the other
attributes contained therein.

The data structure used to carry the fingerprint is the OOBCertHash.

4.2 Root CA key update

CA keys (as all other keys) have a finite lifetime and will have to
be updated on a periodic basis. The certificates NewWithNew,
NewWithOld, and OldWithNew (see Section 2.4.1) are issued by the CA
to aid existing end entities who hold the current self-signed CA
certificate (OldWithOld) to transition securely to the new self-
signed CA certificate (NewWithNew), and to aid new end entities who
will hold NewWithNew to acquire OldWithOld securely for verification
of existing data.

4.3 Subordinate CA initialization

[See Section 1.2.2 for this document's definition of "subordinate
CA".]

From the perspective of PKI management protocols the initialization
of a subordinate CA is the same as the initialization of an end
entity. The only difference is that the subordinate CA must also
produce an initial revocation list.

4.4 CRL production

Before issuing any certificates a newly established CA (which issues
CRLs) must produce "empty" versions of each CRL which is to be
periodically produced.

4.5 PKI information request

When a PKI entity (CA, RA, or EE) wishes to acquire information about
the current status of a CA it MAY send that CA a request for such
information.

The CA must respond to the request by providing (at least) all of the
information requested by the requester. If some of the information
cannot be provided then an error must be conveyed to the requester.

If PKIMessages are used to request and supply this PKI information,
then the request must be the GenMsg message, the response must be the
GenRep message, and the error must be the Error message. These
messages are protected using a MAC based on shared secret information
(i.e., PasswordBasedMAC) or any other authenticated means (if the end
entity has an existing certificate).

4.6 Cross certification

The requester CA is the CA that will become the subject of the
cross-certificate; the responder CA will become the issuer of the
cross-certificate.

The requester CA must be "up and running" before initiating the
cross-certification operation.

4.6.1 One-way request-response scheme:

The cross-certification scheme is essentially a one way operation;
that is, when successful, this operation results in the creation of
one new cross-certificate. If the requirement is that cross-
certificates be created in "both directions" then each CA in turn
must initiate a cross-certification operation (or use another
scheme).

This scheme is suitable where the two CAs in question can already
verify each other's signatures (they have some common points of
trust) or where there is an out-of-band verification of the origin of
the certification request.

Detailed Description:

Cross certification is initiated at one CA known as the responder.
The CA administrator for the responder identifies the CA it wants to
cross certify and the responder CA equipment generates an
authorization code. The responder CA administrator passes this
authorization code by out-of-band means to the requester CA
administrator. The requester CA administrator enters the
authorization code at the requester CA in order to initiate the on-
line exchange.

The authorization code is used for authentication and integrity
purposes. This is done by generating a symmetric key based on the
authorization code and using the symmetric key for generating Message
Authentication Codes (MACs) on all messages exchanged.

The requester CA initiates the exchange by generating a random number
(requester random number). The requester CA then sends to the
responder CA the cross certification request (ccr) message. The
fields in this message are protected from modification with a MAC
based on the authorization code.

Upon receipt of the ccr message, the responder CA checks the protocol
version, saves the requester random number, generates its own random
number (responder random number) and validates the MAC. It then

generates (and archives, if desired) a new requester certificate that
contains the requester CA public key and is signed with the responder
CA signature private key. The responder CA responds with the cross
certification response (ccp) message. The fields in this message are
protected from modification with a MAC based on the authorization
code.

Upon receipt of the ccp message, the requester CA checks that its own
system time is close to the responder CA system time, checks the
received random numbers and validates the MAC. The requester CA
responds with the PKIConfirm message. The fields in this message are
protected from modification with a MAC based on the authorization
code. The requester CA writes the requester certificate to the
Repository.

Upon receipt of the PKIConfirm message, the responder CA checks the
random numbers and validates the MAC.

Notes:

1. The ccr message must contain a "complete" certification request,
that is, all fields (including, e.g., a BasicConstraints
extension) must be specified by the requester CA.
2. The ccp message SHOULD contain the verification certificate of the
responder CA - if present, the requester CA must then verify this
certificate (for example, via the "out-of-band" mechanism).

4.7 End entity initialization

As with CAs, end entities must be initialized. Initialization of end
entities requires at least two steps:

- acquisition of PKI information
- out-of-band verification of one root-CA public key

(other possible steps include the retrieval of trust condition
information and/or out-of-band verification of other CA public keys).

4.7.1 Acquisition of PKI information

The information REQUIRED is:

- the current root-CA public key
- (if the certifying CA is not a root-CA) the certification path
from the root CA to the certifying CA together with appropriate
revocation lists
- the algorithms and algorithm parameters which the certifying CA
supports for each relevant usage

Additional information could be required (e.g., supported extensions
or CA policy information) in order to produce a certification request
which will be successful. However, for simplicity we do not mandate
that the end entity acquires this information via the PKI messages.
The end result is simply that some certification requests may fail
(e.g., if the end entity wants to generate its own encryption key but
the CA doesn't allow that).

The required information MAY be acquired as described in Section 4.5.

4.7.2 Out-of-Band Verification of Root-CA Key

An end entity must securely possess the public key of its root CA.
One method to achieve this is to provide the end entity with the CA's
self-certificate fingerprint via some secure "out-of-band" means. The
end entity can then securely use the CA's self-certificate.

See Section 4.1 for further details.

4.8 Certificate Request

An initialized end entity MAY request a certificate at any time (as
part of an update procedure, or for any other purpose). This request
will be made using the certification request (cr) message. If the
end entity already possesses a signing key pair (with a corresponding
verification certificate), then this cr message will typically be
protected by the entity's digital signature. The CA returns the new
certificate (if the request is successful) in a CertRepMessage.

4.9 Key Update

When a key pair is due to expire the relevant end entity MAY request
a key update - that is, it MAY request that the CA issue a new
certificate for a new key pair. The request is made using a key
update request (kur) message. If the end entity already possesses a
signing key pair (with a corresponding verification certificate),
then this message will typically be protected by the entity's digital
signature. The CA returns the new certificate (if the request is
successful) in a key update response (kup) message, which is
syntactically identical to a CertRepMessage.

5. Transports

The transport protocols specified below allow end entities, RAs and
CAs to pass PKI messages between them. There is no requirement for
specific security mechanisms to be applied at this level if the PKI
messages are suitably protected (that is, if the OPTIONAL
PKIProtection parameter is used as specified for each message).

5.1 File based protocol

A file containing a PKI message MUST contain only the DER encoding of
one PKI message, i.e., there MUST be no extraneous header or trailer
information in the file.

Such files can be used to transport PKI messages using, e.g., FTP.

5.2 Direct TCP-Based Management Protocol

The following simple TCP-based protocol is to be used for transport
of PKI messages. This protocol is suitable for cases where an end
entity (or an RA) initiates a transaction and can poll to pick up the
results.

If a transaction is initiated by a PKI entity (RA or CA) then an end
entity must either supply a listener process or be supplied with a
polling reference (see below) in order to allow it to pick up the PKI
message from the PKI management component.

The protocol basically assumes a listener process on an RA or CA
which can accept PKI messages on a well-defined port (port number
829). Typically an initiator binds to this port and submits the
initial PKI message for a given transaction ID. The responder replies
with a PKI message and/or with a reference number to be used later
when polling for the actual PKI message response.

If a number of PKI response messages are to be produced for a given
request (say if some part of the request is handled more quickly than
another) then a new polling reference is also returned.

When the final PKI response message has been picked up by the
initiator then no new polling reference is supplied.

The initiator of a transaction sends a "direct TCP-based PKI message"
to the recipient. The recipient responds with a similar message.

A "direct TCP-based PKI message" consists of:

length (32-bits), flag (8-bits), value (defined below)

The length field contains the number of octets of the remainder of
the message (i.e., number of octets of "value" plus one). All 32-bit
values in this protocol are specified to be in network byte order.

Message name flag value

pkiMsg '00'H DER-encoded PKI message

-- PKI message
pollRep '01'H polling reference (32 bits),
time-to-check-back (32 bits)
-- poll response where no PKI message response ready; use polling
-- reference value (and estimated time value) for later polling
pollReq '02'H polling reference (32 bits)
-- request for a PKI message response to initial message
negPollRep '03'H '00'H
-- no further polling responses (i.e., transaction complete)
partialMsgRep '04'H next polling reference (32 bits),
time-to-check-back (32 bits),
DER-encoded PKI message
-- partial response to initial message plus new polling reference
-- (and estimated time value) to use to get next part of response
finalMsgRep '05'H DER-encoded PKI message
-- final (and possibly sole) response to initial message
errorMsgRep '06'H human readable error message
-- produced when an error is detected (e.g., a polling reference is
-- received which doesn't exist or is finished with)

Where a PKIConfirm message is to be transported (always from the
initiator to the responder) then a pkiMsg message is sent and a
negPollRep is returned.

The sequence of messages which can occur is then:

a) end entity sends pkiMsg and receives one of pollRep, negPollRep,
partialMsgRep or finalMsgRep in response. b) end entity sends
pollReq message and receives one of negPollRep, partialMsgRep,
finalMsgRep or errorMsgRep in response.

The "time-to-check-back" parameter is a 32-bit integer, defined to be
the number of seconds which have elapsed since midnight, January 1,
1970, coordinated universal time. It provides an estimate of the
time that the end entity should send its next pollReq.

5.3 Management Protocol via E-mail

This subsection specifies a means for conveying ASN.1-encoded
messages for the protocol exchanges described in Section 4 via
Internet mail.

A simple MIME object is specified as follows.

Content-Type: application/pkixcmp
Content-Transfer-Encoding: base64

<<the ASN.1 DER-encoded PKIX-CMP message, base64-encoded>>

This MIME object can be sent and received using common MIME
processing engines and provides a simple Internet mail transport for
PKIX-CMP messages. Implementations MAY wish to also recognize and
use the "application/x-pkixcmp" MIME type (specified in earlier
versions of this document) in order to support backward compatibility
wherever applicable.

5.4 Management Protocol via HTTP

This subsection specifies a means for conveying ASN.1-encoded
messages for the protocol exchanges described in Section 4 via the
HyperText Transfer Protocol.

A simple MIME object is specified as follows.

Content-Type: application/pkixcmp

<<the ASN.1 DER-encoded PKIX-CMP message>>

This MIME object can be sent and received using common HTTP
processing engines over WWW links and provides a simple browser-
server transport for PKIX-CMP messages. Implementations MAY wish to
also recognize and use the "application/x-pkixcmp" MIME type
(specified in earlier versions of this document) in order to support
backward compatibility wherever applicable.

SECURITY CONSIDERATIONS

This entire memo is about security mechanisms.

One cryptographic consideration is worth explicitly spelling out. In
the protocols specified above, when an end entity is required to
prove possession of a decryption key, it is effectively challenged to
decrypt something (its own certificate). This scheme (and many
others!) could be vulnerable to an attack if the possessor of the
decryption key in question could be fooled into decrypting an
arbitrary challenge and returning the cleartext to an attacker.
Although in this specification a number of other failures in security
are required in order for this attack to succeed, it is conceivable
that some future services (e.g., notary, trusted time) could
potentially be vulnerable to such attacks. For this reason we re-
iterate the general rule that implementations should be very careful
about decrypting arbitrary "ciphertext" and revealing recovered
"plaintext" since such a practice can lead to serious security
vulnerabilities.

Note also that exposing a private key to the CA/RA as a proof-of-
possession technique can carry some security risks (depending upon
whether or not the CA/RA can be trusted to handle such material
appropriately). Implementers are advised to exercise caution in
selecting and using this particular POP mechanism.

References

[COR95] ISO/IEC JTC 1/SC 21, Technical Corrigendum 2 to ISO/IEC
9594-8: 1990 & 1993 (1995:E), July 1995.

[CRMF] Myers, M., Adams, C., Solo, D. and D. Kemp, "Certificate
Request Message Format", RFC2511, March 1999.

[MvOV97] A. Menezes, P. van Oorschot, S. Vanstone, "Handbook of
Applied Cryptography", CRC Press, 1997.

[PKCS7] RSA Laboratories, "The Public-Key Cryptography Standards
(PKCS)", RSA Data Security Inc., Redwood City, California,
November 1993 Release.

[PKCS10] RSA Laboratories, "The Public-Key Cryptography Standards
(PKCS)", RSA Data Security Inc., Redwood City, California,
November 1993 Release.

[PKCS11] RSA Laboratories, "The Public-Key Cryptography Standards -
PKCS #11: Cryptographic token interface standard", RSA
Data Security Inc., Redwood City, California, April 28,
1995.

[RFC1847] Galvin, J., Murphy, S. Crocker, S. and N. Freed, "Security
Multiparts for MIME: Multipart/Signed and Multipart/
Encrypted", RFC1847, October 1995.

[RFC2104] Krawczyk, H., Bellare, M. and R. Canetti, "HMAC: Keyed
Hashing for Message Authentication", RFC2104, February
1997.

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC2119, March 1997.

[RFC2202] Cheng, P. and R. Glenn, "Test Cases for HMAC-MD5 and HMAC-
SHA-1", RFC2202, September 1997.

[X509-AM] ISO/IEC JTC1/SC 21, Draft Amendments DAM 4 to ISO/IEC
9594-2, DAM 2 to ISO/IEC 9594-6, DAM 1 to ISO/IEC 9594-7,
and DAM 1 to ISO/IEC 9594-8 on Certificate Extensions, 1
December, 1996.

Acknowledgements

The authors gratefully acknowledge the contributions of various
members of the PKIX Working Group. Many of these contributions
significantly clarified and improved the utility of this
specification.

Authors' Addresses

Carlisle Adams
Entrust Technologies
750 Heron Road, Suite E08,
Ottawa, Ontario
Canada K1V 1A7

EMail: cadams@entrust.com

Stephen Farrell
Software and Systems Engineering Ltd.
Fitzwilliam Court
Leeson Close
Dublin 2
IRELAND

EMail: stephen.farrell@sse.ie

APPENDIX A: Reasons for the presence of RAs

The reasons which justify the presence of an RA can be split into
those which are due to technical factors and those which are
organizational in nature. Technical reasons include the following.

-If hardware tokens are in use, then not all end entities will have
the equipment needed to initialize these; the RA equipment can
include the necessary functionality (this may also be a matter of
policy).

-Some end entities may not have the capability to publish
certificates; again, the RA may be suitably placed for this.

-The RA will be able to issue signed revocation requests on behalf
of end entities associated with it, whereas the end entity may not
be able to do this (if the key pair is completely lost).

Some of the organizational reasons which argue for the presence of an
RA are the following.

-It may be more cost effective to concentrate functionality in the
RA equipment than to supply functionality to all end entities
(especially if special token initialization equipment is to be
used).

-Establishing RAs within an organization can reduce the number of
CAs required, which is sometimes desirable.

-RAs may be better placed to identify people with their
"electronic" names, especially if the CA is physically remote from
the end entity.

-For many applications there will already be in place some
administrative structure so that candidates for the role of RA are
easy to find (which may not be true of the CA).

Appendix B. PKI Management Message Profiles.

This appendix contains detailed profiles for those PKIMessages which
MUST be supported by conforming implementations (see Section 4).

Profiles for the PKIMessages used in the following PKI management
operations are provided:

- root CA key update
- information request/response
- cross-certification request/response (1-way)
- initial registration/certification
- basic authenticated scheme
- certificate request
- key update

<<Later versions of this document may extend the above to include
profiles for the operations listed below (along with other
operations, if desired).>>

- revocation request
- certificate publication
- CRL publication

B1. General Rules for interpretation of these profiles.

1. Where OPTIONAL or DEFAULT fields are not mentioned in individual
profiles, they SHOULD be absent from the relevant message (i.e., a
receiver can validly reject a message containing such fields as
being syntactically incorrect).
Mandatory fields are not mentioned if they have an obvious value
(e.g., pvno).
2. Where structures occur in more than one message, they are
separately profiled as appropriate.
3. The algorithmIdentifiers from PKIMessage structures are profiled
separately.
4. A "special" X.500 DN is called the "NULL-DN"; this means a DN
containing a zero-length SEQUENCE OF RelativeDistinguishedNames
(its DER encoding is then '3000'H).
5. Where a GeneralName is required for a field but no suitable
value is available (e.g., an end entity produces a request before
knowing its name) then the GeneralName is to be an X.500 NULL-DN
(i.e., the Name field of the CHOICE is to contain a NULL-DN).
This special value can be called a "NULL-GeneralName".
6. Where a profile omits to specify the value for a GeneralName
then the NULL-GeneralName value is to be present in the relevant
PKIMessage field. This occurs with the sender field of the
PKIHeader for some messages.

7. Where any ambiguity arises due to naming of fields, the profile
names these using a "dot" notation (e.g., "certTemplate.subject"
means the subject field within a field called certTemplate).
8. Where a "SEQUENCE OF types" is part of a message, a zero-based
array notation is used to describe fields within the SEQUENCE OF
(e.g., crm[0].certReq.certTemplate.subject refers to a
subfield of the first CertReqMsg contained in a request message).
9. All PKI message exchanges in Sections B7-B10 require a PKIConfirm
message to be sent by the initiating entity. This message is not
included in some of the profiles given since its body is NULL and
its header contents are clear from the context. Any authenticated
means can be used for the protectionAlg (e.g., password-based MAC,
if shared secret information is known, or signature).

B2. Algorithm Use Profile

The following table contains definitions of algorithm uses within PKI
------分隔线----------------------------
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容