keyprov                                                         P. Hoyer
Internet-Draft                                             ActivIdentity
Intended status: Standards Track                                  M. Pei
Expires: August 25, October 23, 2008                                       VeriSign
                                                              S. Machani
                                                              Diversinet
                                                       February 22,
                                                          April 21, 2008

                    Portable Symmetric Key Container
       draft-ietf-keyprov-portable-symmetric-key-container-03.txt
       draft-ietf-keyprov-portable-symmetric-key-container-04.txt

Status of this Memo

   By submitting this Internet-Draft, each author represents that any
   applicable patent or other IPR claims of which he or she is aware
   have been or will be disclosed, and any of which he or she becomes
   aware will be disclosed, in accordance with Section 6 of BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on August 25, October 23, 2008.

Copyright Notice

   Copyright (C) The IETF Trust (2008).

Abstract

   This document specifies a symmetric key format for transport and
   provisioning of symmetric keys (One (for example One Time Password (OTP)
   shared secrets or symmetric cryptographic keys) to different types of
   crypto modules such as a strong authentication devices. device.  The standard token
   key transport format enables enterprises to deploy best-of-breed
   solutions combining components from different vendors into the same
   infrastructure.

   This work is a joint effort by the members of OATH (Initiative for
   Open AuTHentication) to specify a format that can be freely
   distributed to the technical community.  The authors believe that a
   common and shared specification will facilitate adoption of two-
   factor authentication on the Internet by enabling interoperability
   between commercial and open-source implementations.

Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  4  5
   2.  Conventions used in this document  Terminology  . . . . . . . . . . . . . .  5
   3.  Use Cases  . . . . . . . . . . . . .  6
     2.1.  Key Words  . . . . . . . . . . . . .  6
     3.1.  Offline Use Cases . . . . . . . . . . .  6
     2.2.  Definitions  . . . . . . . . .  6
       3.1.1.  Key migration by end-user . . . . . . . . . . . . . .  6
       3.1.2.  Bulk import of new keys  . . . .
   3.  Use Cases  . . . . . . . . . . .  6
       3.1.3.  Bulk migration of existing keys . . . . . . . . . . .  7
       3.1.4.  Key upload case . . . .  8
     3.1.  Online Use Cases . . . . . . . . . . . . . . .  7
     3.2.  Online Use Cases . . . . . .  8
       3.1.1.  Transport of keys from Server to Crypto Module . . . .  8
       3.1.2.  Transport of keys from Crypto Module to Crypto
               Module . . . . . . . . . . .  7
       3.2.1.  Online provisioning a key to end-user's
               authentication token . . . . . . . . . . . . .  8
       3.1.3.  Transport of keys from Crypto Module to Server . . . .  7
       3.2.2.  9
       3.1.4.  Server to server provisioning Bulk import/export of keys  . . . . . . . .  8
       3.2.3.  Online update of an existing authentication token
               key  9
     3.2.  Offline Use Cases  . . . . . . . . . . . . . . . . . . . .  9
       3.2.1.  Server to server Bulk import/export of keys  . . . . .  8  9
   4.  Requirements . . . . . . . . . . . . . . . . . . . . . . . . .  9 11
   5.  Portable Key container definition  . . . . . . . . . . . . . . 11 13
     5.1.  KeyContainer . . . . . . . . . . . . . . . . . . . . . . . 11 13
     5.2.  Device . . . . . . . . . . . . . . . . . . . . . . . . . . 13 15
       5.2.1.  DeviceId . . . . . . . . . . . . . . . . . . . . . . . 13 15
     5.3.  KeyProperties  . . . . . . . . . . . . . . . . . . . . . . 16
     5.4.  Key  . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
       5.3.1. 17
       5.4.1.  Data (OPTIONAL)  . . . . . . . . . . . . . . . . . . . 17
       5.3.2. 20
       5.4.2.  Usage (MANDATORY)  . . . . . . . . . . . . . . . . . . 17
       5.3.3. 21
       5.4.3.  ValueFormat  . . . . . . . . . . . . . . . . . . . . . 21
       5.3.4. 25
       5.4.4.  PINPolicy  . . . . . . . . . . . . . . . . . . . . . . 22 26
   6.  Usage and profile of algorithms for the portable symmetric
       key container  . . . . . . . . . . . . . . . . . . . . . . . . 24 28
     6.1.  Usage of EncryptionKey to protect keys in transit  . . . . 24 28
       6.1.1.  Protecting keys using a pre-shared key via
               symmetric algorithms . . . . . . . . . . . . . . . . . 24 28
       6.1.2.  Protecting keys using passphrase based encryption
               keys . . . . . . . . . . . . . . . . . . . . . . . . . 25 29
     6.2.  Protecting keys using asymmetric algorithms  . . . . . . . 27 31
     6.3.  Profile of Key Algorithm . . . . . . . . . . . . . . . . . 28 32
       6.3.1.  OTP Key Algorithm Identifiers  . . . . . . . . . . . . 28 33
       6.3.2.  PIN key value compare algorithm identifier . . . . . . 28 33
   7.  Reserved data attribute names  . . . . . . . . . . . . . . . . 30 34
   8.  Formal Syntax  . . . . . . . . . . . . . . . . . . . . . . . . 31 35
   9.  Security  IANA Considerations  . . . . . . . . . . . . . . . . . . . 35 . . 40
     9.1.  Payload confidentiality  Content-type registration for 'application/pskc+xml' . . . 40
     9.2.  XML Schema Registration  . . . . . . . . . . . . . . 35
     9.2.  Payload integrity . . . 41
     9.3.  URN Sub-Namespace Registration for
           urn:ietf:params:xml:ns:keyprov:container:1.0 . . . . . . . 41
     9.4.  Symmetric Key Algorithm Identifier Registry  . . . . . . . 42
       9.4.1.  Applicability  . . . 36
     9.3.  Payload authenticity . . . . . . . . . . . . . . . . . 42
       9.4.2.  Registerable Algorithms  . . 36
   10. Acknowledgements . . . . . . . . . . . . . 43
       9.4.3.  Registration Procedures  . . . . . . . . . . 37
   11. Appendix A - Example Symmetric Key Containers . . . . . 44
       9.4.4.  Initial Values . . . 38
     11.1. Symmetric Key Container with a single Non-Encrypted
           HOTP Secret Key . . . . . . . . . . . . . . . . . 46
     9.5.  XML Data Tag Identifier Registry . . . . 38
     11.2. Symmetric Key Container with a single PIN protected
           Non-Encrypted HOTP Secret Key . . . . . . . . . 49
       9.5.1.  Applicability  . . . . . . . . . . . . . . . . . . . . 49
       9.5.2.  Registerable Data Tags . . . . . . . . . . . . . . . . 50
       9.5.3.  Registration Procedures  . . . . . . . . . . . . . . . 50
       9.5.4.  Initial Values . . . . . . . . . . . . . . . . . . . . 51
   10. Security Considerations  . . . . . . . . . . . . . . . . . . . 53
     10.1. Payload confidentiality  . . . . . . . . . . . . . . . . . 53
     10.2. Payload integrity  . . . . . . . . . . . . . . . . 38
     11.3. Symmetric Key Container with a single AES-256-CBC
           Encrypted HOTP Secret Key . . . . 54
     10.3. Payload authenticity . . . . . . . . . . . . . . . . . . . 54
   11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . 39
     11.4. . . 55
   12. Appendix A - Example Symmetric Key Containers  . . . . . . . . 56
     12.1. Symmetric Key Container with signature and a single
           Password-based Encrypted Non-Encrypted
           HOTP Secret Key  . . . . . . . . . 40
     11.5. . . . . . . . . . . . . 56
     12.2. Symmetric Key Container with a single RSA 1.5
           Encrypted PIN protected
           Non-Encrypted HOTP Secret Key  . . . . . . . . . . . . . . 56
     12.3. Symmetric Key Container with a single AES-256-CBC
           Encrypted HOTP Secret Key  . . 42
   12. Normative References . . . . . . . . . . . . . . 57
     12.4. Symmetric Key Container with signature and a single
           Password-based Encrypted HOTP Secret Key . . . . . . . 44
   Authors' Addresses . . 58
     12.5. Symmetric Key Container with a single RSA 1.5
           Encrypted HOTP Secret Key  . . . . . . . . . . . . . . . . 60
   13. References . . . . . . 46
   Intellectual Property and Copyright Statements . . . . . . . . . . 47

1.  Introduction

   With increasing . . . . . . . . . . 62
     13.1. Normative References . . . . . . . . . . . . . . . . . . . 62
     13.2. Informative References . . . . . . . . . . . . . . . . . . 62
   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 64
   Intellectual Property and Copyright Statements . . . . . . . . . . 65

1.  Introduction

   With increasing use of symmetric key based authentication systems
   such as systems based one time password (OTP) and challenge response
   mechanisms, there is a need for vendor interoperability and a
   standard format for importing, exporting or provisioning symmetric
   keys from one system to another.  Traditionally authentication server
   vendors and service providers have used proprietary formats for
   importing, exporting and provisioning these keys into their systems
   making it hard to use tokens from vendor A with a server from vendor
   B.

   This Internet draft describes a standard format for serializing
   symmetric keys such as OTP shared secrets for system import, export
   or network/protocol transport.  The goal is that the format will
   facilitate dynamic provisioning and transfer of a symmetric keys such
   as an OTP shared secret or an encryption key of different types.  In
   the case of OTP shared secrets, the format will facilitate dynamic
   provisioning using an online provisioning protocol to different
   flavors of embedded tokens or allow customers to import new or
   existing tokens in batch or single instances into a compliant system.

   This draft also specifies the key attributes required for computation
   such as the initial event counter used in the HOTP algorithm [HOTP].
   It is also applicable for other time-based or proprietary algorithms.

   To provide an analogy, in public key environments the PKCS#12 format
   [PKCS12] is commonly used for importing and exporting private keys
   and certificates between systems.  In the environments outlined in
   this document where OTP keys may be transported directly down to
   smartcards or devices with limited computing capabilities, a format
   with small (size in bytes) and explicit shared secret configuration
   attribute information is desirable, avoiding complexity of PKCS#12.
   For example, one would have to use opaque data within PKCS#12 to
   carry shared secret attributes used for OTP calculations, whereas a
   more explicit attribute schema definition is better for
   interoperability and efficiency.

2.  Conventions used in this document  Terminology

2.1.  Key Words

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [RFC2119].

   In examples, "C:" and "S:" indicate lines sent by the client and
   server respectively.

   In the text below, OTP refers to one time password.

3.  Use Cases

2.2.  Definitions

   This section describes a comprehensive list of use cases that
   inspired the development of this specification.  These requirements
   were defines terms used to derive the primary requirement that drove the design.
   These requirements are covered in the next section.

   These use cases also help this document.  The same terms may
   be defined differently in understanding the applicability other documents.

   Authentication Token:  A physical device that an authorized user of this
   specification
      computer services is given to real world situations.

3.1.  Offline Use Cases

   This section describes the use cases relating aid in authentication.  The term may
      also refer to offline transport of software tokens.

   Bulk Provisioning:  Transferring multiple keys from one system linked to another, using some form multiple
      devices in a single execution step within one single PSKC
      KeyContainer

   Cryptographic Module:  A component of export and import
   model.

3.1.1.  Key migration by end-user an application, which enables
      symmetric key cryptographic functionality

   Cryptographic Key:  A user wants to migrate parameter used in conjunction with a key from one authentication token
   (container) to
      cryptographic algorithm that determines its operation in such a different authentication token.  For example,
      way that an entity with knowledge of the
   authentication tokens may be soft tokens on two different systems
   (computers or mobile phones).  The user key can export reproduce or
      reverse the operation, while an entity without knowledge of the
      key and
   related data in cannot (see [NIST-SP800-57])

   Cryptographic Token:  See Authentication Token

   Device:  A physical piece of hardware, or a standard format software framework, that
      hosts symmetric keys

   Device ID (DeviceId):  A unique identifier for import into the other
   authentication token.

   The key protection mechanism may rely on password-based encryption
   for soft tokens, a pre-placed hardware-protected transfer key shared
   between device,
      representing the two systems or may also rely on asymmetric keys/ PKI if
   available.

3.1.2.  Bulk import of new keys

   Tokens are manufactured in bulk and associated keys and algorithm
   data need identifying criteria to be loaded into the validation system through uniquely identify a file on
   portable media.  The manufacturer provides the keys and related data
   in the form
      device

   Dynamic Provisioning:  Usage of a file containing records in standard format,
   typically on protocol, such as DSKPP, to make a CD.  Note
      key container available to a recipient

   Encryption Key:  A key used to encrypt key

   Key:  See Cryptographic Key
   Hardware Token:  See Authentication Token

   Key Algorithm:  A well-defined computational procedure that the token manufacturer takes
      variable inputs including a cryptographic key and produces an
      output.

   Key Container:  An object that encapsulates symmetric keys and their
      attributes for set of devices

   Key ID (KeyID):  A unique identifier for the vendor symmetric key

   Key Issuer:  An organization that issues symmetric keys to end-users

   Key Type:  The type of symmetric key cryptographic methods for which
      the validation system may key will be the same used (e.g., OATH HOTP or different.

   In this case the file usually is protected by a RSA SecurID
      authentication, AES encryption, etc.)

   Secret Key:  The symmetric transport key which was communicated separately outside data

   Software Token:  A type of the file between the
   two parties.

   Some devices will allow local PIN management (the authentication token that is stored on a
      general-purpose electronic device will have such as a
   PIN pad) hence random initial PINs set at manufacturing should be
   transmitted together with the respective keys they protect.

3.1.3.  Bulk migration of existing keys

   An enterprise wants desktop computer,
      laptop, PDA, or mobile phone

   Token:  See Authentication Token

   User:  The person or client to port keys and related data from an existing
   validation system whom devices are issued

   User ID:  A into a different validation system B. The
   existing validation system provides unique identifier for the enterprise with user or client

3.  Use Cases

   This section describes a
   functionality that enables export comprehensive list of keys and related data (e.g. for
   OTP tokens) in a standard format.  Since the OTP tokens are in the
   standard format, the enterprise can import the token records into use cases that
   inspired the
   new validation system B and start using development of this specification.  These requirements
   were used to derive the existing tokens.  Note primary requirement that drove the vendors for the two validation systems may be design.
   These requirements are covered in the same or
   different.

   In this case next section.

   These use cases also help in understanding the file usually is protected by a symmetric transport
   key which was communicated separately outside applicability of the file between the
   two validation systems.

   In this case it is also important
   specification to be able real world situations.

3.1.  Online Use Cases

   This section describes the use cases related to communicate provisioning the
   existing assignment (binding) keys
   using an online provisioning protocol such as [DSKPP]

3.1.1.  Transport of a device keys from Server to Crypto Module

   For example, a specific user.

3.1.4.  Key upload case

   User mobile device user wants to activate and use obtain a new symmetric key and related data against for
   use with a
   validation system that is not aware of this key.  This key may be
   embedded in the authentication token (e.g.  SD card, USB drive) that
   the user has purchased at the local electronics retailer.  Along with
   the authentication token, the user may get the key on a CD or a
   floppy in a standard format.  The user can now upload via a secure
   online channel or import this key and related data into the new
   validation system and start using the key.

   The key protection mechanism may rely on password-based encryption,
   or a pre-placed hardware-protected transfer key shared between the
   token manufacturer and the validation system(s) if available.

3.2.  Online Use Cases

   This section describes the use cases related to provisioning the keys
   using some form of a online provisioning protocol.

3.2.1.  Online provisioning a key to end-user's authentication token

   A mobile device user wants to obtain an OTP key for use with an OTP
   soft token cryptomodule on the device.  The soft token cryptomodule client from
   vendor A initiates the provisioning process against a provisioning
   system from vendor B using a standards-based provisioning protocol
   such as [DSKPP].  The provisioning system entity delivers one or more keys
   in a standard format that can be processed by the mobile device.  The user
   can download a payload that contains more than one key.

   In

   For example, in a variation of the above, instead of the user's
   mobile phone, a key is provisioned in the user's soft token
   application on a laptop using a network-based online protocol.  As
   before, the provisioning system delivers an OTP a key in a standard format
   that can be processed by the soft token on the PC.

3.2.2.  Server to server provisioning of keys

   Sometimes, instead of importing keys from a manufacturer using a
   file, an OTP validation server may download

   For example, the keys using end-user or the key issuer wants to update or
   configure an online
   protocol.  The keys can be downloaded existing key in the cryptomodule and requests a standard format that can
   be processed by a validation system.

   In another scenario, an OTA (over-the-air)
   replacement key provisioning gateway
   that provisions keys to mobile phones container.  The container may obtain key material from or may not include a
   key issuer using an online protocol.  The keys are delivered in a
   standard format that can be processed by the OTA key provisioning
   gateway and subsequently sent to the end-user's mobile phone.

3.2.3.  Online update of an existing authentication token key

   The end-user or the key issuer wants to update or configure an
   existing key in the authentication token and requests a replacement
   key container.  The container may or may not include a new
   new key and may include new or updated key attributes such as a new
   counter value in HOTP key case, a modified response format or length,
   a new friendly name, etc.

4.  Requirements

   This section outlines the most relevant requirements that are the
   basis of this work.  Several

3.1.2.  Transport of the requirements were derived keys from
   use cases described above.

   R1:   The format MUST support Crypto Module to Crypto Module

   For example, a user wants to transport of multiple types of
         symmetric keys and related attributes for algorithms including
         HOTP, other OTP, challenge-response, etc.

   R2:   The format MUST handle the symmetric a key itself as well of
         attributes that are typically associated with symmetric keys.
         Some of these attributes from one cryptomodule to
   another.  There may be

         *  Unique Key Identifier

         *  Issuer information

         *  Algorithm ID

         *  Algorithm mode

         *  Issuer Name

         *  Key friendly name

         *  Event counter value (moving factor for OTP algorithms)

         *  Time value

   R3:   The format SHOULD support both offline two cryptographic modules, one on a computer
   one on a mobile phone, and online scenarios.
         That is it should be serializable the user wants to transport a file as well as it
         should be possible key from the
   computer to use this format in online provisioning
         protocols

   R4: the mobile phone.  The user can export the key and
   related data in a standard format SHOULD allow bulk representation for input into the other
   cryptomodule.

3.1.3.  Transport of symmetric keys

   R5:   The format SHOULD allow bulk representation of PINs related to
         specific keys

   R6:   The format SHOULD be portable to various platforms.
         Furthermore, it SHOULD be computationally efficient from Crypto Module to process.

   R7:   The format MUST provide appropriate level of security in terms
         of data encryption and data integrity.

   R8: Server

   For online scenarios the format SHOULD NOT rely on transport
         level security (e.g., SSL/TLS) for core security requirements.

   R9:   The format SHOULD be extensible.  It SHOULD enable extension
         points allowing vendors example, a user wants to specify additional attributes in the
         future.

   R10:  The format SHOULD allow for distribution of activate and use a new key derivation and related
   data
         without the actual symmetric key itself.  This against a validation system that is to support
         symmetric not aware of this key.  This
   key management schemes may be embedded in the cryptomodule (e.g.  SD card, USB drive)
   that rely on the user has purchased at the local electronics retailer.  Along
   with the cryptomodule, the user may get the key derivation
         algorithms based on a pre-placed master key.  The key
         derivation data typically consists of CD or a reference to the key,
         rather than the key value itself.

   R11: floppy
   in a standard format.  The format SHOULD allow for additional lifecycle management
         operations such as counter resynchronization.  Such processes
         require confidentiality between client and server, thus could
         use user can now upload via a common secure container format, without the transfer of online
   channel or import this key material.

   R12:  The format MUST support and related data into the use new validation
   system and start using the key.

3.1.4.  Server to server Bulk import/export of pre-shared symmetric keys

   From time to
         ensure confidentiality of sensitive data elements.

   R13:  The format MUST support time, a password-based encryption (PBE)
         [PKCS5] scheme key management system may be required to ensure security import
   or export keys in bulk from one entity to another.

   For example, instead of sensitive data elements.
         This is importing keys from a widely used method for various provisioning
         scenarios.

   R14: manufacturer using a
   file, a validation server may download the keys using an online
   protocol.  The keys can be downloaded in a standard format SHOULD support asymmetric encryption algorithms such
         as RSA to ensure end-to-end security that can
   be processed by a validation system.

   For example, in a variation of sensitive data
         elements.  This is the above, an OTA key provisioning
   gateway that provisions keys to support scenarios where mobile phones may obtain key material
   from a pre-set shared
         encryption key is difficult to use.

5.  Portable Key container definition issuer using an online protocol.  The portable keys are delivered
   in a standard format that can be processed by the key container is based on an XML schema definition provisioning
   gateway and
   contains subsequently sent to the following main entities:

   1.  KeyContainer entity as defined in Section 5.1

   2.  Device entity as defined in Section 5.2

   3.  Key entity as defined in Section 5.3

   Additionally other XML schema types have been defined and are
   detailed in end-user's mobile phone.

3.2.  Offline Use Cases

   This section describes the relevant subsections use cases relating to offline transport of this document

   A KeyContainer MAY contain one or more Device entities.  A Device MAY
   contain
   keys from one or more Key entities

   The figure below indicates a possible relationship diagram of a
   container.

   --------------------------------------------
   | KeyContainer                             |
   |                                          |
   |  ------------------   -----------------  |
   |  | Device 1       |   | Device n      |  |
   |  |                |   |               |  |
   |  |  ------------  |   | ------------  |  |
   |  |  | Key 1    |  |   | | Key n    |  |  |
   |  |  ------------  |   | ------------  |  |
   |  |                |   |               |  |
   |  |                |   |               |  |
   |  |  ------------  |   | ------------  |  |
   |  |  | Key m    |  |   | | Key p    |  |  |
   |  |  ------------  |   | ------------  |  |
   |  ------------------   -----------------  |
   |                                          |
   --------------------------------------------

   The following section describe in detail all the entities and related
   XML schema elements system to another, using some form of export and attributes:

5.1.  KeyContainer

   The KeyContainer represents the key container entity.  A Container
   MAY contain more than one Device entity; each Device entity MAY
   contain more than one Key entity.

   The KeyContainer is defined as follows:

 <xs:complexType name="KeyContainerType">
         <xs:sequence>
                 <xs:element name="EncryptionKey"
                         type="ds:KeyInfoType" minOccurs="0"/>
                         <xs:element name="MACAlgorithm"
                         type="pskc:KeyAlgorithmType" minOccurs="0"/>
                         <xs:element name="Device"
                         type="pskc:DeviceType" maxOccurs="unbounded"/>
                 <xs:element name="Signature"
                         type="ds:SignatureType" minOccurs="0"/>
         </xs:sequence>
   <xs:attribute name="Version" type="pskc:VersionType" use="required"/>
 </xs:complexType>

   The elements import
   model.

3.2.1.  Server to server Bulk import/export of the KeyContainer keys

   For example, crypto modules such as OTP authentication tokens, may
   have their symmetric keys initialized during the following meanings:

   o  <EncryptionKey (OPTIONAL)>, Identifies manufacturing
   process in bulk, requiring copies of the encryption key,
      algorithm keys and possible parameters used algorithm data to protect
   be loaded into the Secret Key authentication system through a file on portable
   media.  The manufacturer provides the keys and related data in the container, for profile
   form of a file containing records in standard format, typically on a
   CD.  Note that the token manufacturer and usage please see
      Section 6.1

   o  <MACAlgorithm (OPTIONAL)>, Identifies the algorithm used to
      generate a keyed digest of vendor for the
   validation system may be the Secret Key data values when
      protection algorithms are used that do not same or different.  Some crypto modules
   will allow local PIN management (the device will have integrity checks.
      The digest guarantees a PIN pad)
   hence random initial PINs set at manufacturing should be transmitted
   together with the integrity respective keys they protect.

   For example, an enterprise wants to port keys and related data from
   an existing validation system A into a different validation system B.
   The existing validation system provides the authenticity enterprise with a
   functionality that enables export of the
      key data. for profile keys and usage please see Section 6.1.1

   o  <Device>, the host Device for one or more Keys as defined in
      Section 5.2 The KeyContainer MAY contain multiple Device related data
      elements, allowing (e.g. for bulk provisioning of keys.

   o  <Signature (OPTIONAL)>,
   OTP authentication tokens) in a standard format.  Since the signature value of OTP
   tokens are in the Container.
      When standard format, the signature is applied to enterprise can import the entire container, it MUST use
      XML Signature methods as defined in [XMLSIG].  It MAY be omitted
      when application layer provisioning or transport layer
      provisioning protocols provide
   token records into the integrity new validation system B and authenticity of start using the payload between
   existing tokens.  Note that the sender and vendors for the recipient of the container.
      When required, this specification recommends using a symmetric key
      based signature with two validation
   systems may be the same key used in the encryption of the
      secret key data.  The signature is enveloped.

   o  <Version (MANDATORY)>, or different.

4.  Requirements

   This section outlines the version number for most relevant requirements that are the portable key
      container format (the XML schema defined in
   basis of this document).

5.2.  Device

   The Device represents the Device entity in work.  Several of the Container.  A Device
   MAY be bound to a user and MAY contain more than one keys.  It is
   recommended that a key is bound to one and only one Device.

   The Device is defined as follows:

<xs:complexType name="DeviceType">
  <xs:sequence>
    <xs:element name="DeviceId" type="pskc:DeviceIdType" minOccurs="0"/>
    <xs:element name="Key" type="pskc:KeyType" maxOccurs="unbounded"/>
    <xs:element name="UserId" type="xs:string" minOccurs="0"/>
  </xs:sequence>
</xs:complexType> requirements were derived from
   use cases described above.

   R1:   The elements format MUST support transport of the Device have the following meanings:

   o  <DeviceId>, a unique identifier multiple types of
         symmetric keys and related attributes for algorithms including
         HOTP, other OTP, challenge-response, etc.

   R2:   The format MUST handle the device, defined in
      Section 5.2.1

   o  <Key>, represents the symmetric key entity itself as defined in Section 5.3

   o  <UserId>, optionally identifies the owner or the user well of the
      Device TODO

5.2.1.  DeviceId

   The DeviceId represents the identifying criteria to uniquely identify
   the device
         attributes that contains the are typically associated with symmetric keys.  Since devices can come
   in different form factors such as hardware tokens, smartcards, soft
   tokens in a mobile phone or PC etc this type allows different
   criteria to be used.  Combined though the criteria MUST uniquely
   identify the device.  For example for hardware tokens the combination
         Some of SerialNo and Manufacturer will uniquely identify these attributes may be

         *  Unique Key Identifier

         *  Issuer information

         *  Algorithm ID

         *  Algorithm mode

         *  Issuer Name

         *  Key friendly name

         *  Event counter value (moving factor for OTP algorithms)

         *  Time value

   R3:   The format SHOULD support both offline and online scenarios.
         That is it should be serializable to a device but not
   SerialNo alone since two different token manufacturers might issue
   devices with the same serial number (similar file as well as it
         should be possible to the IssuerDN and
   serial number use this format in online provisioning
         protocols such as [DSKPP]

   R4:   The format SHOULD allow bulk representation of a certificate).  For symmetric keys hold on banking cards the
   identification

   R5:   The format SHOULD allow bulk representation of PINs related to
         specific keys

   R6:   The format SHOULD be portable to various platforms.
         Furthermore, it SHOULD be computationally efficient to process.

   R7:   The format MUST provide appropriate level of security in terms
         of data encryption and data integrity.

   R8:   For online scenarios the device is often done via the Primary Account
   Number (PAN, the big number printed format SHOULD NOT rely on transport
         level security (e.g., SSL/TLS) for core security requirements.

   R9:   The format SHOULD be extensible.  It SHOULD enable extension
         points allowing vendors to specify additional attributes in the front of the card) and an
   expiry date
         future.

   R10:  The format SHOULD allow for distribution of key derivation data
         without the card.  DeviceId actual symmetric key itself.  This is an extensible type that allows
   all these different ways to uniquely identify a specific support
         symmetric key
   containing device.

   The DeviceId is defined as follows:

   <xs:complexType name="DeviceIdType">
   <xs:sequence>
       <xs:element name="Manufacturer" type="xs:string"/>
       <xs:element name="SerialNo" type="xs:string"/>
       <xs:element name="Model" type="xs:string" minOccurs="0"/>
       <xs:element name="IssueNo" type="xs:string" minOccurs="0"/>
       <xs:element name="ExpiryDate" type="xs:dateTime" minOccurs="0"/>
       <xs:element name="StartDate" type="xs:dateTime" minOccurs="0"/>
   </xs:sequence>
   </xs:complexType> management schemes that rely on key derivation
         algorithms based on a pre-placed master key.  The elements of DeviceId have the following meanings:

   o  <Manufacturer>, the manufacturer of the device.

   o  <SerialNo>, the serial number key
         derivation data typically consists of a reference to the device or key,
         rather than the PAN (primary
      account number) in case of EMV (Europay-MasterCard-Visa) smart
      cards.

   o  <Model>, key value itself.

   R11:  The format SHOULD allow for additional lifecycle management
         operations such as counter resynchronization.  Such processes
         require confidentiality between client and server, thus could
         use a common secure container format, without the model transfer of
         key material.

   R12:  The format MUST support the device (e.g one-button-HOTP-token-V1)

   o  <IssueNo>, the issue number in case use of smart cards with the same
      PAN, equivalent pre-shared symmetric keys to
         ensure confidentiality of sensitive data elements.

   R13:  The format MUST support a PSN (PAN Sequence Number).

   o  <ExpiryDate>, the expiry date password-based encryption (PBE)
         [PKCS5] scheme to ensure security of sensitive data elements.
         This is a device (such widely used method for various provisioning
         scenarios.

   R14:  The format SHOULD support asymmetric encryption algorithms such
         as the one on an
      EMV card,used when issue numbers are not printed on cards).

   o  <StartDate>, the start date RSA to ensure end-to-end security of sensitive data
         elements.  This is to support scenarios where a device (such as the one pre-set shared
         encryption key is difficult to use.

5.  Portable Key container definition

   The portable key container is based on an EMV
      card,used when issue numbers XML schema definition and
   contains the following main entities:

   1.  KeyContainer entity as defined in Section 5.1

   2.  Device entity as defined in Section 5.2

   3.  Key entity as defined in Section 5.4

   Additionally other XML schema types have been defined and are not printed on cards).

5.3.
   detailed in the relevant subsections of this document

   A KeyContainer MAY contain one or more Device entities.  A Device MAY
   contain one or more Key entities

   The figure below indicates a possible relationship diagram of a
   container.

   --------------------------------------------
   | KeyContainer                             |
   |                                          |
   |  ------------------   -----------------  |
   |  | Device 1       |   | Device n      |  |
   |  |                |   |               |  |
   |  |  ------------  |   | ------------  |  |
   |  |  | Key 1    |  |   | | Key n    |  |  |
   |  |  ------------  |   | ------------  |  |
   |  |                |   |               |  |
   |  |                |   |               |  |
   |  |  ------------  |   | ------------  |  |
   |  |  | Key m    |  |   | | Key p    |  |  |
   |  |  ------------  |   | ------------  |  |
   |  ------------------   -----------------  |
   |                                          |
   --------------------------------------------

   The following section describe in detail all the entities and related
   XML schema elements and attributes:

5.1.  KeyContainer

   The KeyContainer represents the key container entity.  A Container
   MAY contain more than one Device entity; each Device entity in the KeyContainer.  The MAY
   contain more than one Key entity.

   The KeyContainer is defined as follows:

 <xs:complexType name="KeyType"> name="KeyContainerType">
         <xs:sequence>
                 <xs:element name="Issuer" type="xs:string" minOccurs="0"/>
       <xs:element name="Usage" type="pskc:UsageType"/>
       <xs:element name="CardAppPersoProfileId" type="xs:string" name="EncryptionKey"
                         type="ds:KeyInfoType" minOccurs="0"/>
                         <xs:element name="FriendlyName" type="xs:string" name="MACAlgorithm"
                         type="pskc:KeyAlgorithmType" minOccurs="0"/>
                         <xs:element name="Data" type="pskc:DataType" minOccurs="0" name="Device"
                         type="pskc:DeviceType" maxOccurs="unbounded"/>
                 <xs:element name="PINPolicy" type="pskc:PINPolicyType"
         minOccurs="0"/>
       <xs:element name="ExpiryDate" type="xs:dateTime" minOccurs="0"/>
       <xs:element name="StartDate" type="xs:dateTime" name="Signature"
                         type="ds:SignatureType" minOccurs="0"/>
         </xs:sequence>
   <xs:attribute name="KeyId" type="xs:string" use="required"/>
     <xs:attribute name="KeyAlgorithm" type="pskc:KeyAlgorithmType" name="Version" type="pskc:VersionType" use="required"/>
 </xs:complexType>

   The attributes elements of the Key entity KeyContainer have the following meanings:

   o  KeyId (MANDATORY), a unique and global identifier of the symmetric
      key.  The identifier is defined as a string of alphanumeric
      characters.

   o  <KeyAlgorithm (MANDATORY)>, the unique URI of  <EncryptionKey (OPTIONAL)>, Identifies the type of encryption key,
      algorithm and possible parameters used to use with protect the secret key, for profiles are described Secret Key
      data in the container.  Please see Section 6.3

   The elements 6.1 for detailed
      description of the Key entity have the following meanings:

   o  <Issuer (OPTIONAL)>, The how to protect key issuer name, this is normally data in transit and the
      name usage of
      this element.

   o  <MACAlgorithm (OPTIONAL)>, Identifies the organization that issues the key algorithm used to the end user
      generate a keyed digest of the key.  For example MyBank issuing hardware tokens to their
      retail banking users 'MyBank' would be the issuer. Secret Key data values when
      protection algorithms are used that do not have integrity checks.
      The Issuer is
      defined as a String.

   o  <Usage (MANDATORY)>, defines digest guarantees the intended usage integrity and the authenticity of the
      key data. for profile and
      related metadata usage please see Section 6.1.1

   o  <Device>, the host Device for one or more Keys as defined in
      Section 5.3.2 5.2 The KeyContainer MAY contain multiple Device data
      elements, allowing for bulk provisioning of multiple devices each
      containing multiple keys.

   o  <CardAppPersoProfileId  <Signature (OPTIONAL)>, A uniquie identifier used
      between the sending and receiving party signature value of the container to
      establish a set of constant values related Container.
      When the signature is applied to a key that are not
      transmitted via the container.  For example a smart card
      application personalisation profile id related to attributes
      present on a smart card application that have influence when
      computing a response.  An example could entire container, it MUST use
      XML Signature methods as defined in [XMLDSIG].  It MAY be an EMV MasterCard CAP
      [CAP] omitted
      when application on a card personalised with data for a specific
      batch layer provisioning or transport layer
      provisioning protocols provide the integrity and authenticity of cards such as:

         IAF Internet authentication flag

         CVN Cryptogram version number, for example (MCHIP2, MCHIP4,
         VISA 13, VISA14)

         AIP (Application Interchange Profile), 2 bytes

         TVR Terminal Verification Result, 5 bytes

         CVR The card verification result

         AmountOther

         TransactionDate

         TerminalCountryCode

         TransactionCurrencyCode

         AmountAuthorised

         IIPB

      These values are not contained within attributes in
      the container
      but are shared payload between the manufacturing sender and the validation
      service through recipient of the container.
      When required, this unique CardAppPersoProfileId.  The
      CardAppPersoProfileId is defined as specification recommends using a String.

   o  <FriendlyName (OPTIONAL)>, The user friendly name that is assigned
      to symmetric key
      based signature with the same key used in the encryption of the
      secret key for easy reference. data.  The FriendlyName signature is defined
      as a String. enveloped.

   o  <Data (OPTIONAL)>, the element carrying  <Version (MANDATORY)>, the data related to version number for the portable key as
      container format (the XML schema defined in Section 5.3.1

   o  <PINPolicy (OPTIONAL)>, the policy of the PIN relating to the
      usage of this key as defined in Section 5.3.4

   o  <ExpiryDate (OPTIONAL)>, document).

5.2.  Device

   The Device represents the expiry date of Device entity in the key, it MUST not Container.  A Device
   MAY be possible bound to use this a user and MAY contain more than one keys.  A key after this date

   o  <StartDate (OPTIONAL)>, the start date of the key, it MUST not
   SHOULD be
      possible bound to use this key before this date

5.3.1.  Data (OPTIONAL)

   Defines the data attributes of the symmetric key.  Each is a name
   value pair which has either a plain value (in case of no encryption)
   or an encrypted value as defined in EncryptedDataType in XML
   Encryption.

   This is also where the key value is transported, Section 7 defines a
   list of reserved attribute names.

   Data element only one Device.

   The Device is defined as follows:

<xs:complexType name="DataType"> name="DeviceType">
  <xs:sequence>
    <xs:choice>
    <xs:element name="PlainValue" type="xs:base64Binary"/> name="DeviceId" type="pskc:DeviceIdType" minOccurs="0"/>
    <xs:element name="EncryptedValue" type="xenc:EncryptedDataType"/>
    </xs:choice> name="Key" type="pskc:KeyType" maxOccurs="unbounded"/>
    <xs:element name="ValueMAC" type="xs:base64Binary" name="UserId" type="xs:string" minOccurs="0"/>
  </xs:sequence>
    <xs:attribute name="Name" type="xs:string" use="required"/>
</xs:complexType>

   The attributes of the Data element have the following meanings:

   o  Name, defines the name of the name-value pair, Section 7 defines a
      list of reserved attribute names

   The elements of the Data element Device have the following meanings:

   o  The <PlainValue> conveys an unencrypted value of  <DeviceId>, a unique identifier for the name-value
      pair device, defined in base 64 encoding.
      Section 5.2.1

   o  The <EncryptedValue> element in the DataType conveys an encrypted
      value of  <Key>, represents the name-value pair inside an EncryptedDataType key entity as defined in XML Encryption. Section 5.4

   o  The <ValueMAC (OPTIONAL)> element in  <UserId>, optionally identifies the DataType conveys a keyed
      MAC value of owner or the unencrypted data for user of the cases
      Device, a string representation of a Distinguished Name as defined
      in [RFC4514].  For example UID=jsmith,DC=example,DC=net.  In
      systems where unique user Ids are used the key
      protection algorithm does not support integrity checks

5.3.2.  Usage (MANDATORY) string representation
      'UID=[uniqueId]' MUST be used.

5.2.1.  DeviceId

   The Usage element defines DeviceId represents the usage attribute(s) of identifying criteria to uniquely identify
   the key entity.
   Usage is defined as follows:

  <xs:complexType name="UsageType">
      <xs:sequence>
              <xs:element name="ResponseFormat">
                      <xs:complexType>
                          <xs:attribute name="Format"
                          type="pskc:ValueFormatType" use="required"/>
                          <xs:attribute name="Length"
                          type="xs:unsignedInt" use="required"/>
                          <xs:attribute name="CheckDigits"
                          type="xs:boolean" default="false"/>
                      </xs:complexType>
              </xs:element>
              <xs:element name="ChallengeFormat" minOccurs="0">
                      <xs:complexType>
                          <xs:attribute name="Format"
                          type="pskc:ValueFormatType" use="required"/>
                          <xs:attribute name="Min"
                          type="xs:unsignedInt" use="required"/>
                          <xs:attribute name="Max"
                          type="xs:unsignedInt" use="required"/>
                          <xs:attribute name="CheckDigits"
                          type="xs:boolean" default="false"/>
                      </xs:complexType>
              </xs:element>
      </xs:sequence>
      <xs:attribute name="OTP" type="xs:boolean" default="false"/>
      <xs:attribute name="CR" type="xs:boolean" default="false"/>
      <xs:attribute name="Integrity" type="xs:boolean" default="false"/>
      <xs:attribute name="Encrypt" type="xs:boolean" default="false"/>
      <xs:attribute name="Unlock" type="xs:boolean" default="false"/>
  </xs:complexType>

   The attributes of the Usage element define the intended usage of device that contains the
   key and are associated keys.  Since devices can come
   in different form factors such as hardware tokens, smart-cards, soft
   tokens in a combination of one mobile phone or more of the following (set PC etc this element allows different
   criteria to
   true):

   o  OTP, the key will be used for OTP generation

   o  CR, the key will be used for Challenge/Response purposes

   o  Encrypt, used.  Combined though the key will be used for data encryption purposes

   o  Integrity, criteria MUST uniquely
   identify the key will be used to generate a keyed message digest device.  For example for data integrity or authentication purposes.

   o  Unlock, hardware tokens the key combination
   of SerialNo and Manufacturer will be used for an inverse challenge response in
      the case uniquely identify a user has locked the device by entering a wrong PIN too
      many times (for but not
   SerialNo alone since two different token manufacturers might issue
   devices with PIN-input capability)

5.3.2.1.  OTP and CR specific Usage elements (OPTIONAL)

   When the key usage is set to OTP or CR, additional attributes MUST be
   provided same serial number (similar to support the OTP and/or the response computation as
   required by the underlying algorithm IssuerDN and to customize or configure
   serial number of a certificate).  Symmetric Keys used in the payment
   industry are usually stored on Integrated Circuit Smart Cards.  These
   cards are uniquely identified via the Primary Account Number (PAN,
   the long number printed on the outcome front of the computation (format, length card) and usage modes).

5.3.2.1.1.  ChallengeFormat element (MANDATORY)

   The ChallengeFormat element defines the characteristics an expiry date
   of the
   challenge in card.  DeviceId is an extensible type that allows all these
   different ways to uniquely identify a CR usage scenario. specific key containing device.

   The Challenge element DeviceId is defined
   by as follows:

   <xs:complexType name="DeviceIdType">
   <xs:sequence>
       <xs:element name="Manufacturer" type="xs:string"/>
       <xs:element name="SerialNo" type="xs:string"/>
       <xs:element name="Model" type="xs:string" minOccurs="0"/>
       <xs:element name="IssueNo" type="xs:string" minOccurs="0"/>
       <xs:element name="ExpiryDate" type="xs:dateTime" minOccurs="0"/>
       <xs:element name="StartDate" type="xs:dateTime" minOccurs="0"/>
   </xs:sequence>
   </xs:complexType>

   The elements of DeviceId have the following attributes: meanings:

   o  Format (MANDATORY)

         Defines  <Manufacturer>, the format manufacturer of the challenge accepted by device.

   o  <SerialNo>, the device and
         MUST be one serial number of the values defined device or the PAN (primary
      account number) in Section 5.3.3 case of payment smart cards.

   o  CheckDigit (OPTIONAL)

         Defines if  <Model>, the model of the device needs to check (e.g one-button-HOTP-token-V1)

   o  <IssueNo>, the appended Luhn check
         digit contained issue number in case of smart cards with the same
      PAN, equivalent to a provided challenge.  This is only valid if PSN (PAN Sequence Number).

   o  <ExpiryDate>, the Format attribute is 'DECIMAL'.  Value MUST be:

            TRUE expiry date of a device will check (such as the appended Luhn check digit in one on a
            provided challenge

            FALSE device will
      payment card,used when issue numbers are not check appended Luhn check digit in
            challenge printed on cards).

   o  Min (MANDATORY)

         Defines  <StartDate>, the minimum size start date of the challenge accepted by the a device for CR mode.

         If the Format attribute is 'DECIMAL', 'HEXADECIMAL' or
         'ALPHANUMERIC' this value indicates the minimum number of
         digits/characters.

         If the Format attribute is 'BASE64' or 'BINARY', this value
         indicates the minimum number of bytes of the unencoded value.

         Value MUST be:

            Unsigned integer.

   o  Max (MANDATORY)

         Defines the maximum size of (such as the challenge accepted one on a
      payment card,used when issue numbers are not printed on cards).

5.3.  KeyProperties

   The KeyProperties represents common properties shared by more than
   one key held in the
         device for CR mode. container.  If the Format attribute is 'DECIMAL', 'HEXADECIMAL' or
         'ALPHANUMERIC' this a value indicates the maximum number of
         digits/characters.

         If the Format attribute is 'BASE64' or 'BINARY', this value
         indicates set in the maximum number of bytes of properties
   the unencoded value.

         Value MUST be:

            Unsigned integer.

5.3.2.1.2.  ResponseFormat element (MANDATORY)

   The ResponseFormat Key element defines can refer to it via KeyPropertiesId attribute.
   Values that are present in the characteristics Key element itself MUST take
   precendence over values set in KeyProperties.  The KeyProperties is
   defined as follows:

   <xs:complexType name="KeyPropertiesType">
           <xs:sequence>
                   <xs:element name="Issuer" type="xs:string"
                   minOccurs="0"/>
                   <xs:element name="Usage" type="pskc:UsageType"
                   minOccurs="0"/>
                   <xs:element name="KeyProfileId" type="xs:string"
                   minOccurs="0"/>
                   <xs:element name="MasterKeyId" type="xs:string"
                   minOccurs="0"/>
                   <xs:element name="Data" type="pskc:DataType"
                   minOccurs="0" maxOccurs="unbounded"/>
                   <xs:element name="PINPolicy"
                   type="pskc:PINPolicyType" minOccurs="0"/>
                   <xs:element name="ExpiryDate"
                   type="xs:dateTime" minOccurs="0"/>
                   <xs:element name="StartDate" type="xs:dateTime"
                   minOccurs="0"/>
           </xs:sequence>
           <xs:attribute name="KeyPropertiesId" type="xs:string"
           use="required"/>
           <xs:attribute name="KeyAlgorithm"
           type="pskc:KeyAlgorithmType" use="optional"/>
   </xs:complexType>

   The attributes of the result
   of a computation.  This defines KeyProperties entity have the format following
   meanings:

   o  KeyPropertiesId (MANDATORY), a unique and global identifier of the OTP or set
      of the
   response to a challenge. KeyProperties.  The Response attribute identifier is defined by the
   following attributes: as a string of
      alphanumeric characters.

   o  Format (MANDATORY)

         Defines  <KeyAlgorithm (OPTIONAL)>, the format unique URI of the response generated by the device and
         MUST be one type of algorithm
      to use with the values defined in secret key, for profiles are described in
      Section 5.3.3

   o  CheckDigit (OPTIONAL)

         Defines if the device needs to append 6.3

   Since KeyProperties are a Luhn check digit method to commonalise the
         response.  This is only valid if elements in Key
   please refer to section Section 5.4 for detailed description of all
   elements.

5.4.  Key

   The Key represents the Format attribute key entity in the KeyContainer.  The Key is
         'DECIMAL'.  Value MUST be:

            TRUE device will append a Luhn check digit to
   defined as follows:

   <xs:complexType name="KeyType">
           <xs:sequence>
                   <xs:element name="Issuer" type="xs:string"
                   minOccurs="0"/>
                   <xs:element name="Usage" type="pskc:UsageType"
                   minOccurs="0"/>
                   <xs:element name="KeyProfileId" type="xs:string"
                   minOccurs="0"/>
                   <xs:element name="MasterKeyId" type="xs:string"
                   minOccurs="0"/>
                   <xs:element name="FriendlyName" type="xs:string"
                   minOccurs="0"/>
                   <xs:element name="Data" type="pskc:DataType"
                   minOccurs="0" maxOccurs="unbounded"/>
                   <xs:element name="PINPolicy"
                   type="pskc:PINPolicyType" minOccurs="0"/>
                   <xs:element name="ExpiryDate" type="xs:dateTime"
                   minOccurs="0"/>
                   <xs:element name="StartDate" type="xs:dateTime"
                   minOccurs="0"/>
           </xs:sequence>
           <xs:attribute name="KeyId" type="xs:string"
           use="required"/>
           <xs:attribute name="KeyAlgorithm"
           type="pskc:KeyAlgorithmType" use="optional"/>
           <xs:attribute name="KeyPropertiesId" type="xs:string"
           use="optional"/>
   </xs:complexType>

   The attributes of the response.

            FALSE device will not append Key entity have the following meanings:

   o  KeyId (MANDATORY), a Luhn check digit to unique and global identifier of the
            response. symmetric
      key.  The identifier is defined as a string of alphanumeric
      characters.

   o  Length (MANDATORY)
         Defines  <KeyAlgorithm (OPTIONAL)>, the length unique URI of the response generated by type of algorithm
      to use with the device.

         If secret key, for profiles are described in
      Section 6.3

   o  <KeyPropertiesId (OPTIONAL)>, the Format attribute is 'DECIMAL', 'HEXADECIMAL' or
         'ALPHANUMERIC' this unique id of the KeyProperties
      whose value indicates the number instance of digits/
         characters. this key inherits.  If the Format attribute is 'BASE64' or 'BINARY', this value
         indicates is
      set implementation MUST lookup the number of bytes Keyproperties element referred
      to by this unique Id and this instance of key will inherit all
      values from the unencoded value.

         Value KeyProperties.  Values held in the key instance it
      MUST be:

            Unsigned integer.

5.3.3.  ValueFormat take precedence over values inherited from KeyProperties."/>

   The ValueFormat element defines allowed formats for challenges or
   responses in OTP algorithms.

   ValueFormat is defined as follows:

   <simpleType name="ValueFormat">
     <restriction base="string">
       <enumeration value="DECIMAL"/>
       <enumeration value="HEXADECIMAL"/>
       <enumeration value="ALPHANUMERIC"/>
       <enumeration value="BASE64"/>
       <enumeration value="BINARY"/>
     </restriction>
   </simpleType>

      DECIMAL Only numerical digits

      HEXADECIMAL Hexadecimal response

      ALPHANUMERIC All letters and numbers (case sensitive)

      BASE64 Base 64 encoded

      BINARY Binary data, this is mainly used in case of connected
      devices

5.3.4.  PINPolicy

   The PINPolicy element defines a mean to define how the usage elements of a
   specific key is protected by a PIN.  The PIN itself can be
   transmitted using the container as another Key

   PINPolicy is defined as follows:

  <xs:complexType name="PINPolicyType">
      <xs:sequence>
          <xs:element name="PINUsageMode" type="pskc:PINUsageModeType"/>
          <xs:element name="WrongPINtry" type="xs:unsignedInt"
            minOccurs="0"/>
      </xs:sequence>
      <xs:attribute name="PINKeyId" type="xs:string" use="required"/>
  </xs:complexType>

   The attributes of PINPolicy entity have the following meaning meanings:

   o  PINKeyId, the unique  <Issuer (OPTIONAL)>, The key Id within issuer name, this container that contains is normally the value
      name of the PIN organization that protects issues the key

   The elements of PINPolicy have to the following meaning

   o  <PINUsageMode>, end user of
      the way key.  For example MyBank issuing hardware tokens to their
      retail banking users 'MyBank' would be the PIN issuer.  The Issuer is used during
      defined as a String.

   o  <Usage (MANDATORY)>, defines the intended usage of the key and
      related metadata as defined in Section 5.3.4.1 5.4.2

   o  <WrongPINtry>,  <KeyProfileId (OPTIONAL)>, A unique identifier used between the number
      sending and receiving party of times the PIN can be entered wrongly
      before it MUST not be possible container to use the establish a set of
      constant values related to a key anymore

5.3.4.1.  PINUsageMode

   The PINUsageMode element defines how that are not transmitted via the PIN is used with
      container.  For example a specific
   key

   PINUsageMode is defined as follows:

   <xs:complexType name="PINUsageModeType">
       <xs:choice maxOccurs="unbounded">
           <xs:element name="Local"/>
           <xs:element name="Prepend"/>
           <xs:element name="InAlgo"/>
       </xs:choice>
   </xs:complexType>

   The elements of PINPolicy smart card application personalisation
      profile id related to attributes present on a smart card
      application that have influence when computing a response.  An
      example could be an EMV MasterCard CAP [CAP] application on a card
      personalised with data for a specific batch of cards such as:

         IAF Internet authentication flag

         CVN Cryptogram version number, for example (MCHIP2, MCHIP4,
         VISA 13, VISA14)

         AIP (Application Interchange Profile), 2 bytes

         TVR Terminal Verification Result, 5 bytes

         CVR The card verification result

         AmountOther

         TransactionDate

         TerminalCountryCode

         TransactionCurrencyCode

         AmountAuthorised

         IIPB

      These values are not contained within attributes in the following meaning

   o  <Local>, container
      but are shared between the PIN manufacturing and the validation
      service through this unique KeyProfileId.  The KeyProfileId is checked locally on
      defined as a String.

   o  <MasterKeyId (OPTIONAL)>, The unique reference to a master key
      when key derivation schemes are used and no specific key is
      transported but only the device before allowing reference to the master key to be used in executing the algorithm to
      derive a specific key and some derivation data.

   o  <Prepend>, the PIN  <FriendlyName (OPTIONAL)>, The user friendly name that is prepended assigned
      to the OTP or response hance it
      MUST be chacked by the validation server

   o  <InAlgo>, the PIN secret key for easy reference.  The FriendlyName is used defined
      as part of a String.

   o  <Data (OPTIONAL)>, the algorithm computation

6.  Usage and profile of algorithms for element carrying the data related to the portable symmetric
      key
    container

   This section details as defined in Section 5.4.1

   o  <PINPolicy (OPTIONAL)>, the use policy of the XML encryption and XML signature
   elements PIN relating to protect the keys transported in the cotainer.  It also
   profiles the number
      usage of algorithms supported by XML encryption and XML
   signature to a mandatory subset for interoperability.

   When no algorithm is provided the values within the container are
   unencrypted, implementations SHALL ensure this key as defined in Section 5.4.4

   o  <ExpiryDate (OPTIONAL)>, the privacy expiry date of the key data
   through other standard mechanisms e.g. transport level encryption.

6.1.  Usage of EncryptionKey key, it MUST not
      be possible to protect keys in transit

   The EncryptionKey element in use this key after this date

   o  <StartDate (OPTIONAL)>, the KeyContainer defines start date of the key,
   algorithm and parameters used it MUST not be
      possible to encrypt use this key before this date

5.4.1.  Data (OPTIONAL)

   Defines the Secret Key data attributes in of the Container.  The encryption symmetric key.  Each is applied on each
   individual Secret Key data a name
   value pair which has either a plain value (in case of no encryption)
   or a encrypted value as defined in the Container.  The encryption method
   MUST be the same for all Secret Key data EncryptedDataType in XML
   Encryption.

   This is also where the container. key value is transported, Section 7 defines a
   list of reserved attribute names.

   Data element is defined as follows:

<xs:complexType name="DataType">
    <xs:sequence>
    <xs:choice>
       <xs:element name="PlainValue" type="xs:base64Binary"/>
       <xs:element name="EncryptedValue" type="xenc:EncryptedDataType"/>
    </xs:choice>
    <xs:element name="ValueMAC" type="xs:base64Binary" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="Name" type="xs:string" use="required"/>
</xs:complexType>

   The following sections define specifically the different supported
   means to protect attributes of the keys:

6.1.1.  Protecting keys using a pre-shared key via symmetric algorithms

   When protecting Data element have the payload with pre-shared keys implementations
   SHOULD set following meanings:

   o  Name, defines the name of the specific pre-shared key in the KeyName
   element of the EncryptionKey name-value pair, Section 7 defines a
      list of the KeyContainer.  For example:

   <KeyContainer Version="1.0"
     xmlns="urn:ietf:params:xml:ns:keyprov:container:1.0"
     xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
     xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
       <EncryptionKey>
           <ds:KeyName>PRE_SHARED_KEY</ds:KeyName>
       </EncryptionKey>
       .... reserved attribute names
   The following is the list elements of symmetric key encryption algorithm and
   possible parameters used to protect the Secret Key data in the
   container.  Systems implementing PSKC MUST support Data element have the MANDATORY
   algorithms detailed below. following meanings:

   o  The encryption algorithm URI can be one <PlainValue> conveys an unencrypted value of the following.

   o  http://www.w3.org/2001/04/xmlenc#tripledes-cbc - MANDATORY
   o  http://www.w3.org/2001/04/xmlenc#aes128-cbc - MANDATORY

   o  http://www.w3.org/2001/04/xmlenc#aes192-cbc - OPTIONAL

   o  http://www.w3.org/2001/04/xmlenc#aes256-cbc - MANDATORY

   o  http://www.w3.org/2001/04/xmlenc#kw-tripledes - MANDATORY

   o  http://www.w3.org/2001/04/xmlenc#kw-aes128 - MANDATORY

   o  http://www.w3.org/2001/04/xmlenc#kw-aes256 - MANDATORY name-value
      pair in base 64 encoding.

   o  http://www.w3.org/2001/04/xmlenc#kw-aes512 - OPTIONAL

   When algorithms without integrity checks are used (e.g.
   http://www.w3.org/2001/04/xmlenc#aes256-cbc) a keyed MAC  The <EncryptedValue> element in the DataType conveys an encrypted
      value using of the same key name-value pair inside an EncryptedDataType as the encryption key SHOULD be placed
      defined in the ValueMAC XML Encryption.

   o  The <ValueMAC (OPTIONAL)> element of the Data element.  In this case in the DataType conveys a keyed
      MAC algorithm type
   MUST be set in value of the MACAlgorithm element in unencrypted data for the cases where the
      algorithm to protect key container entity data in transit, as defined described in section
      Section 5.1.  Implementations of PSKC MUST 6.1.1 ,does not support the
   MANDATORY MAC algorithms detailed below. integrity checks.

5.4.2.  Usage (MANDATORY)

   The MACAlgorithm URI can be
   one Usage element defines the usage attribute(s) of the following:

   o  http://www.w3.org/2000/09/xmldsig#hmac-sha1 - MANDATORY

   For example:

   <KeyContainer Version="1.0"
     xmlns="urn:ietf:params:xml:ns:keyprov:container:1.0"
     xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
     xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
       <EncryptionKey>
           <ds:KeyName>PRE_SHARED_KEY</ds:KeyName>
       </EncryptionKey>
       <MACAlgorithm>http://www.w3.org/2000/09/xmldsig#hmac-sha1
       </MACAlgorithm>
       .....

6.1.2.  Protecting keys using passphrase based encryption keys

   To be able to support passphrase based encryption keys as defined in
   PKCS#5 the following XML representation of the PBE relates parameters
   have been introduced in the schema.  Although the approach key entity.
   Usage is
   extensible implementations of PSKC MUST support the
   KeyDerivationMethod algorithm URI of
   http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5#pbkdf2. defined as follows:

   <xs:complexType name="DerivedKeyType"> name="UsageType">
           <xs:sequence>
                   <xs:element name="KeyDerivationMethod"
             type="pskc:KeyDerivationMethodType" minOccurs="0"/>
           <xs:element ref="xenc:ReferenceList" minOccurs="0"/> name="ChallengeFormat" minOccurs="0">
                           <xs:complexType>
                             <xs:attribute name="Format"
                             type="pskc:ValueFormatType"
                             use="required"/>
                             <xs:attribute name="Min"
                             type="xs:unsignedInt" use="required"/>
                             <xs:attribute name="Max"
                             type="xs:unsignedInt" use="required"/>
                             <xs:attribute name="CheckDigits"
                             type="xs:boolean" default="false"/>
                           </xs:complexType>
                   </xs:element>
                   <xs:element name="CarriedKeyName" type="xs:string"
             minOccurs="0"/>
       </xs:sequence> name="ResponseFormat">
                           <xs:complexType>
                             <xs:attribute name="Id" type="xs:ID" use="optional"/> name="Format"
                             type="pskc:ValueFormatType"
                             use="required"/>
                             <xs:attribute name="Type" type="xs:anyURI" use="optional"/> name="Length"
                             type="xs:unsignedInt" use="required"/>
                             <xs:attribute name="CheckDigits"
                             type="xs:boolean" default="false"/>
                           </xs:complexType>
       <xs:complexType name="KeyDerivationMethodType">
       <xs:sequence>
               <xs:any namespace="##other" minOccurs="0"
                 maxOccurs="unbounded"/>
                   </xs:element>
           </xs:sequence>
           <xs:attribute name="Algorithm" type="xs:anyURI" use="required"/> name="OTP" type="xs:boolean"
           default="false"/>
           <xs:attribute name="CR" type="xs:boolean"
           default="false"/>
           <xs:attribute name="Integrity" type="xs:boolean"
           default="false"/>
           <xs:attribute name="Encrypt" type="xs:boolean"
           default="false"/>
           <xs:attribute name="Unlock" type="xs:boolean"
           default="false"/>
   </xs:complexType>

   The attributes of the DerivedKey have Usage element define the following meanings:

   o  ID (OPTIONAL), intended usage of the unique ID for this
   key

   o  Type (OPTIONAL), TODO

   The elements and are a combination of one or more of the DerivedKey have the following meanings: (set to
   true):

   o  <KeyDerivationMethod>: URI of  OTP, the algorithms key will be used to derive for OTP generation

   o  CR, the key e.g.
      (http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5#pbkdf2) will be used for Challenge/Response purposes
   o  <ReferenceList (OPTIONAL)>: a list of IDs of  Encrypt, the elements that
      have been encrypted by this key will be used for data encryption purposes

   o  <CarriedKeyName (OPTIONAL)>: friendly name of  Integrity, the key

   When using the PKCS5 PBE algorithm
   (URI=http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5#pbes2)
   and related parameters, the DerivedKey element MUST will be used within
   the EncryptionKey element of to generate a keyed message digest
      for data integrity or authentication purposes.

   o  Unlock, the KeyContainer key will be used for an inverse challenge response in exactly
      the form as
   shown below:

<?xml version="1.0" encoding="UTF-8"?>
<KeyContainer
  xmlns="urn:ietf:params:xml:ns:keyprov:container:1.0"
  xmlns:pkcs-5=
    "http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5v2-0#"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
  xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
  Version="1.0">
    <EncryptionKey>
      <DerivedKey Id="#Passphrase1">
        <CarriedKeyName>Passphrase1</CarriedKeyName>
        <KeyDerivationMethod
          Algorithm=
        "http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5#pbkdf2">
          <Parameters xsi:type="pkcs-5:PBKDF2ParameterType">
            <Salt>
              <Specified>Df3dRAhjGh8=</Specified>
            </Salt>
            <IterationCount>2000</IterationCount>
            <KeyLength>16</KeyLength>
            <PRF/>
          </Parameters>
        </KeyDerivationMethod>
      </DerivedKey>
    </EncryptionKey>
....

6.2.  Protecting keys using asymmetric algorithms

   The following is case a user has locked the list of asymmetric key encryption algorithm device by entering a wrong PIN too
      many times (for devices with PIN-input capability)

5.4.2.1.  OTP and
   possible parameters used to protect CR specific Usage elements (OPTIONAL)

   When the Secret Key data in intended usage of a key usage is OTP and/or CR, the
   container.  Systems implementing PSKC
   following additional elements MUST be provided within the Usage
   element to support the MANDATORY
   algorithms detailed below. OTP and/or the response computation as
   required by the underlying algorithm.  These elements also allow to
   customize or configure the result of the computation (e.g. format,
   length).

5.4.2.1.1.  ChallengeFormat element (MANDATORY)

   The encryption algorithm URI can be one ChallengeFormat element defines the characteristics of the following.

   o  http://www.w3.org/2001/04/xmlenc#rsa-1_5 - MANDATORY
   challenge in a CR usage scenario.  The Challenge element is defined
   by the following attributes:

   o  http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p - OPTIONAL

   For example:

   TODO

6.3.  Profile of Key Algorithm

   This section profiles  Format (MANDATORY)

         Defines the type(s) of algorithm format of that can be used the challenge accepted by the key(s) transported device and
         MUST be one of the values defined in Section 5.4.3

   o  CheckDigit (OPTIONAL)

         Defines if the container.  The following algorithm
   URIs are among device needs to check the default support list.

   o  http://www.w3.org/2001/04/xmlenc#tripledes-cbc

   o  http://www.w3.org/2001/04/xmlenc#aes128-cbc

   o  http://www.w3.org/2001/04/xmlenc#aes192-cbc

   o  http://www.w3.org/2001/04/xmlenc#aes256-cbc

   o  http://www.ietf.org/keyprov/pskc#hotp

   o  http://www.ietf.org/keyprov/pskc#valuecompare

6.3.1.  OTP Key Algorithm Identifiers

   OTP key algorithm URIs have not been defined appended Luhn check
         digit contained in a commonly available
   standard specification. provided challenge.  This document defines the following URIs for
   the known open standard OTP algorithms.

6.3.1.1.  HOTP

   Standard document: RFC4226

   Identifier: http://www.ietf.org/keyprov/pskc#hotp

   Note that is only valid if
         the actual URL Format attribute is 'DECIMAL'.  Value MUST be:

            TRUE device will be finalized once check the appended Luhn check digit in a URL for this
   document is determined.

6.3.1.2.  Other OTP Algorithms

   An implementation should refer to vendor supplied OTP key algorithm
   URIs for proprietary algorithms.

6.3.2.  PIN key value compare algorithm identifier

   PIN key algorithm URIs have
            provided challenge

            FALSE device will not been defined check appended Luhn check digit in a commonly available
   standard specification.  This document defines
            challenge

   o  Min (MANDATORY)

         Defines the following URIs for
   a straight value comaprison minimum size of the transported secret key data as
   when required to compare a PIN.

   Identifier: http://www.ietf.org/keyprov/pskc#valuecompare

   Note that challenge accepted by the actual URL will be finalized once a URL
         device for this
   document is determined.

7.  Reserved data attribute names

   The following key data attribute names have been reserved:

      SECRET: CR mode.

         If the shared secret key Format attribute is 'DECIMAL', 'HEXADECIMAL' or
         'ALPHANUMERIC' this value in binary, base64 encoded

      COUNTER: the event counter for event based OTP algorithms. 8 bytes
      unsigned integer in big endian (i.e. network byte order) form
      base64 encoded

      TIME: indicates the time for time based OTP algorithms. 8 bytes unsigned
      integer in big endian (i.e. network byte order) form base64
      encoded (Number minimum number of seconds since 1970)

      TIME_INTERVAL:
         digits/characters.

         If the time interval Format attribute is 'BASE64' or 'BINARY', this value for time based OTP
      algorithms. 8
         indicates the minimum number of bytes unsigned integer in big endian (i.e. network
      byte order) form base64 encoded.

      TIME_DRIFT: of the unencoded value.

         Value MUST be:

            Unsigned integer.

   o  Max (MANDATORY)

         Defines the maximum size of the challenge accepted by the
         device clock drift value for time based OTP
      algorithms.  The CR mode.

         If the Format attribute is 'DECIMAL', 'HEXADECIMAL' or
         'ALPHANUMERIC' this value indicates the maximum number of seconds that
         digits/characters.

         If the device
      clock may drift each day. 2 Format attribute is 'BASE64' or 'BINARY', this value
         indicates the maximum number of bytes unsigned integer in big endian
      (i.e. network byte order) form base64 encoded.

8.  Formal Syntax of the unencoded value.

         Value MUST be:

            Unsigned integer.

5.4.2.1.2.  ResponseFormat element (MANDATORY)

   The following syntax specification uses ResponseFormat element defines the characteristics of the result
   of a computation.  This defines the widely adopted XML schema format as of the OTP or of the
   response to a challenge.  The Response attribute is defined by the
   following attributes:

   o  Format (MANDATORY)

         Defines the format of the response generated by the device and
         MUST be one of the values defined in Section 5.4.3

   o  CheckDigit (OPTIONAL)
         Defines if the device needs to append a W3C recommendation
   (http://www.w3.org/TR/xmlschema-0/).  It Luhn check digit to the
         response.  This is only valid if the Format attribute is
         'DECIMAL'.  Value MUST be:

            TRUE device will append a complete syntax
   definition in Luhn check digit to the XML Schema Definition format (XSD)

   All implementations response.

            FALSE device will not append a Luhn check digit to the
            response.

   o  Length (MANDATORY)

         Defines the length of this standard must comply with the schema
   below.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:pskc="urn:ietf:params:xml:ns:keyprov:container:1.0"
  xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
  xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
  targetNamespace="urn:ietf:params:xml:ns:keyprov:container:1.0"
  elementFormDefault="qualified" attributeFormDefault="unqualified"
  version="1.0">
    <xs:import namespace="http://www.w3.org/2000/09/xmldsig#"
      schemaLocation=
      "http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/
      xmldsig-core-schema.xsd"/>
    <xs:import namespace="http://www.w3.org/2001/04/xmlenc#"
      schemaLocation="http://www.w3.org/TR/2002/
      REC-xmlenc-core-20021210/xenc-schema.xsd"/>

    <xs:complexType name="KeyContainerType">
    <xs:sequence>
        <xs:element name="EncryptionKey" type="ds:KeyInfoType"
          minOccurs="0"/>
        <xs:element name="MACAlgorithm" type="pskc:KeyAlgorithmType"
          minOccurs="0"/>
        <xs:element name="Device" type="pskc:DeviceType"
          maxOccurs="unbounded"/>
        <xs:element name="Signature" type="ds:SignatureType"
          minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="Version" type="pskc:VersionType"
      use="required"/>
    </xs:complexType>
    <xs:simpleType name="VersionType" final="restriction">
            <xs:restriction base="xs:string">
                    <xs:pattern value="\d{1,2}\.\d{1,3}"/>
            </xs:restriction>
    </xs:simpleType> response generated by the device.

         If the Format attribute is 'DECIMAL', 'HEXADECIMAL' or
         'ALPHANUMERIC' this value indicates the number of digits/
         characters.

         If the Format attribute is 'BASE64' or 'BINARY', this value
         indicates the number of bytes of the unencoded value.

         Value MUST be:

            Unsigned integer.

5.4.3.  ValueFormat

   The ValueFormat element defines allowed formats for challenges or
   responses in OTP algorithms.

   ValueFormat is defined as follows:

   <simpleType name="ValueFormat">
     <restriction base="string">
       <enumeration value="DECIMAL"/>
       <enumeration value="HEXADECIMAL"/>
       <enumeration value="ALPHANUMERIC"/>
       <enumeration value="BASE64"/>
       <enumeration value="BINARY"/>
     </restriction>
   </simpleType>
      DECIMAL Only numerical digits

      HEXADECIMAL Hexadecimal response

      ALPHANUMERIC All letters and numbers (case sensitive)

      BASE64 Base 64 encoded

      BINARY Binary data, this is mainly used in case of connected
      devices

5.4.4.  PINPolicy

   The PINPolicy element provides a mean to define how the usage of a
   specific key is protected by a PIN.  The PIN itself can be
   transmitted as a key using the container.

   If the PINPolicy element is present in the Key element then the key
   is protected with a PIN as defined within the PINPolicy element.

   PINPolicy is defined as follows:

  <xs:complexType name="KeyType"> name="PINPolicyType">
      <xs:sequence>
          <xs:element name="Issuer" type="xs:string" minOccurs="0"/>
            <xs:element name="Usage" type="pskc:UsageType"/>
            <xs:element name="CardAppPersoProfileId" type="xs:string"
              minOccurs="0"/>
            <xs:element name="FriendlyName" type="xs:string"
              minOccurs="0"/>
            <xs:element name="Data" type="pskc:DataType" minOccurs="0"
              maxOccurs="unbounded"/>
            <xs:element name="PINPolicy" type="pskc:PINPolicyType"
              minOccurs="0"/>
            <xs:element name="ExpiryDate" type="xs:dateTime"
              minOccurs="0"/> name="PINUsageMode" type="pskc:PINUsageModeType"/>
          <xs:element name="StartDate" type="xs:dateTime" name="WrongPINtry" type="xs:unsignedInt"
            minOccurs="0"/>
      </xs:sequence>
      <xs:attribute name="KeyId" type="xs:string" use="required"/>
        <xs:attribute name="KeyAlgorithm" type="pskc:KeyAlgorithmType"
          use="required"/>
    </xs:complexType>
    <xs:complexType name="DerivedKeyType">
        <xs:sequence>
            <xs:element name="KeyDerivationMethod"
              type="pskc:KeyDerivationMethodType" minOccurs="0"/>
            <xs:element ref="xenc:ReferenceList" minOccurs="0"/>
            <xs:element name="CarriedKeyName" type="xs:string"
              minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="Id" type="xs:ID" use="optional"/>
        <xs:attribute name="Type" type="xs:anyURI" use="optional"/>
    </xs:complexType>
    <xs:complexType name="KeyDerivationMethodType">
        <xs:sequence>
            <xs:any namespace="##other" minOccurs="0"
            maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="Algorithm" type="xs:anyURI" use="required"/>
    </xs:complexType>
    <xs:complexType name="PINPolicyType">
        <xs:sequence>
            <xs:element name="PINUsageMode"
              type="pskc:PINUsageModeType"/>
            <xs:element name="WrongPINtry" type="xs:unsignedInt"
              minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="PINKeyId" name="PINKeyId" type="xs:string" use="required"/>
  </xs:complexType>

   The attributes of PINPolicy have the following meaning

   o  PINKeyId, the unique key Id within this container that contains
      the value of the PIN that protects the key

   The elements of PINPolicy have the following meaning

   o  <PINUsageMode (MANDATORY)> , the way the PIN is used during the
      usage of the key as defined in Section 5.4.4.1

   o  <WrongPINtry (OPTIONAL)>, the number of times the PIN can be
      entered wrongly before it MUST not be possible to use the key
      anymore

5.4.4.1.  PINUsageMode

   The PINUsageMode element defines how the PIN is used with a specific
   key

   PINUsageMode is defined as follows:

   <xs:complexType name="PINUsageModeType">
       <xs:choice maxOccurs="unbounded">
           <xs:element name="Local"/>
           <xs:element name="Prepend"/>
           <xs:element name="Embed"/> name="InAlgo"/>
       </xs:choice>
   </xs:complexType>
    <xs:complexType name="DeviceIdType">
        <xs:sequence>
        <xs:element name="Manufacturer" type="xs:string"/>
        <xs:element name="SerialNo" type="xs:string"/>
        <xs:element name="Model" type="xs:string" minOccurs="0"/>
        <xs:element name="IssueNo" type="xs:string" minOccurs="0"/>
        <xs:element name="ExpiryDate" type="xs:dateTime" minOccurs="0"/>
        <xs:element name="StartDate" type="xs:dateTime" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="DeviceType">
      <xs:sequence>
        <xs:element name="DeviceId" type="pskc:DeviceIdType"
          minOccurs="0"/>
        <xs:element name="Key" type="pskc:KeyType"
          maxOccurs="unbounded"/>
        <xs:element name="UserId" type="xs:string" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
    <xs:complexType name="UsageType">
        <xs:sequence>
            <xs:element name="ResponseFormat">
                <xs:complexType>
                    <xs:attribute name="Format"
                      type="pskc:ValueFormatType" use="required"/>
                    <xs:attribute name="Length" type="xs:unsignedInt"
                      use="required"/>
                    <xs:attribute name="CheckDigits" type="xs:boolean"
                      default="false"/>
                </xs:complexType>
            </xs:element>
            <xs:element name="ChallengeFormat" minOccurs="0">
                <xs:complexType>
                    <xs:attribute name="Format"
                      type="pskc:ValueFormatType" use="required"/>
                    <xs:attribute name="Min" type="xs:unsignedInt"
                      use="required"/>
                    <xs:attribute name="Max" type="xs:unsignedInt"
                      use="required"/>
                    <xs:attribute name="CheckDigits" type="xs:boolean"
                      default="false"/>
                </xs:complexType>
            </xs:element>
            </xs:sequence>
            <xs:attribute name="OTP" type="xs:boolean" default="false"/>
            <xs:attribute name="CR" type="xs:boolean" default="false"/>
            <xs:attribute name="Integrity" type="xs:boolean"
              default="false"/>
            <xs:attribute name="Encrypt" type="xs:boolean"
              default="false"/>
            <xs:attribute name="Unlock"

   The elements of PINPolicy have the following meaning

   o  <Local>, the PIN is checked locally on the device before allowing
      the key to be used in executing the algorithm

   o  <Prepend>, the PIN is prepended to the OTP or response hance it
      MUST be chacked by the validation server

   o  <InAlgo>, the PIN is used as part of the algorithm computation

6.  Usage and profile of algorithms for the portable symmetric key
    container

   This section details the use of the XML encryption and XML signature
   elements to protect the keys transported in the cotainer.  It also
   profiles the number of algorithms supported by XML encryption and XML
   signature to a mandatory subset for interoperability.

   When no algorithm is provided the values within the container are
   unencrypted, implementations SHALL ensure the privacy of the key data
   through other standard mechanisms e.g. transport level encryption.

6.1.  Usage of EncryptionKey to protect keys in transit

   The EncryptionKey element in the KeyContainer defines the key,
   algorithm and parameters used to encrypt the Secret Key data
   attributes in the Container.  The standard schema [XMLENC] is adopted
   in carry such information and an encrypted value.  The encryption is
   applied on each individual Secret Key data in the Container.  The
   encryption method MUST be the same for all Secret Key data in the
   container.

   The following sections define specifically the different supported
   means to protect the keys:

6.1.1.  Protecting keys using a pre-shared key via symmetric algorithms

   When protecting the payload with pre-shared keys implementations
   SHOULD set the name of the specific pre-shared key in the KeyName
   element of the EncryptionKey of the KeyContainer.  For example:

   <KeyContainer Version="1.0"
     xmlns="urn:ietf:params:xml:ns:keyprov:container:1.0"
     xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
     xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
       <EncryptionKey>
           <ds:KeyName>PRE_SHARED_KEY</ds:KeyName>
       </EncryptionKey>
       ....

   The following is the list of symmetric key encryption algorithm and
   possible parameters used to protect the Secret Key data in the
   container.  Systems implementing PSKC MUST support the MANDATORY
   algorithms detailed below.

   The encryption algorithm URI can be one of the following.

   o  http://www.w3.org/2001/04/xmlenc#tripledes-cbc - MANDATORY

   o  http://www.w3.org/2001/04/xmlenc#aes128-cbc - MANDATORY

   o  http://www.w3.org/2001/04/xmlenc#aes192-cbc - OPTIONAL

   o  http://www.w3.org/2001/04/xmlenc#aes256-cbc - MANDATORY

   o  http://www.w3.org/2001/04/xmlenc#kw-tripledes - MANDATORY

   o  http://www.w3.org/2001/04/xmlenc#kw-aes128 - MANDATORY

   o  http://www.w3.org/2001/04/xmlenc#kw-aes256 - MANDATORY

   o  http://www.w3.org/2001/04/xmlenc#kw-aes512 - OPTIONAL

   When algorithms without integrity checks are used (e.g.
   http://www.w3.org/2001/04/xmlenc#aes256-cbc) a keyed MAC value using
   the same key as the encryption key SHOULD be placed in the ValueMAC
   element of the Data element.  In this case the MAC algorithm type
   MUST be set in the MACAlgorithm element in the key container entity
   as defined in Section 5.1.  Implementations of PSKC MUST support the
   MANDATORY MAC algorithms detailed below.  The MACAlgorithm URI can be
   one of the following:

   o  http://www.w3.org/2000/09/xmldsig#hmac-sha1 - MANDATORY

   For example:

   <KeyContainer Version="1.0"
     xmlns="urn:ietf:params:xml:ns:keyprov:container:1.0"
     xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
     xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
       <EncryptionKey>
           <ds:KeyName>PRE_SHARED_KEY</ds:KeyName>
       </EncryptionKey>
       <MACAlgorithm>http://www.w3.org/2000/09/xmldsig#hmac-sha1
       </MACAlgorithm>
       .....

6.1.2.  Protecting keys using passphrase based encryption keys

   To be able to support passphrase based encryption keys as defined in
   PKCS#5 the following XML representation of the PBE relates parameters
   have been introduced in the schema.  Although the approach is
   extensible implementations of PSKC MUST support the
   KeyDerivationMethod algorithm URI of
   http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5#pbkdf2.

   <xs:complexType name="DerivedKeyType">
       <xs:sequence>
           <xs:element name="KeyDerivationMethod"
             type="pskc:KeyDerivationMethodType" minOccurs="0"/>
           <xs:element ref="xenc:ReferenceList" minOccurs="0"/>
           <xs:element name="CarriedKeyName" type="xs:string"
             minOccurs="0"/>
       </xs:sequence>
       <xs:attribute name="Id" type="xs:ID" use="optional"/>
       <xs:attribute name="Type" type="xs:anyURI" use="optional"/>
       </xs:complexType>
       <xs:complexType name="KeyDerivationMethodType">
       <xs:sequence>
               <xs:any namespace="##other" minOccurs="0"
                 maxOccurs="unbounded"/>
       </xs:sequence>
       <xs:attribute name="Algorithm" type="xs:anyURI"
       use="required"/>
   </xs:complexType>

   The attributes of the DerivedKey have the following meanings:

   o  ID (OPTIONAL), the unique ID for this key

   o  Type (OPTIONAL), This attribute was included for conformance with
      xml encryption, it is an optional attribute identifying type
      information about the plaintext form of the encrypted content.
      Please see [XMLENC] section 3.1 Type for more details.

   The elements of the DerivedKey have the following meanings:

   o  <KeyDerivationMethod>: URI of the algorithms used to derive the
      key e.g.
      (http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5#pbkdf2)

   o  <ReferenceList (OPTIONAL)>: a list of IDs of the elements that
      have been encrypted by this key

   o  <CarriedKeyName (OPTIONAL)>: friendly name of the key

   When using the PKCS5 PBE algorithm
   (URI=http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5#pbes2)
   and related parameters, the DerivedKey element MUST be used within
   the EncryptionKey element of the KeyContainer in exactly the form as
   shown below:

   <?xml version="1.0" encoding="UTF-8"?>
   <KeyContainer
     xmlns="urn:ietf:params:xml:ns:keyprov:container:1.0"
     xmlns:pkcs-5=
       "http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5v2-0#"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
     xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
     Version="1.0">
       <EncryptionKey>
         <DerivedKey Id="#Passphrase1">
           <CarriedKeyName>Passphrase1</CarriedKeyName>
           <KeyDerivationMethod
             Algorithm=
        "http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5#pbkdf2">
             <Parameters xsi:type="pkcs-5:PBKDF2ParameterType">
               <Salt>
                 <Specified>Df3dRAhjGh8=</Specified>
               </Salt>
               <IterationCount>2000</IterationCount>
               <KeyLength>16</KeyLength>
               <PRF/>
             </Parameters>
           </KeyDerivationMethod>
         </DerivedKey>
       </EncryptionKey>
   ....

6.2.  Protecting keys using asymmetric algorithms

   The following is the list of asymmetric key encryption algorithm and
   possible parameters used to protect the Secret Key data in the
   container.  Systems implementing PSKC MUST support the MANDATORY
   algorithms detailed below.  The encryption algorithm URI can be one
   of the following.

   o  http://www.w3.org/2001/04/xmlenc#rsa-1_5 - MANDATORY

   o  http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p - OPTIONAL

   For example:

   <?xml version="1.0" encoding="UTF-8"?>

   <pskc:KeyContainer Version="1.0"
     xmlns:pskc="urn:ietf:params:xml:ns:keyprov:container:1.0"
     xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
     xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
       <pskc:EncryptionKey>
           <ds:X509Data>
               <ds:X509Certificate>miib</ds:X509Certificate>
           </ds:X509Data>
       </pskc:EncryptionKey>
       <pskc:Device>
           <pskc:DeviceId>
               <pskc:Manufacturer>ACME</pskc:Manufacturer>
               <pskc:SerialNo>0755225266</pskc:SerialNo>
           </pskc:DeviceId>
           <pskc:Key KeyAlgorithm=
            "http://www.ietf.org/keyprov/pskc#hotp"
            KeyId="0755225266">
               <pskc:Issuer>AnIssuer</pskc:Issuer>
               <pskc:Usage OTP="true">
                   <pskc:ResponseFormat Length="8"
                   Format="DECIMAL"/>
               </pskc:Usage>
               <pskc:Data Name="COUNTER">
                   <pskc:PlainValue>AprkuA==</pskc:PlainValue>
               </pskc:Data>
               <pskc:Data Name="SECRET">
                 <pskc:EncryptedValue Id="ED">
                   <xenc:EncryptionMethod
                     Algorithm=
                     "http://www.w3.org/2001/04/xmlenc#rsa_1_5"/>
                   <xenc:CipherData>
                     <xenc:CipherValue>rf4dx3rvEPO0vKtKL14NbeVu8nk=
                     </xenc:CipherValue>
                   </xenc:CipherData>
                 </pskc:EncryptedValue>
               </pskc:Data>
           </pskc:Key>
       </pskc:Device>
   </pskc:KeyContainer>

6.3.  Profile of Key Algorithm

   This section profiles the type(s) of algorithm of that can be used by
   the key(s) transported in the container.  The following algorithm
   URIs are among the default support list.

   o  http://www.w3.org/2001/04/xmlenc#tripledes-cbc

   o  http://www.w3.org/2001/04/xmlenc#aes128-cbc

   o  http://www.w3.org/2001/04/xmlenc#aes192-cbc

   o  http://www.w3.org/2001/04/xmlenc#aes256-cbc

   o  http://www.ietf.org/keyprov/pskc#hotp

   o  http://www.ietf.org/keyprov/pskc#pin

6.3.1.  OTP Key Algorithm Identifiers

   OTP key algorithm URIs have not been defined in a commonly available
   standard specification.  This document defines the following URIs for
   the standard OTP algorithms defined in [HOTP].

6.3.1.1.  HOTP

   Standard document: RFC4226

   Identifier: http://www.ietf.org/keyprov/pskc#hotp

   Note that the actual URL will be finalized once a URL for this
   document is determined.

6.3.1.2.  Other OTP Algorithms

   An implementation should refer to vendor registered OTP key algorithm
   URIs for other existing OTP algorithms, for example, the RSA SecurID
   OTP algorithm as follows.

   o  http://www.rsa.com/rsalabs/otps/schemas/2005/09/
      otps-wst#SecurID-AES

6.3.2.  PIN key value compare algorithm identifier

   PIN key algorithm URIs have not been defined in a commonly available
   standard specification.  This document defines the following URIs for
   a straight value comaprison of the transported secret key data as
   when required to compare a PIN.

   Identifier: http://www.ietf.org/keyprov/pskc#pin

   Note that the actual URL will be finalized once a URL for this
   document is determined.

7.  Reserved data attribute names

   The following key data attribute names have been reserved:

      SECRET: the shared secret key value in binary, base64 encoded

      COUNTER: the event counter for event based OTP algorithms. 8 bytes
      unsigned integer in big endian (i.e. network byte order) form
      base64 encoded

      TIME: the time for time based OTP algorithms. 8 bytes unsigned
      integer in big endian (i.e. network byte order) form base64
      encoded (Number of seconds since 1970)

      TIME_INTERVAL: the time interval value for time based OTP
      algorithms. 8 bytes unsigned integer in big endian (i.e. network
      byte order) form base64 encoded.

      TIME_DRIFT: the device clock drift value for time based OTP
      algorithms.  The value indicates number of seconds that the device
      clock may drift each day. 2 bytes unsigned integer in big endian
      (i.e. network byte order) form base64 encoded.

8.  Formal Syntax

   The following syntax specification uses the widely adopted XML schema
   format as defined by a W3C recommendation
   (http://www.w3.org/TR/xmlschema-0/).  It is a complete syntax
   definition in the XML Schema Definition format (XSD)

   All implementations of this standard must comply with the schema
   below.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:pskc="urn:ietf:params:xml:ns:keyprov:container:1.0"
  xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
  xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
  targetNamespace="urn:ietf:params:xml:ns:keyprov:container:1.0"
  elementFormDefault="qualified" attributeFormDefault="unqualified"
  version="1.0">
    <xs:import namespace="http://www.w3.org/2000/09/xmldsig#"
      schemaLocation=
      "http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/
      xmldsig-core-schema.xsd"/>
    <xs:import namespace="http://www.w3.org/2001/04/xmlenc#"
      schemaLocation="http://www.w3.org/TR/2002/
      REC-xmlenc-core-20021210/xenc-schema.xsd"/>

    <xs:complexType name="KeyContainerType">
    <xs:sequence>
        <xs:element name="EncryptionKey" type="ds:KeyInfoType"
          minOccurs="0"/>
        <xs:element name="MACAlgorithm" type="pskc:KeyAlgorithmType"
          minOccurs="0"/>
        <xs:element name="Device" type="pskc:DeviceType"
          maxOccurs="unbounded"/>
        <xs:element name="Signature" type="ds:SignatureType"
          minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="Version" type="pskc:VersionType"
      use="required"/>
    </xs:complexType>
    <xs:simpleType name="VersionType" final="restriction">
            <xs:restriction base="xs:string">
                    <xs:pattern value="\d{1,2}\.\d{1,3}"/>
            </xs:restriction>
    </xs:simpleType>
        <xs:complexType name="KeyPropertiesType">
                <xs:sequence>
                        <xs:element name="Issuer"
                        type="xs:string" minOccurs="0"/>
                        <xs:element name="Usage"
                        type="pskc:UsageType" minOccurs="0"/>
                        <xs:element name="KeyProfileId"
                        type="xs:string" minOccurs="0"/>
                        <xs:element name="MasterKeyId"
                        type="xs:string" minOccurs="0"/>
                        <xs:element name="Data" type="pskc:DataType"
                        minOccurs="0" maxOccurs="unbounded"/>
                        <xs:element name="PINPolicy"
                        type="pskc:PINPolicyType" minOccurs="0"/>
                        <xs:element name="ExpiryDate"
                        type="xs:dateTime" minOccurs="0"/>
                        <xs:element name="StartDate"
                        type="xs:dateTime" minOccurs="0"/>
                </xs:sequence>
                <xs:attribute name="KeyPropertiesId"
                type="xs:string" use="required"/>
                <xs:attribute name="KeyAlgorithm"
                type="pskc:KeyAlgorithmType"
                use="optional"/>
        </xs:complexType>
    <xs:complexType name="KeyType">
        <xs:sequence>
            <xs:element name="Issuer"
            type="xs:string" minOccurs="0"/>
            <xs:element name="Usage"
            type="pskc:UsageType"/>
                        <xs:element name="KeyProfileId"
                        type="xs:string" minOccurs="0"/>
                        <xs:element name="MasterKeyId"
                        type="xs:string" minOccurs="0"/>
            <xs:element name="FriendlyName"
            type="xs:string" minOccurs="0"/>
            <xs:element name="Data" type="pskc:DataType"
            minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="PINPolicy"
            type="pskc:PINPolicyType" minOccurs="0"/>
            <xs:element name="ExpiryDate"
            type="xs:dateTime" minOccurs="0"/>
            <xs:element name="StartDate"
            type="xs:dateTime" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="KeyId"
        type="xs:string" use="required"/>
        <xs:attribute name="KeyAlgorithm"
        type="pskc:KeyAlgorithmType"
          use="required"/>
    </xs:complexType>
    <xs:complexType name="DerivedKeyType">
        <xs:sequence>
            <xs:element name="KeyDerivationMethod"
              type="pskc:KeyDerivationMethodType" minOccurs="0"/>
            <xs:element ref="xenc:ReferenceList" minOccurs="0"/>
            <xs:element name="CarriedKeyName" type="xs:string"
              minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="Id" type="xs:ID" use="optional"/>
        <xs:attribute name="Type" type="xs:anyURI" use="optional"/>
    </xs:complexType>
    <xs:complexType name="KeyDerivationMethodType">
        <xs:sequence>
            <xs:any namespace="##other" minOccurs="0"
            maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="Algorithm" type="xs:anyURI"
        use="required"/>
    </xs:complexType>
    <xs:complexType name="PINPolicyType">
        <xs:sequence>
            <xs:element name="PINUsageMode"
              type="pskc:PINUsageModeType"/>
            <xs:element name="WrongPINtry" type="xs:unsignedInt"
              minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="PINKeyId" type="xs:string"
          use="required"/>
    </xs:complexType>
    <xs:complexType name="PINUsageModeType">
            <xs:choice maxOccurs="unbounded">
                    <xs:element name="Local"/>
                    <xs:element name="Prepend"/>
                    <xs:element name="Embed"/>
            </xs:choice>
    </xs:complexType>
    <xs:complexType name="DeviceIdType">
        <xs:sequence>
        <xs:element name="Manufacturer" type="xs:string"/>
        <xs:element name="SerialNo" type="xs:string"/>
        <xs:element name="Model" type="xs:string"
        minOccurs="0"/>
        <xs:element name="IssueNo" type="xs:string"
        minOccurs="0"/>
        <xs:element name="ExpiryDate" type="xs:dateTime"
        minOccurs="0"/>
        <xs:element name="StartDate" type="xs:dateTime"
        minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="DeviceType">
      <xs:sequence>
        <xs:element name="DeviceId" type="pskc:DeviceIdType"
          minOccurs="0"/>
        <xs:element name="Key" type="pskc:KeyType"
          maxOccurs="unbounded"/>
        <xs:element name="UserId" type="xs:string"
        minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
    <xs:complexType name="UsageType">
        <xs:sequence>
            <xs:element name="ChallengeFormat" minOccurs="0">
                <xs:complexType>
                    <xs:attribute name="Format"
                      type="pskc:ValueFormatType" use="required"/>
                    <xs:attribute name="Min" type="xs:unsignedInt"
                      use="required"/>
                    <xs:attribute name="Max" type="xs:unsignedInt"
                      use="required"/>
                    <xs:attribute name="CheckDigits" type="xs:boolean"
                      default="false"/>
                </xs:complexType>
            </xs:element>
            <xs:element name="ResponseFormat">
                <xs:complexType>
                    <xs:attribute name="Format"
                      type="pskc:ValueFormatType" use="required"/>
                    <xs:attribute name="Length" type="xs:unsignedInt"
                      use="required"/>
                    <xs:attribute name="CheckDigits" type="xs:boolean"
                      default="false"/>
                </xs:complexType>
            </xs:element>
            </xs:sequence>
            <xs:attribute name="OTP" type="xs:boolean" default="false"/>
            <xs:attribute name="CR" type="xs:boolean" default="false"/>
            <xs:attribute name="Integrity" type="xs:boolean"
              default="false"/>
            <xs:attribute name="Encrypt" type="xs:boolean"
              default="false"/>
            <xs:attribute name="Unlock" type="xs:boolean"
              default="false"/>
    </xs:complexType>
    <xs:complexType name="DataType">
        <xs:sequence>
            <xs:choice>
                <xs:element name="PlainValue" type="xs:base64Binary"/>
                <xs:element name="EncryptedValue"
                  type="xenc:EncryptedDataType"/>
            </xs:choice>
            <xs:element name="ValueMAC" type="xs:base64Binary"
              minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="Name" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:simpleType name="KeyAlgorithmType">
        <xs:restriction base="xs:anyURI"/>
    </xs:simpleType>
    <xs:simpleType name="ValueFormatType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="DECIMAL"/>
            <xs:enumeration value="HEXADECIMAL"/>
            <xs:enumeration value="ALPHANUMERIC"/>
            <xs:enumeration value="BASE64"/>
            <xs:enumeration value="BINARY"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:element name="KeyContainer" type="pskc:KeyContainerType"/>
</xs:schema>

9.

9.  IANA Considerations

9.1.  Content-type registration for 'application/pskc+xml'

   This specification requests the registration of a new MIME type
   according to the procedures of RFC 4288 [RFC4288] and guidelines in
   RFC 3023 [RFC3023].

   MIME media type name:  application

   MIME subtype name:  pskc+xml

   Mandatory parameters:  none

   Optional parameters:  charset

      Indicates the character encoding of enclosed XML.

   Encoding considerations:  Uses XML, which can employ 8-bit
      characters, depending on the character encoding used.  See RFC
      3023 [RFC3023], Section 3.2.

   Security considerations:  This content type is designed to carry PSKC
      protocol payloads.

   Interoperability considerations:  None

   Published specification:  RFCXXXX [NOTE TO IANA/RFC-EDITOR: Please
      replace XXXX with the RFC number of this specification.]

   Applications which use this media type:  This MIME type is being used
      as a symmetric key container format for transport and provisioning
      of symmetric keys (One Time Password (OTP) shared secrets or
      symmetric cryptographic keys) to different types of strong
      authentication devices.  As such, it is used for key provisioning
      systems.

   Additional information:

      Magic Number:  None

      File Extension:  .pskcxml

      Macintosh file type code:  'TEXT'
   Personal and email address for further information:  Philip Hoyer,
      Philip.Hoyer@actividentity.com

   Intended usage:  LIMITED USE

   Author:  This specification is a work item of the IETF KEYPROV
      working group, with mailing list address <keyprov@ietf.org>.

   Change controller:  The IESG <iesg@ietf.org>

9.2.  XML Schema Registration

   This section registers an XML schema as per the guidelines in
   [RFC3688].

   URI:  urn:ietf:params:xml:ns:keyprov:container:1.0

   Registrant Contact:  IETF KEYPROV Working Group, Philip Hoyer
      (Philip.Hoyer@actividentity.com).

   XML Schema:  The XML schema to be registered is contained in
      Section 8.  Its first line is

   <?xml version="1.0" encoding="UTF-8"?>

      and its last line is

   </xs:schema>

9.3.  URN Sub-Namespace Registration for
      urn:ietf:params:xml:ns:keyprov:container:1.0

   This section registers a new XML namespace,
   "urn:ietf:params:xml:ns:keyprov:container:1.0", per the guidelines in
   [RFC3688].

   URI:  urn:ietf:params:xml:ns:keyprov:container:1.0

   Registrant Contact:  IETF KEYPROV Working Group, Philip Hoyer
      (Philip.Hoyer@actividentity.com).

   XML:

   BEGIN
   <?xml version="1.0"?>
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
     "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
   <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <meta http-equiv="content-type"
           content="text/html;charset=iso-8859-1"/>
     <title>PSKC Namespace</title>
   </head>
   <body>
     <h1>Namespace for PSKC</h1>
     <h2>urn:ietf:params:xml:ns:keyprov:container:1.0</h2>
   <p>See <a href="[URL of published RFC]">RFCXXXX
       [NOTE TO IANA/RFC-EDITOR:
        Please replace XXXX with the RFC number of this
       specification.]</a>.</p>
   </body>
   </html>
   END

9.4.  Symmetric Key Algorithm Identifier Registry

   This specification requests the creation of a new IANA registry for
   symmetric key cryptographic algorithm identifiers in accordance with
   the principles set out in RFC 2434 [RFC2434]as follows:

9.4.1.  Applicability

   The use of URIs as algorithm identifiers provides an effectively
   unlimited namespace.  While this eliminates the possibility of
   namespace exhaustion it creates a new concern, that divergent
   identifiers will be employed for the same purpose in different
   contexts.

   The key algorithm registry is intended to provide a means of
   specifying the canonical identifier to be used for a given algorithm.
   If an algorithm has an identifier specified in the registry a
   application that is conformant to a protocol specification that
   specifies use of that registry to define identifiers SHOULD always
   use that particular form of the identifier when originating data.  A
   conformant application MAY accept other identifiers in data that is
   received.

   For the sake of expediency, the initial registry only defines
   algorithm classes for symmetric algorithms plus cryptographic message
   digest functions (one-way hash).  While the same principles may be
   extended to asymmetric algorithms, doing so would require much
   greater consideration of issues such as key length and treatment of
   parameters, particularly where eliptic curve cryptography algorithms
   are concerned.

   As part of this registry the IANA will maintain the following
   information:

   Common Name  The name by which the algorithm is generally referred.

   Class  The type of algorithm, encryption, Message Authentication Code
      (MAC), One Time Pawword (OTP), Digest, etc.

   Cannonical URI  The cannonical URI to be used to identify the
      algorithm.

   Algorithm Definition  A reference to the document in which the
      algorithm described by the identifier is defined.

   Identifier Definition  A reference to the document in which the use
      of the identifier to refer to the algorithm is described.  This
      would ideally be the document in which the algorithm is defined.

      In the case where the registrant does not request a particular
      URI, the IANA will assign it a Uniform Resource Name (URN) that
      follows RFC 3553 [RFC3553].

   Note that where a single algorithm has different forms distinguished
   by paremeters such as key length, the algorithm class and each
   combination of algorithm parameters may be considered a distinct
   algorithm for the purpose of assigning identifiers.

9.4.2.  Registerable Algorithms

9.4.2.1.  Assigned URIs

   If the registrant wishes to have a URI assigned, then a URN of the
   form

   urn:ietf:params:xml:<class>:<id>

   will be assigned where <class> is the type of the algorithm being
   identified (see below). <id> is a unique id specified by the party
   making the request and will normally be either the common name of the
   algorithm or an abbreviation thereof.

   NOTE: in order for a URN of this type to be assigned, the item being
   registered MUST have been through the IETF consensus process.
   Basically, this means that it must be documented in a RFC.

   NOTE: Expert Review is sufficient in cases where the request does not
   require a URN assignment inthe IETF namespace.  IETF consensus is not
   required.

9.4.2.2.  Assigned Classes

   Each algorithm MUST belong to an assigned algorithm class.  In the
   case that additional classes are required these are to be specified
   by IETF Consensus action.

   The initial assigned classes are:

   Digest  A cryptographic Digest algorithm.

   MAC  A Message Authentication Code algorithm.

   Symmetric  A symmetric encryption algorithm.

   OTP  A one time password (OTP) algorithm.

9.4.3.  Registration Procedures

9.4.3.1.  Review

   Algorithm identifier registrations are to be subject to Expert Review
   as per RFC 2434 [RFC2434].

   The need for supporting documentation for the registration depends on
   the nature of the request.  In the case of a cryptographic algorithm
   that is being described for publication as an RFC, the request for a
   URI allocation would normally appear within the RFC itself.  In the
   case of a cryptographic algorithm that is fully and comprehensively
   defined in another form, it would not be necessary to duplicate the
   information for the sake of issuing the information in the RFC
   series.  In other cases an RFC may be required in order to ensure
   that certain algorithm parameters are sufficiently and unambiguously
   defined.

   The scope of such expert review is to be strictly limited to
   identifying possible ambiguity and/or duplication of existing
   identifiers.  The expert review MUST NOT consider the cryptographic
   properties, intellectual property considerations or any other factor
   not related to the use of the identifier.

   In reviewing a request, the expert should consider whether other URI
   identifiers are already defined for a given algorithm.  In such cases
   it is the duty of the expert to bring the potential duplication to
   the notice of the proposers of the registration and the Security Area
   Directors.  If the proposers are not willing to accept registration
   of the existing identifier the IETF Consensus policy is to apply.

   In reviewing a request, the expert should consider whether the
   algorithm is sufficiently defined to allow successful interoperation.
   In particular the expert should consider whether issues such as key
   sizes and byte order are sufficiently defined to allow for
   interoperation.

   While the defintion requirement MAY be satisifed by a comprehensive
   specification of the algorithm, disclosure of the algorithm is not
   mandatory.

9.4.3.2.  Canonical URI

   Until the IANA requests or implements an automated process for the
   registration of these elements, any specifications must make that
   request part of the IANA considerations section of their respective
   documents.  That request must be in the form of the following
   template:

   Common Name  The name by which the algorithm is generally referred.

   Class  The type of algorithm, encryption, Message Authentication Code
      (MAC), One Time Pawword (OTP), Digest, etc.  As specified by a
      defined algorithm class.

   URI  The cannonical URI to be used to identify the algorithm.

   Algorithm Definition  A reference to the document in which the
      algorithm described by the identifier is defined.

   Identifier Definition  A reference to the document in which the use
      of the identifier to refer to the algorithm is described.  This
      would ideally be the document in which the algorithm is defined.

   Registrant Contact  A reference to the document in which the use of
      the identifier to refer to the algorithm is described.  This would
      ideally be the document in which the algorithm is defined.

9.4.3.3.  Alias URI

   In the case that multiple identifiers have been assigned to the same
   identifiers, additional identifiers MAY be registered as aliases.  An
   entry for an alias contains all the entries for a canonical URI with
   the addition of a reference to the canonical URI to be used:

   Alias for URI  The cannonical URI that identifies the algorithm.  The
      URI referenced MUST be a canonical URI.

   In the case of dispute as to which URI is to be considered canonical
   the matter is to be settled by IESG action.

9.4.4.  Initial Values

   The following initial values are defined.  Note that these values are
   limited to identifiers that are required by KEYPROV but not specified
   elsewhere:

9.4.4.1.  HOTP

   Common Name:  HOTP

   Class:  OTP

   URI:  http://www.ietf.org/keyprov/pskc#hotp

   Algorithm Definition:  http://www.ietf.org/rfc/rfc4226.txt

   Identifier Definition  (this RFC)

   Registrant Contact:  IESG

9.4.4.2.  HOTP-HMAC-SHA-1

   Common Name:  HOTP-HMAC-SHA-1

   Class:  OTP

   URI:  http://www.ietf.org/rfc/rfc4226.txt#HOTP-HMAC-SHA-1

   Algorithm Definition:  http://www.ietf.org/rfc/rfc4226.txt

   Identifier Definition  (this RFC)

   Registrant Contact:  IESG

9.4.4.3.  KEYPROV-PIN

   Common Name:  KEYPROV-PIN

   Class:  Symmetric static credential comparison
   URI:  http://www.ietf.org/keyprov/pskc#pin

   Algorithm Definition:  (this document)

   Identifier Definition  (this document)

   Registrant Contact:  IESG

9.4.4.4.  SecurID-AES

   Common Name:  SecurID-AES

   Class:  OTP

   URI:  http://www.rsasecurity.com/rsalabs/otps/schemas/2005/09/
      otps-wst#SecurID-AES

   Algorithm Definition:  http://www.rsa.com/rsalabs/node.asp?id=2821

   Identifier Definition  http://www.rsa.com/rsalabs/node.asp?id=2821

   Registrant Contact:  Andrea Doherty, RSA the Security Division of
      EMC, <andrea.doherty@rsa.com>

9.4.4.5.  SecurID-ALGOR

   Common Name:  SecurID-ALGOR

   Class:  OTP

   URI:  http://www.rsasecurity.com/rsalabs/otps/schemas/2005/09/
      otps-wst#SecurID-ALGOR

   Algorithm Definition:  http://www.rsa.com/rsalabs/node.asp?id=2821

   Identifier Definition  http://www.rsa.com/rsalabs/node.asp?id=2821

   Registrant Contact:  Andrea Doherty, RSA the Security Division of
      EMC, <andrea.doherty@rsa.com>

9.4.4.6.  ActivIdentity-3DES

   Common Name:  ActivIdentity-3DES

   Class:  OTP
   URI:  http://www.actividentity.com/2008/04/algorithms/
      algorithms#ActivIdentity-3DES

   Algorithm Definition:  http://www.actividentity.com/2008/04/
      algorithms/algorithms#ActivIdentity-3DES

   Identifier Definition  http://www.actividentity.com/2008/04/
      algorithms/algorithms#ActivIdentity-3DES

   Registrant Contact:  Philip Hoyer, ActivIdentity Inc,
      <philip.hoyer@actividentity.com>

9.4.4.7.  ActivIdentity-AES

   Common Name:  ActivIdentity-AES

   Class:  OTP

   URI:  http://www.actividentity.com/2008/04/algorithms/
      algorithms#ActivIdentity-AES

   Algorithm Definition:  http://www.actividentity.com/2008/04/
      algorithms/algorithms#ActivIdentity-AES

   Identifier Definition  http://www.actividentity.com/2008/04/
      algorithms/algorithms#ActivIdentity-AES

   Registrant Contact:  Philip Hoyer, ActivIdentity Inc,
      <philip.hoyer@actividentity.com>

9.4.4.8.  ActivIdentity-DES

   Common Name:  ActivIdentity-DES

   Class:  OTP

   URI:  http://www.actividentity.com/2008/04/algorithms/
      algorithms#ActivIdentity-DES

   Algorithm Definition:  http://www.actividentity.com/2008/04/
      algorithms/algorithms#ActivIdentity-DES

   Identifier Definition  http://www.actividentity.com/2008/04/
      algorithms/algorithms#ActivIdentity-DES
   Registrant Contact:  Philip Hoyer, ActivIdentity Inc,
      <philip.hoyer@actividentity.com>

9.4.4.9.  ActivIdentity-EVENT

   Common Name:  ActivIdentity-EVENT

   Class:  OTP

   URI:  http://www.actividentity.com/2008/04/algorithms/
      algorithms#ActivIdentity-EVENT

   Algorithm Definition:  http://www.actividentity.com/2008/04/
      algorithms/algorithms#ActivIdentity-EVENT

   Identifier Definition  http://www.actividentity.com/2008/04/
      algorithms/algorithms#ActivIdentity-EVENT

   Registrant Contact:  Philip Hoyer, ActivIdentity Inc,
      <philip.hoyer@actividentity.com>

9.5.  XML Data Tag Identifier Registry

   This specification requests the creation of a new IANA registry for
   XML Data Tag identifiers in accordance with the principles set out in
   RFC 2434 [RFC2434]as follows:

   [More explanation of why an escape to tag value lists is desirable
   when inserting unstructured data into an XML schema]

9.5.1.  Applicability

   As part of this registry the IANA will maintain the following
   information:

   Common Name  Common name for by which the tag is referred to

   Cannonical URI  The cannonical URI to be employed when citing the
      tag.

   Data Type  The data type of the data that is bound to the tag.

    Definition  A reference to the document in which the data tag
      defined by the identifier is defined.

   In the case where the registrant does not request a particular URI,
   the IANA will assign it a Uniform Resource Name (URN) that follows
   RFC 3553 [RFC3553].

9.5.2.  Registerable Data Tags

9.5.2.1.  Assigned URIs

   If the registrant wishes to have a URI assigned, then a URN of the
   form

   urn:ietf:params:xml:datatag:<tag>

   will be assigned where <tag> is a unique id specified by the party
   making the request and will normally be either the common name of the
   tag or an abbreviation thereof.

   NOTE: in order for a URN of this type to be assigned, the item being
   registered MUST have been through the IETF consensus process.
   Basically, this means that it must be documented in a RFC.

   NOTE: Expert Review is sufficient in cases where the request does not
   require a URN assignment inthe IETF namespace.  IETF consensus is not
   required.

9.5.3.  Registration Procedures

9.5.3.1.  Review

   Data tag registrations are to be subject to Expert Review as per RFC
   2434 [RFC2434].

9.5.3.2.  Data Tag Entry

   Until the IANA requests or implements an automated process for the
   registration of these elements, any specifications must make that
   request part of the IANA considerations section of their respective
   documents.  That request must be in the form of the following
   template:

   Common Name  Common name for by which the tag is referred to

   Cannonical URI  The cannonical URI to be employed when citing the
      tag.

   Data Type  The data type of the data that is bound to the tag.

    Definition  A reference to the document in which the data tag
      defined by the identifier is defined.

9.5.4.  Initial Values

   The following initial values are defined.  Note that these values are
   limited to identifiers that are required by KEYPROV but not specified
   elsewhere:

9.5.4.1.  Secret

   Common Name  Secret

   Cannonical URI  urn:ietf:params:xml:datatag:secret

   Data Type  binary, base64 encoded

   Defined in  (this document)

9.5.4.2.  Counter

   Common Name  Counter

   Cannonical URI  urn:ietf:params:xml:datatag:counter

   Data Type  8 bytes unsigned integer in big endian (i.e. network byte
      order) form base64 encoded

   Defined in  (this document)

9.5.4.3.  Time

   Common Name  Time

   Cannonical URI  urn:ietf:params:xml:datatag:time

   Data Type  8 bytes unsigned integer in big endian (i.e. network byte
      order) form base64 encoded (Number of seconds since 1970)

   Defined in  (this document)

9.5.4.4.  Time Interval

   Common Name  Time Interval

   Cannonical URI  urn:ietf:params:xml:datatag:time_interval

   Data Type  8 bytes unsigned integer in big endian (i.e. network byte
      order) form base64 encoded.

   Defined in  (this document)

9.5.4.5.  Time Drift

   Common Name  urn:ietf:params:xml:datatag:time_drift

   Cannonical URI  Time Drift

   Data Type  2 bytes unsigned integer in big endian (i.e. network byte
      order) form base64 encoded.

   Defined in  (this document)

10.  Security Considerations

   The portable key container carries sensitive information (e.g.,
   cryptographic keys) and may be transported across the boundaries of
   one secure perimeter to another.  For example, a container residing
   within the secure perimeter of a back-end provisioning server in a
   secure room may be transported across the internet to an end-user
   device attached to a personal computer.  This means that special care
   must be taken to ensure the confidentiality, integrity, and
   authenticity of the information contained within.

9.1.

10.1.  Payload confidentiality

   By design, the container allows two main approaches to guaranteeing
   the confidentiality of the information it contains while transported.

   First, the container key data payload may be encrypted.

   In this case no transport layer security is required.  However,
   standard security best practices apply when selecting the strength of
   the cryptographic algorithm for payload encryption.  Symmetric
   cryptographic cipher should be used - the longer the cryptographic
   key, the stronger the protection.  At the time of this writing both
   3DES and AES are recommended mandatory algorithms but 3DES may be dropped in the
   relatively near future.  Applications concerned with algorithm
   longevity are advised to use AES. AES-256-CBC.  In cases where the
   exchange of encryption keys between the sender and the receiver is
   not possible, asymmetric encryption of the secret key payload may be
   employed.  Similarly to symmetric key cryptography, the stronger the
   asymmetric key, the more secure the protection is.

   If the payload is encrypted with a method that uses one of the
   password-based encryption methods provided above, the payload may be
   subjected to password dictionary attacks to break the encryption
   password and recover the information.  Standard security best
   practices for selection of strong encryption passwords apply
   [Schneier].

   Practical implementations should use PBESalt and PBEIterationCount
   when PBE encryption is used.  Different PBESalt value per key
   container should be used for best protection.

   The second approach to protecting the confidentiality of the payload
   is based on using transport layer security.  The secure channel
   established between the source secure perimeter (the provisioning
   server from the example above) and the target perimeter (the device
   attached to the end-user computer) utilizes encryption to transport
   the messages that travel across.  No payload encryption is required
   in this mode.  Secure channels that encrypt and digest each message
   provide an extra measure of security, especially when the signature
   of the payload does not encompass the entire payload.

   Because of the fact that the plain text payload is protected only by
   the transport layer security, practical implementation must ensure
   protection against man-in-the-middle attacks [Schneier].  Validating
   the secure channel end-points is critically important for eliminating
   intruders that may compromise the confidentiality of the payload.

9.2.

10.2.  Payload integrity

   The portable symmetric key container provides a mean to guarantee the
   integrity of the information it contains through digital signatures.
   For best security practices, the digital signature of the container
   should encompass the entire payload.  This provides assurances for
   the integrity of all attributes.  It also allows verification of the
   integrity of a given payload even after the container is delivered
   through the communication channel to the target perimeter and channel
   message integrity check is no longer possible.

9.3.

10.3.  Payload authenticity

   The digital signature of the payload is the primary way of showing
   its authenticity.  The recipient of the container may use the public
   key associated with the signature to assert the authenticity of the
   sender by tracing it back to a preloaded public key or certificate.
   Note that the digital signature of the payload can be checked even
   after the container has been delivered through the secure channel of
   communication.

   A weaker payload authenticity guarantee may be provided by the
   transport layer if it is configured to digest each message it
   transports.  However, no authenticity verification is possible once
   the container is delivered at the recipient end.  This approach may
   be useful in cases where the digital signature of the container does
   not encompass the entire payload.

10.

11.  Acknowledgements

   The authors of this draft would like to thank the following people
   for their contributions and support to make this a better
   specification: Apostol Vassilev, Shuh Chang, Jon Martinson, Siddhart
   Bajaj, Stu Veath, Kevin Lewis, Philip Hallam-Baker, Hannes
   Tschofenig, Andrea Doherty, Magnus Nystrom, Tim Moses, and Anders
   Rundgren.

11.

12.  Appendix A - Example Symmetric Key Containers

   All examples are syntactically correct and compatible with the XML
   schema in section 7.

11.1.

12.1.  Symmetric Key Container with a single Non-Encrypted HOTP Secret
       Key

   <?xml version="1.0" encoding="UTF-8"?>
   <KeyContainer Version="1.0"
     xmlns="urn:ietf:params:xml:ns:keyprov:container:1.0">
       <Device>
           <DeviceId>
               <Manufacturer>ACME</Manufacturer>
               <SerialNo>0755225266</SerialNo>
           </DeviceId>
           <Key KeyAlgorithm="http://www.ietf.org/keyprov/pskc#hotp"
             KeyId="0755225266">
               <Issuer>AnIssuer</Issuer>
               <Usage OTP="true">
                   <ResponseFormat Length="6" Format="DECIMAL"/>
               </Usage>
               <Data Name="COUNTER">
                   <PlainValue>AprkuA==</PlainValue>
               </Data>
               <Data Name="SECRET">
                   <PlainValue>/4h3rOTeBegJwGpmTTq4F+RlNR0=</PlainValue>
               </Data>
               <ExpiryDate>2012-12-31T00:00:00</ExpiryDate>
           </Key>
       </Device>
   </KeyContainer>

11.2.

12.2.  Symmetric Key Container with a single PIN protected Non-Encrypted
       HOTP Secret Key
   <?xml version="1.0" encoding="UTF-8"?>
   <KeyContainer Version="1.0"
     xmlns="urn:ietf:params:xml:ns:keyprov:container:1.0">
       <Device>
           <DeviceId>
               <Manufacturer>ACME</Manufacturer>
               <SerialNo>0755225266</SerialNo>
           </DeviceId>
           <Key KeyAlgorithm="http://www.ietf.org/keyprov/pskc#hotp"
             KeyId="0755225266">
               <Issuer>AnIssuer</Issuer>
               <Usage OTP="true">
                   <ResponseFormat Length="6" Format="DECIMAL"/>
               </Usage>
               <Data Name="COUNTER">
                   <PlainValue>AprkuA==</PlainValue>
               </Data>
               <Data Name="SECRET">
                   <PlainValue>/4h3rOTeBegJwGpmTTq4F+RlNR0=</PlainValue>
               </Data>
               <PINPolicy PINKeyId="07552252661">
                   <PINUsageMode>
                       <Local/>
                   </PINUsageMode>
               </PINPolicy>
           </Key>
           <Key KeyId="07552252661"
             KeyAlgorithm="http://www.ietf.org/keyprov/pskc#pin">
               <Usage>
                   <ResponseFormat Length="4" Format="DECIMAL"/>
               </Usage>
               <Data Name="SECRET">
                   <PlainValue>MTIzNA==</PlainValue>
               </Data>
           </Key>
       </Device>
   </KeyContainer>

11.3.

12.3.  Symmetric Key Container with a single AES-256-CBC Encrypted HOTP
       Secret Key

<?xml version="1.0" encoding="UTF-8"?>
<KeyContainer Version="1.0"
  xmlns="urn:ietf:params:xml:ns:keyprov:container:1.0"
  xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
  xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
    <EncryptionKey>
        <ds:KeyName>PRE_SHARED_KEY</ds:KeyName>
    </EncryptionKey>
    <MACAlgorithm>http://www.w3.org/2000/09/xmldsig#hmac-sha1
    </MACAlgorithm>
    <Device>
        <DeviceId>
            <Manufacturer>ACME</Manufacturer>
            <SerialNo>0755225266</SerialNo>
        </DeviceId>
        <Key KeyAlgorithm="http://www.ietf.org/keyprov/pskc#hotp"
          KeyId="0755225266">
            <Issuer>AnIssuer</Issuer>
            <Usage OTP="true">
                <ResponseFormat Length="8" Format="DECIMAL"/>
            </Usage>
            <Data Name="COUNTER">
                <PlainValue>AprkuA==</PlainValue>
            </Data>
            <Data Name="SECRET">
                <EncryptedValue>
                    <xenc:EncryptionMethod
               Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc"/>
                    <xenc:CipherData>
                      <xenc:CipherValue>
                        kyzrWTJuhJKQHhZtf2CWbKC5H3LdfAPvKzHHQ8SdxyE=
                      </xenc:CipherValue>
                    </xenc:CipherData>
                </EncryptedValue>
                <ValueMAC>cwJI898rRpGBytTqCAsegaQqPZA=</ValueMAC>
            </Data>
        </Key>
    </Device>
</KeyContainer>

11.4.

12.4.  Symmetric Key Container with signature and a single Password-
       based Encrypted HOTP Secret Key

 <?xml version="1.0" encoding="UTF-8"?>
 <pskc:KeyContainer
   xmlns:pskc="urn:ietf:params:xml:ns:keyprov:container:1.0"
   xmlns:pkcs-5=
     "http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5v2-0#"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
   xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
   Version="1.0">
     <pskc:EncryptionKey>
       <pskc:DerivedKey Id="#Passphrase1">
         <pskc:CarriedKeyName>Passphrase1</pskc:CarriedKeyName>
         <pskc:KeyDerivationMethod
           Algorithm=
      "http://www.rsasecurity.com/rsalabs/pkcs/schemas/pkcs-5#pbkdf2">
           <pkcs-5:Parameters xsi:type="pkcs-5:PBKDF2ParameterType">
             <Salt>
               <Specified>Df3dRAhjGh8=</Specified>
             </Salt>
             <IterationCount>2000</IterationCount>
             <KeyLength>16</KeyLength>
             <PRF/>
           </pkcs-5:Parameters>
         </pskc:KeyDerivationMethod>
         <xenc:ReferenceList>
           <xenc:DataReference URI="#ED"/>
         </xenc:ReferenceList>
       </pskc:DerivedKey>
     </pskc:EncryptionKey>
   <pskc:Device>
     <pskc:DeviceId>
       <pskc:Manufacturer>ACME</pskc:Manufacturer>
       <pskc:SerialNo>0755225266</pskc:SerialNo>
     </pskc:DeviceId>
         <pskc:Key KeyAlgorithm="http://www.ietf.org/keyprov/pskc#hotp"
           KeyId="0755225266">
             <pskc:Issuer>AnIssuer</pskc:Issuer>
             <pskc:Usage OTP="true">
                 <pskc:ResponseFormat Length="6" Format="DECIMAL"/>
             </pskc:Usage>
             <pskc:Data Name="COUNTER">
                 <pskc:PlainValue>AprkuA==</pskc:PlainValue>
             </pskc:Data>
             <pskc:Data Name="SECRET">
                 <pskc:EncryptedValue Id="ED">
                   <xenc:EncryptionMethod Algorithm=
                   "http://www.w3.org/2001/04/xmlenc#kw-aes128"/>
                   <xenc:CipherData>
                     <xenc:CipherValue>rf4dx3rvEPO0vKtKL14NbeVu8nk=
                     </xenc:CipherValue>
                   </xenc:CipherData>
                 </pskc:EncryptedValue>
             </pskc:Data>
         </pskc:Key>
   </pskc:Device>
   <pskc:Signature>
     <ds:SignedInfo>
       <ds:CanonicalizationMethod
         Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
       <ds:SignatureMethod
         Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
       <ds:Reference URI="">
         <ds:DigestMethod Algorithm=
           "http://www.w3.org/2000/09/xmldsig#sha1"/>
         <ds:DigestValue>j6lwx3rvEPO0vKtMup4NbeVu8nk=</ds:DigestValue>
       </ds:Reference>
     </ds:SignedInfo>
     <ds:SignatureValue>j6lwx3rvEPO0vKtMup4NbeVu8nk=</ds:SignatureValue>
     <ds:KeyInfo>
       <ds:X509Data>
         <ds:X509IssuerSerial>
           <ds:X509IssuerName>CN=KeyProvisioning'R'Us.com,C=US
           </ds:X509IssuerName>
           <ds:X509SerialNumber>12345678</ds:X509SerialNumber>
         </ds:X509IssuerSerial>
       </ds:X509Data>
     </ds:KeyInfo>
   </pskc:Signature>
 </pskc:KeyContainer>

11.5.

12.5.  Symmetric Key Container with a single RSA 1.5 Encrypted HOTP
       Secret Key

<?xml version="1.0" encoding="UTF-8"?>
<pskc:KeyContainer Version="1.0"
  xmlns:pskc="urn:ietf:params:xml:ns:keyprov:container:1.0"
  xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
  xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
    <pskc:EncryptionKey>
        <ds:X509Data>
            <ds:X509Certificate>miib</ds:X509Certificate>
        </ds:X509Data>
    </pskc:EncryptionKey>
    <pskc:Device>
        <pskc:DeviceId>
            <pskc:Manufacturer>ACME</pskc:Manufacturer>
            <pskc:SerialNo>0755225266</pskc:SerialNo>
        </pskc:DeviceId>
        <pskc:Key KeyAlgorithm="http://www.ietf.org/keyprov/pskc#hotp"
                  KeyId="0755225266">
            <pskc:Issuer>AnIssuer</pskc:Issuer>
            <pskc:Usage OTP="true">
                <pskc:ResponseFormat Length="8" Format="DECIMAL"/>
            </pskc:Usage>
            <pskc:Data Name="COUNTER">
                <pskc:PlainValue>AprkuA==</pskc:PlainValue>
            </pskc:Data>
            <pskc:Data Name="SECRET">
              <pskc:EncryptedValue Id="ED">
                <xenc:EncryptionMethod
                  Algorithm="http://www.w3.org/2001/04/xmlenc#rsa_1_5"/>
                <xenc:CipherData>
                  <xenc:CipherValue>rf4dx3rvEPO0vKtKL14NbeVu8nk=
                  </xenc:CipherValue>
                </xenc:CipherData>
              </pskc:EncryptedValue>
            </pskc:Data>
        </pskc:Key>
    </pskc:Device>
</pskc:KeyContainer>

12.

13.  References

13.1.  Normative References

   [PKCS1]    Kaliski, B., "RFC 2437: PKCS #1: RSA Cryptography
              Specifications Version 2.0.",
              URL: http://www.ietf.org/rfc/rfc2437.txt, Version: 2.0,
              October 1998.

   [PKCS5]    RSA Laboratories, "PKCS #5: Password-Based Cryptography
              Standard", Version 2.0,
              URL: http://www.rsasecurity.com/rsalabs/pkcs/, March 1999.

   [RFC2119]  "Key words for use in RFCs to Indicate Requirement
              Levels", BCP 14, RFC 2119, March 1997,
              <http://www.ietf.org/rfc/rfc2119.txt>.

   [RFC2434]  Narten, T., "Guidelines for Writing an IANA Considerations
              Section in RFCs", RFC 2434, October 1998.

   [RFC3023]  Murata, M., St. Laurent, S., and D. Kohn, "XML Media
              Types", RFC 3023, January 2001.

   [RFC3553]  Mealling, M., "An IETF URN Sub-namespace for Registered
              Protocol Parameters", RFC 3553, June 2003.

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              January 2004.

   [RFC4288]  Freed, N. and J. Klensin, "Media Type Specifications and
              Registration Procedures", BCP 13, RFC 4288, December 2005.

   [RFC4514]  Zeilenga, K., "Lightweight Directory Access Protocol
              (LDAP): String Representation of Distinguished Names",
              RFC 4514, June 2006.

   [XMLDSIG]  Eastlake, D., "XML-Signature Syntax and Processing",
              URL: http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/,
              W3C Recommendation, February 2002.

   [XMLENC]   Eastlake, D., "XML Encryption Syntax and Processing.",
              URL: http://www.w3.org/TR/xmlenc-core/, December 2002.

13.2.  Informative References

   [CAP]      MasterCard International, "Chip Authentication Program
              Functional Architecture", September 2004.

   [DSKPP]    Doherty, A., Pei, M., Machani, S., and M. Nystrom,
              "Dynamic Symmetric Key Provisioning Protocol", Internet
              Draft Informational, URL: http://tools.ietf.org/wg/
              keyprov/draft-doherty-keyprov-dskpp-00.txt, June 2007. http://www.ietf.org/
              internet-drafts/draft-ietf-keyprov-dskpp-03.txt,
              February 2008.

   [HOTP]     MRaihi, D., Bellare, M., Hoornaert, F., Naccache, D., and
              O. Ranen, "HOTP: An HMAC-Based One Time Password
              Algorithm", RFC 4226,
              URL: http://rfc.sunsite.dk/rfc/rfc4226.html,
              December 2005.

   [NIST-SP800-57]
              National Institute of Standards and Technology,
              "Recommendation for Key Management - Part I: General
              (Revised)", NIST 800-57, URL: http://csrc.nist.gov/
              publications/nistpubs/800-57/
              sp800-57-Part1-revised2_Mar08-2007.pdf, March 2007.

   [OATH]     "Initiative for Open AuTHentication",
              URL: http://www.openauthentication.org.

   [OATHRefArch]
              OATH, "Reference Architecture",
              URL: http://www.openauthentication.org, Version 1.0, 2005.

   [OCRA]     MRaihi, D., Rydell, J., Naccache, D., Machani, S., and S.
              Bajaj, "OCRA: OATH Challenge Response Algorithm", Internet
              Draft Informational, URL: http://www.ietf.org/
              internet-drafts/
              draft-mraihi-mutual-oath-hotp-variants-01.txt,
              draft-mraihi-mutual-oath-hotp-variants-06.txt,
              December 2005.

   [PKCS1]    Kaliski, B., "RFC 2437: PKCS #1: RSA Cryptography
              Specifications Version 2.0.",
              URL: http://www.ietf.org/rfc/rfc2437.txt, Version: 2.0,
              October 1998. 2007.

   [PKCS12]   RSA Laboratories, "PKCS #12: Personal Information Exchange
              Syntax Standard", Version 1.0,
              URL: ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-12/.

   [PKCS5]    RSA Laboratories, "PKCS #5: Password-Based Cryptography
              Standard", Version 2.0,
              URL: ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-5/,
              March 1999.

   [RFC2119]  "Key words for use in RFCs to Indicate Requirement
              Levels", BCP 14, RFC 2119, March 1997,
              <http://www.ietf.org/rfc/rfc2119.txt>. http://www.rsasecurity.com/rsalabs/pkcs/.

   [Schneier]
              Schneier, B., "Secrets and Lies: Digitial Security in a
              Networked World",  Wiley Computer Publishing, ISBN 0-8493-
              8253-7, 2000.

   [XMLENC]   Eastlake, D., "XML Encryption Syntax and Processing.",
              URL: http://www.w3.org/TR/xmlenc-core/, December 2002.

   [XMLSIG]   Eastlake, D., "XML-Signature Syntax and Processing",
              URL: http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/,
              W3C Recommendation, February 2002.

Authors' Addresses

   Philip Hoyer
   ActivIdentity, Inc.
   109 Borough High Street
   London, SE1  1NL
   UK

   Phone: +44 (0) 20 7744 6455
   Email: Philip.Hoyer@actividentity.com

   Mingliang Pei
   VeriSign, Inc.
   487 E. Middlefield Road
   Mountain View, CA  94043
   USA

   Phone: +1 650 426 5173
   Email: mpei@verisign.com

   Salah Machani
   Diversinet, Inc.
   2225 Sheppard Avenue East
   Suite 1801
   Toronto, Ontario  M2J 5C2
   Canada

   Phone: +1 416 756 2324 Ext. 321
   Email: smachani@diversinet.com

Full Copyright Statement

   Copyright (C) The IETF Trust (2008).

   This document is subject to the rights, licenses and restrictions
   contained in BCP 78, and except as set forth therein, the authors
   retain all their rights.

   This document and the information contained herein are provided on an
   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
   THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
   OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
   THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Intellectual Property

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed to
   pertain to the implementation or use of the technology described in
   this document or the extent to which any license under such rights
   might or might not be available; nor does it represent that it has
   made any independent effort to identify any such rights.  Information
   on the procedures with respect to rights in RFC documents can be
   found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use of
   such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository at
   http://www.ietf.org/ipr.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at
   ietf-ipr@ietf.org.

Acknowledgment

   Funding for the RFC Editor function is provided by the IETF
   Administrative Support Activity (IASA).