OASIS

J2ME Code-Signing Profile of the OASIS Digital Signature Services

2nd Committee Draft, 11 September 2006 (WD-04)

Document identifier:

oasis-dss-1.0-profiles-codesigning-j2me-spec-cd-r2

Location:

http://docs.oasis-open.org/dss/v1.0/

Editor:

Andreas Kuehne, individual

Contributors:

Trevor Perrin, individual

Pieter Kasselman, Cybertrust

Abstract:

This draft profiles the OASIS DSS core protocols and the OASIS DSS Abstract Code-Signing Profile for the purpose of creating J2ME code-signing signatures.

Status:

This is a Public review Draft produced by the OASIS Digital Signature Service Technical Committee.  Comments may be submitted to the TC by any person by clicking on "Send A Comment" on the TC home page at:
http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=dss

For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the Digital Signature Service TC web page at http://www.oasis-open.org/committees/dss/ipr.php.


Table of Contents

1      Introduction. 3

1.1 Notation. 3

1.2 Namespaces. 3

1.3 Overview (Non-normative) 3

2      Profile Features. 5

2.1 Identifier 5

2.2 Scope. 5

2.3 Relationship To Other Profiles. 5

2.4 Signature Object 5

2.5 Transport Binding. 5

2.6 Security Binding. 5

3      Profile of Signing Protocol 6

3.1 Element <dss:SignRequest>. 6

3.1.1 Element <dss:OptionalInputs>. 6

3.1.2 Element <dss:InputDocuments>. 6

3.2 Element <dss:SignResponse>. 7

3.2.1 Element <dss:Result>. 7

3.2.2 Element <dss:OptionalOutputs>. 7

3.2.3 Element <dss:SignatureObject>. 8

4      Profile of Verifying Protocol 9

5      Profile of J2ME MIDP 2.0 Signatures. 10

6      Profile of Server Processing Rules. 11

7      Profile of Client Processing Rules. 12

8      Editorial Issues. 13

9      References. 14

9.1 Normative. 14

Appendix A. Revision History. 15

Appendix B. Notices. 16

1        Introduction

The DSS signing and verifying protocols are defined in [DSS Core] and the code-signing profile of the DSS signing and verification protocols are defined in [DSS CS].  As defined in those documents, these protocols have a fair degree of flexibility and extensibility.  This document profiles these protocols to limit their flexibility and extend them in concrete ways.  It also profiles the processing rules followed by clients and servers when using these protocols, and profiles the J2ME signature format for use with these protocols.  The resulting profile is suitable for implementation and interoperability.

The following sections describe how to understand the rest of this document.

1.1 Notation

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",

"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this specification are to be interpreted as described in IETF RFC 2119 [RFC 2119].  These keywords are capitalized when used to unambiguously specify requirements over protocol features and behavior that affect the interoperability and security of implementations.  When these words are not capitalized, they are meant in their natural-language sense.

This specification uses the following typographical conventions in text: <ns:Element>, Attribute, Datatype, OtherCode.

1.2 Namespaces

The structures described in this specification are contained in the schema file [J2ME-CS-XSD].  All schema listings in the current document are excerpts from the schema file.  In the case of a disagreement between the schema file and this document, the schema file takes precedence.

This schema is associated with the following XML namespace:

urn:oasis:names:tc:dss:1.0:profiles:codesigning:1.0:J2ME:1.0

If a future version of this specification is needed, it will use a different namespace.

Conventional XML namespace prefixes are used in this document:

·         The prefix dsscsj2me: (or no prefix) stands for the DSS code-signing namespace [CS-XSD].

·         The prefix dsscs: stands for the DSS code-signing namespace [CS-XSD].

·         The prefix async: stands for this profiles namespace [Async-XSD].

·         The prefix dss: stands for the DSS core namespace [Core-XSD].

·         The prefix ds: stands for the W3C XML Signature namespace [XMLSig].

Applications MAY use different namespace prefixes, and MAY use whatever namespace defaulting/scoping conventions they desire, as long as they are compliant with the Namespaces in XML specification [XML-ns].

1.3 Overview (Non-normative)

The [DSS-CS] abstract profile provides a profile of [DSS-Core] and combines it with the [DSS-Async] profile. The [DSS-CS] profile allow for the generation of signatures on content, including software programs, and is flexible enough to accommodate the typical scenarios encountered in the software development lifecycle.

This specification provides a concrete profile based on [DSS-CS] for requesting the generation of signatures as specified in the Java 2 Micro Edition (J2ME), Mobile Information Device Profile 2.0 [MIDP 2.0].

2        Profile Features

2.1 Identifier

urn:oasis:names:tc:dss:1.0:profiles:codesigning:1.0:J2ME:1.0

2.2 Scope

This document further profiles the abstract profile for code-signing as described in [DSS CS], which is a profile of the DSS signing protocol defined in [DSS Core] in combination with [DSS Async].

2.3 Relationship To Other Profiles

This profile is a concrete profile of the abstract code-signing profile defined in [DSS CS]

2.4 Signature Object

This profile supports the creation of signatures as defined in [MIDP 2.0]. [MIDP 2.0] defines the use of EMSA-PKCS1-v1_5 as defined in [RFC 2437].

2.5 Transport Binding

This profile is transported using the HTTP POST Transport Binding defined in [DSS Core].

2.6 Security Binding

This profile is secured using the TLS X.509 Mutual Authentication Binding defined in [DSS Core].

3        Profile of Signing Protocol

3.1 Element <dss:SignRequest>

3.1.1 Element <dss:OptionalInputs>

Optional inputs MUST be used as defined in [DSS CS].

The following optional inputs defined in the [DSS Core] will not be understood by a server implementing this profile:

·         <dss:AddTimeStamp>

·         <dss:SignedReference>

·         <dss:Properties>

·         <dss:SignaturePlacement>

·         <dss:EnvelopingSignature>

In addition the following constraints are placed on the optional inputs as described below.

3.1.1.1 Element <dss:SignatureType>

The <dss:SignatureType> MUST contain the identifier urn:ietf:rfc:2437:RSASSA-PKCS1-v1_5. This refers to PKCS #1 version 1.5 signatures as defined in [RFC 2437].

3.1.1.2 Element <dss:ServicePolicy>

The <dss:ServicePolicy> SHOULD be used to indicate a specific server signing policy. The server signing policy is mapped to the recommended security policy for GSM/UMTS compliant devices in [MIDP 2.0]. The following URIs may be used to specify the service policy and corresponding domain under which the MIDlet must be signed.

For code that should execute in the manufacturer domain use:

urn:oasis:names:tc:dss:1.0:profiles:codesigning:1.0:J2ME:1.0:manufacturer

For code that should execute in the operator domain use:

urn:oasis:names:tc:dss:1.0:profiles:codesigning:1.0:J2ME:1.0:operator

For code that should execute in the trusted third party domain use:

urn:oasis:names:tc:dss:1.0:profiles:codesigning:1.0:J2ME:1.0:trustedisv

3.1.2 Element <dss:InputDocuments>

The server MUST accept <dss:Document> inputs and MUST NOT accept <dss:DocumentHash> inputs. A server that implements this profile MUST respond with a <dss:ResultMajor> code of urn:oasis:names:tc:dss:1.0:resultmajor:RequesterError as defined in [DSS Core] if it receives a <dss:DocumentHash> input.

The <dss:Document> element MUST include the Base64 encoded J2ME JAR file on which the signature must be calculated within a <dss:Base64Data> element. The MimeType attribute MUST be set to application/java-archive. Only one <Document> element MUST be submitted.

3.2 Element <dss:SignResponse>

3.2.1 Element <dss:Result>

This profile defines no additional <dss:ResultMinor> codes.

3.2.2 Element <dss:OptionalOutputs>

None of the optional outputs specified in the [DSS Core] are precluded in this abstract profile. In addition this profile defines the following <dss:OptionalOutputs>:

·         <X509CertificatePath>

In addition, the <dss:OptionalOutputs> element MAY contain a <dss:Document> element.

3.2.2.1 Element <X509CertificatePath>

This element defines the certificate path including the certificate containing the public key required to verify the signature generated on the JAR file submitted by the client and all intermediary certificates, excluding the root certificate. The client MAY use this information to determine the appropriate entries in the Java Application Descriptor file (JAD) file that is distributed with the JAR file containing the MIDP 2.0 application. The server may return multiple <X509CertificatePath> elements. The orders of the <X509CertificatePath> elements are significant. The first <X509CertificatePath> element corresponds to the first certificate path, identified by n=1 in the JAD file, the second <X509CertificatePath> element corresponds to the second certificate path, identified by n=2, in the JAD file, the j’th <X509CertificatePath> element corresponds to the j’th certificate path, identified by n=j, in the JAD file. The <X509CertificatePath> element contains the following elements:

<X509Certificate>

The <X509Certificate> element contains a base64-encoded X.509 v3 certificate. The order of the <X509Certificate> elements are significant. The first <X509Certificate> element contains the signing certificate and corresponds to m=1 in the JAD file for the current <X509CertificatePath> element, the second <X509Certificate> element contains the first intermediary certificate and corresponds to m=2 the current <X509CertificatePath> element, the k’th <X509Certificate> element contains the k-1’st intermediary certificate that issued the k-2’nd intermediary cert.

<xs:element name="X509CertificatePath"            

            type="dsscsj2me:X509CertificatePathType"/>

<xs:complexType name="X509CertificatePathType">

<xs:sequence maxOccurs="unbounded">

          <xs:element ref="dsscsj2me:X509Certificate"/>

   </xs:sequence>

</xs:complexType>

<xs:element name="X509Certificate"

            type="dsscsj2me:X509CertificateType"/>

<xs:simpleType name="X509CertificateType">

   <xs:restriction base="xs:base64Binary"/>

</xs:simpleType>

3.2.2.2 Element <dss:Documents>

The server MAY include the J2ME JAR file on which the signature was created as an optional output using the <dss:Documents> element. If the <dss:Document> element is included in the response as an optional output, it MUST include the Base64 encoded J2ME JAR file within a <dss:Base64Data> element. The included J2ME JAR file MUST be the file on which the signature included in the <dss:SignatureObject> was calculated. The MimeType attribute MUST be set to application/java-archive.

3.2.3 Element <dss:SignatureObject>

The server MUST return a Base64 encoded PKCS #1 signature within the <Base64Signature> element. The <dss:SignatureObject> element MUST NOT contain any other elements.

4        Profile of Verifying Protocol

This [DSS CS] profile does not provide a profile of the DSS verification messages and consequently a server implementing this profile MUST NOT respond to any <dss:VerifyRequest> messages.

5        Profile of J2ME MIDP 2.0 Signatures

The J2ME MIDP 2.0 signature format is fully defined in [MIDP 2.0] and no further profiling is required.

6        Profile of Server Processing Rules

The signature must be calculated on the Base64 decoded JAR file. The server processing rules defined in [DSS CS] SHOULD be followed.

7        Profile of Client Processing Rules

Client processing rules as defined in [DSS CS] SHOULD be followed.

8        Editorial Issues

9        References

9.1 Normative

[Core-XSD]             T. Perrin et al.  DSS Schema.  OASIS, (MONTH/YEAR TBD)

[DSSCore]              T. Perrin et al.  Digital Signature Service Core Protocols and Elements.  OASIS, (MONTH/YEAR TBD)

[RFC2119]               S. Bradner.  Key words for use in RFCs to Indicate Requirement Levels. IETF RFC 2119, March 1997.

                                    http://www.ietf.org/rfc/rfc2119.txt

[XML-ns]                 T. Bray, D. Hollander, A. Layman.  Namespaces in XML.  W3C Recommendation, January 1999.

http://www.w3.org/TR/1999/REC-xml-names-19990114

[XMLSig]                D. Eastlake et al.  XML-Signature Syntax and Processing.  W3C Recommendation, February 2002.

http://www.w3.org/TR/1999/REC-xml-names-19990114

[DSS CS]                Abstract Code-Signing Profile of the OASIS Digital Signature Services Working Draft 03, 13 October 2004

[DSS Async]           Asynchronous Processing Abstract Profile of the OASIS Digital Signature Services, Working Draft 04, 21 August 2004

[CS-XSD]                P. Kasselman,  Codesigning Schema. OASIS, (MONTH/YEAR TBD)

[Async-XSD]           A, Kuehne. Asynchronous Processing Profile  Schema.  OASIS, (MONTH/YEAR TBD)

[J2ME-CS-XSD]       P. Kasselman,  J2ME Codesigning Schema. OASIS, (MONTH/YEAR TBD)

[MIDP 2.0]               Mobile Information Device Profile for Java™ 2 Micro Edition Version 2.0, JSR 118 Expert Group

[RFC 2437]              RFC 2437 PKCS #1: RSA Cryptography Specifications Version 2.0, B. Kaliski, J. Staddon, http://www.ietf.org/rfc/rfc2437.txt

Appendix A. Revision History

Rev

Date

By Whom

What

wd-01

2004-07-16

Pieter Kasselman

Initial version based oasis-dss-1.0-profiles-XYZ-spec-wd-04.doc by Trevor Perrin

wd-02

2004-10-13

Pieter Kasselman

Revised version includes <X509CertificatePath> element, clerical corrections and refinements.

wd-03

2004-11-24

Pieter Kasselman

Clerical corrections (name change etc)

cd-01

2004-12-24

Pieter Kasselman

Approved Committee Draft

wd-04

2006-08-31

Andreas Kuehne

Editor changed,

Updated reference to RFC 2119

Appendix B. Notices

OASIS takes no position regarding the validity or scope of any intellectual property 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; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication 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 implementors or users of this specification, can be obtained from the OASIS Executive Director.

OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.

Copyright  © OASIS Open 2006. All Rights Reserved.

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself does not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English.

The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.

This document and the information contained herein is provided on an “AS IS” basis and OASIS DISCLAIMS 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.