Subject: Re: S/MIME examples draft

From: Holger Ebel <[email-masked]>
Date: Wed, 21 Jul 2004 08:30:08 -0700

Paul,

I've tested the new version of the examples included in the
smime-examples-13 draft with our S/MIME & CMS library today.

Sadly, two tests "failed" (4.9 and 5.3), the reasons for the
test failures are the S/MIME "headers" of the two examples.
Please find the details below.

To speed things up, I've corrected the two examples and re-
encoded them (base64)
These new examples are attached at the end of this mail.
For testing, I've replaced the two examples in the original-13
draft and let the pearl script extract the example files from
the draft. Everything works fine.

---------------------------------------

Summary of the test results (V13):

3.1 ok
3.2 ok

4.1 verify ok
4.2 verify ok
4.3 verify ok
4.4 verify ok
4.5 verify ok
4.6 verify ok
4.7 verify ok
4.8 verify ok
4.9 *not* ok
     ** The base64 decoded example is prepended with the description
     of the 4.9 example.
     4.9.eml
     <----->
     A full S/MIME message, including the MIME parts.

     MIME-Version: 1.0
     ....
     <----->
     I've deleted the first two lines and reencoded the example. No other
     changed were made. After that, the S/MIME message could be parsed
     without a warning and the signatureContainer could be verified.

4.10 verify ok
4.11 ok

5.1 decryption ok
5.2 decryption ok
5.3 As stated in my V.12 example eMail, the 5.3 example message is
     erroneous. It causes two failure/warning messages:
     (1) The "Content-Description" header title must be replaced with
         the "Content-Disposition" header title.
     (2) The "Content-Type" header contains a "filename=smime.p7m"
         entry. IMHO this entry must be replaced by the following
         smime-type entry "smime-type=enveloped-data".

      I've changed the headers according RFC2633 and adjusted the
      line length of the base64 encoded content (to have the same
      line length as the other S/MIME examples).
      After that, the S/MIME message could be parsed without a
      warning and the envelopedContainer could be decrypted.

6. not tested

7.1 decryption ok
7.2 decryption ok

---------------------------------------

corrected examples:

Example 4.9:
------------
|* Example 4.9.eml
|>4.9.eml
|TUlNRS1WZXJzaW9uOiAxLjAKVG86IFVzZXIyQGV4YW1wbGVzLmNvbQpGcm9tOiBhbGljZU
|Rzc0BleGFtcGxlcy5jb20KU3ViamVjdDogRXhhbXBsZSA0LjkKTWVzc2FnZS1JZDogPDAy
|MTAzMTE2ND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JkCjNadFo0czJxQl
|QxWXdIdWlOcmh1QjY5OWlrSWxwL1IxejBvSVhrcytrUGh0NnB6SklZbzdkaFRwemk1ZG93
|Zk5JNFc0THpBQmZHMUoKaVJHSk5rUzkrTWlWU2xOV3RlTDVjK3dhWVRZZkVYL0N2ZTNSVV
|ArWWRNTFJnVXBnT2JvMk9RT0JoQUFDZ1lCYzQ3bGFkUlNXQzZsNgozZU0vcWV5c1h0eTl0
|eE1STktZV2lTZ1JJOWswaG1kMWRSTVNQVU5iYitWUnYvcUo4cUliUGlSOVBRZU5XMlBJdT
|BXbG9FcmpoZGJPCkJvQS82Q04rR3ZJa3ExTWF1Q2NOSHU4SXYyWVVnRnhpckdYNkZZdnh1
|elRVMHBZMzltRkhzc1F5aFBCK1FVRDlScWRqVGpQeXBlTDAKOG9QbHVLT0JnVEIvTUF3R0
|ExVWRFd0VCL3dRQ01BQXdEZ1lEVlIwUEFRSC9CQVFEQWdiQU1COEdBMVVkSXdRWU1CYUFG
|SEJFUG9JdQpiNGZlU3ROMTR6MGd2RU1yay9FZk1CMEdBMVVkRGdRV0JCUytiS0d6NDhIMz
|dVTndwTTRUQWVMOTQ1Zit6VEFmQmdOVkhSRUVHREFXCmdSUkJiR2xqWlVSVFUwQmxlR0Z0
|Y0d4bExtTnZiVEFKQmdjcWhrak9PQVFEQXpBQU1DMENGRlVNcEJrZlFpdUpjU0l6allOcX
|RUMW4KYTc5RkFoVUFuMkZUVWxRTFhMTGQydWQySGVJUVVsdERYcjB4WXpCaEFnRUJNQmd3
|RWpFUU1BNEdBMVVFQXhNSFEyRnliRVJUVXdJQwpBTWd3QndZRkt3NERBaG93Q1FZSEtvWk
|l6amdFQXdRdU1Dd0NGRDFjU1c2TElVRnplWGxlM1lJNVNLU0Jlci9zQWhRbUNxN3MvQ1RG
|CkhPRWpnQVNlVWpiTXB4NWc2QT09Cg==
|<4.9.eml
------------

Example 5.3:
------------
5.3 S/MIME application/pkcs7-mime encrypted message

A full S/MIME message, including MIME, that includes the body part from
5.1.

MIME-Version: 1.0
Message-Id: <[email-masked]>
Date: Tue, 31 Oct 2000 12:00:52 -0600 (Central Standard Time)
From: User1
To: User2
Subject: Example 5.3
Content-Type: application/pkcs7-mime;
	name=smime.p7m;
	smime-type=enveloped-data
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=smime.p7m

MIIBHgYJKoZIhvcNAQcDoIIBDzCCAQsCAQAxgcAwgb0CAQAwJjASMRAwDgYDVQQDEwdDYXJsUlNB
AhBGNGvHgABWvBHTbi7NXXHQMA0GCSqGSIb3DQEBAQUABIGAC3EN5nGIiJi2lsGPcP2iJ97a4e8k
bKQz36zg6Z2i0yx6zYC4mZ7mX7FBs3IWg+f6KgCLx3M1eCbWx8+MDFbbpXadCDgO8/nUkUNYeNxJ
tuzubGgzoyEd8Ch4H/dd9gdzTd+taTEgS0ipdSJuNnkVY4/M652jKKHRLFf02hosdR8wQwYJKoZI
hvcNAQcBMBQGCCqGSIb3DQMHBAgtaMXpRwZRNYAgDsiSf8Z9P43LrY4OxUk660cu1lXeCSFOSOpO
J7FuVyU=
------------

------------
|* Example 5.3.eml
|>5.3.eml
|TUlNRS1WZXJzaW9uOiAxLjAKTWVzc2FnZS1JZDogPDAwMTAzMTEyMDA1MjAzLjAwMzQ5QG
|FteWVtaWx5LmlnLmNvbT4KRGF0ZTogVHVlLCAzMSBPY3QgMjAwMCAxMjowMDo1MiAtMDYw
|MCAoQ2VudHJhbCBTdGFuZGFyZCBUaW1lKQpGcm9tOiBVc2VyMQpUbzogVXNlcjIKU3Viam
|VjdDogRXhhbXBsZSA1LjMKQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9wa2NzNy1taW1l
|OwoJbmFtZT1zbWltZS5wN207CglzbWltZS10eXBlPWVudmVsb3BlZC1kYXRhCkNvbnRlbn
|QtVHJhbnNmZXItRW5jb2Rpbmc6IGJhc2U2NApDb250ZW50LURpc3Bvc2l0aW9uOiBhdHRh
|Y2htZW50OyBmaWxlbmFtZT1zbWltZS5wN20KCk1JSUJIZ1lKS29aSWh2Y05BUWNEb0lJQk
|R6Q0NBUXNDQVFBeGdjQXdnYjBDQVFBd0pqQVNNUkF3RGdZRFZRUURFd2REWVhKc1VsTkIK
|QWhCR05HdkhnQUJXdkJIVGJpN05YWEhRTUEwR0NTcUdTSWIzRFFFQkFRVUFCSUdBQzNFTj
|VuR0lpSmkybHNHUGNQMmlKOTdhNGU4awpiS1F6MzZ6ZzZaMmkweXg2ellDNG1aN21YN0ZC
|czNJV2crZjZLZ0NMeDNNMWVDYld4OCtNREZiYnBYYWRDRGdPOC9uVWtVTlllTnhKCnR1en
|ViR2d6b3lFZDhDaDRIL2RkOWdkelRkK3RhVEVnUzBpcGRTSnVObmtWWTQvTTY1MmpLS0hS
|TEZmMDJob3NkUjh3UXdZSktvWkkKaHZjTkFRY0JNQlFHQ0NxR1NJYjNEUU1IQkFndGFNWH
|BSd1pSTllBZ0RzaVNmOFo5UDQzTHJZNE94VWs2NjBjdTFsWGVDU0ZPU09wTwpKN0Z1VnlV
|PQoK
|<5.3.eml
------------

Could someone else please confirm this?

Best Regards,

Holger Ebel

Dipl. Inform.
Senior Software Developer

AuthentiDate International AG
Grossenbaumer Weg 6
40472 Duesseldorf / Germany
Phone   : +49(0)211 43 69 89-64
FAX     : +49(0)211 43 69 89-19

----------------------------------------------------------------
Erfahren Sie mehr unter:
http://www.authentidate.de
----------------------------------------------------------------

---

From: "Nicholas, Richard" <[email-masked]>
Date: Fri, 23 Jul 2004 10:29:34 -0400

Paul,

DigitalNet completed our testing of the "Examples of S/MIME Messages"
Internet-Draft.  DigitalNet used the S/MIME Freeware Library (SFL) to
successfully process (i.e. decode, verify, decrypt) the samples in the
"Examples-13" I-D.

We hit the same problems with tests 4.9 and 5.3 that Holger Ebel
reported earlier.  We re-tested with the corrected examples he sent out
and all tests now pass.

See below for the specific test results.

- Rich
-----------------------------
Richard E. Nicholas
Secure Systems Consultant
DigitalNet Government Solutions, LLC
[email-masked]
(301) 939-2722

Test Results:

(Note: Test numbers correspond to Examples-13  sections 3 through 7.)

3.  ContentInfo Tests

3.1	ContentInfo with Data type, BER:  Successfully ASN.1 decoded the
BER-encoded ContentInfo sample in Examples document using SFL.

3.2	ContentInfo with Data type, DER:  Successfully ASN.1 decoded the
DER-encoded ContentInfo sample in Examples document using SFL.

4.  Signed-Data Tests

4.1	Basic signed content, DSS:  Successfully verified signature of
sample in Examples document using SFL.

4.2	Basic signed content, RSA:  Successfully verified signature of
sample in Examples document using SFL.

4.3	Basic signed content, detached content: Successfully verified
signature of sample in Examples document using SFL.

4.4	Fancier Signed Content:  Successfully verified signature of
sample in Examples document using SFL.  

4.5	All RSA signed message:  Successfully verified signature of
sample in Examples document using SFL.

4.6	Multiple Signers: Successfully verified both of the signatures
in the sample in the Examples document using SFL.  

4.7	Signing using SKI:  Successfully verified signature of sample in
Examples document using SFL. 

4.8	S/MIME multipart/signed message: Successfully verified signature
of sample in Examples document using SFL. 

4.9	S/MIME application/pkcs7-mime signed message:  Unsuccessful.
There was a problem with 4.9 - The SFL does not recognize that the
message is a signedData message because of the data error in the
original message.  Re-tested with the changes that Holger Ebel made.
The test ran successfully and verified the signature.

4.10	SignedData with Attributes:  Successfully verified signature of
sample in Examples document using SFL.

4.11	SignedData with Certificates only:  Successfully processed
sample in Examples document using SFL.

5.   Enveloped-data Tests

5.1.	Basic encrypted content, TripleDES and RSA:  Successfully
decrypted sample in Examples document using SFL. 

5.2.	Basic encrypted content, RC2/128 and RSA:  Successfully
decrypted sample in Examples document using SFL.

5.3.	S/MIME application/pkcs7-mime encrypted message:  Successfully
decrypted sample in Examples document using SFL.  Re-tested with the
changes made by Holger Ebel.  That message also successfully decrypted
using the SFL.  

6.  Digested-Data Tests - SFL does not support.

6.0	Successfully used SFL to error out gracefully upon processing
sample in Examples document.

7.  Encrypted-Data Tests

7.1	Simple EncryptedData:  Successfully decrypted sample in Examples
document using SFL.
      
7.2	EncryptedData with unprotected attributes:  Successfully
decrypted sample in Examples document using SFL.