I am clearly missing something. General Questions

"Glen Kleidon" <[email protected]> Tue, 20 Mar 2001 14:46:55 +1100
Newsgroups gmane.ietf.smime-examples
Message-ID <014201c0b0f0$688ca020$328080c4@galkserv>
This is a multi-part message in MIME format.

------=_NextPart_000_013F_01C0B14C.9BE32780
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I  am trying to come to grips with the SMIME.   I am getting there I =
think but I am just missing a couple of bits of info.  Perhaps there is =
a RFC I haven't read which answers all these questions.

In the examples (draft-ietf-smime-examples-06.txt) I could not =
understand how you get 9 bytes for the DES3/RSA oid but I have now been =
told that you encode the
first two digits as a+40 + b but is that 43 (2B)  or $40 + $02 + $01 =3D =
$43 and the large number > 7f in multiple bytes.  Are these large =
numbers encoded in Lowbyte/Highbyte format?

eg the new id-RSAES-OAEP   is iso(1) member-body(2) us(840) =
rsadsi(113549) pkcs(1) pkcs-1(1) 7  again 10 bytes
  would that be        =20
2B 03 48 01 BB 8D 01 01 07   or
43 03 48 01 BB 8D 01 01 07   or
2B 48 03 01 8D BB 01 01 07   or
43 48 03 01 8D BB 01 01 07   or
or something else?
 =20
Also, are the lengths low/high byte too
eg in example 6.1 should the sequence be  for
=20
0 30  286: SEQUENCE {          =20
4 06    9:   OBJECT IDENTIFIER envelopedData (1 2 840 113549 1 7 3)
         :     (PKCS #7)
15 A0  271:   [0] {             --- I can't get this line either?
19 30  267:     SEQUENCE {
23 02    1:       INTEGER 0
=20
30 1E 01 06 09 2B 03 48 01 BB 8D 01 07 03 0A 0F 01 00 30 0B 01 02 01 00
     ??   ??         ??                                                  =
                        ??         ??  ?? =20

And should the lengths for integer data have 4 bytes ? and what about =
the octec strings?=20

Second, when I base64 decode your examples it is in what appears to be =
UNICODE.  It isn't though.  I can't see how you go from the sequence =
above to the data I get after base 64 decoding the example.  If there is =
a RFC or other document which explains these things could you tell me =
what it is?


------=_NextPart_000_013F_01C0B14C.9BE32780
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2014.210" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>I&nbsp; am trying to come to grips with =
the=20
SMIME.&nbsp;&nbsp; I am getting there I think but I am just missing a =
couple of=20
bits of info.&nbsp; Perhaps there is a RFC I haven't read which answers =
all=20
these questions.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>In&nbsp;the examples=20
(draft-ietf-smime-examples-06.txt) I could not understand how you get 9 =
bytes=20
for the DES3/RSA oid but I have now been told that you encode =
the</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>first two digits as a+40 + b but is =
that=20
43&nbsp;(2B)&nbsp; or $40 + $02&nbsp;+ $01 =3D $43 and the large number =
&gt; 7f in=20
multiple bytes.&nbsp; Are these large numbers encoded in =
Lowbyte/Highbyte=20
format?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>eg&nbsp;the new =
id-RSAES-OAEP&nbsp;&nbsp; is <FONT=20
face=3DCourier size=3D2><FONT face=3DArial><FONT face=3DArial =
size=3D2>iso(1)=20
member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-1(1) 7&nbsp; again 10 =

bytes</FONT></FONT></FONT></FONT></DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DCourier size=3D2><FONT =
face=3DArial></FONT></FONT>&nbsp; would that=20
be &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </DIV>
<DIV><FONT face=3D"Courier New">2B 03 48 01 BB 8D 01 01 07&nbsp;&nbsp;=20
or</FONT></DIV>
<DIV><FONT face=3D"Courier New">43&nbsp;03 48 01 BB 8D 01 01 =
07&nbsp;&nbsp;=20
or</FONT></DIV>
<DIV><FONT face=3D"Courier New"><FONT face=3DArial>
<DIV><FONT face=3D"Courier New">2B 48 03 01 8D BB 01 01 07&nbsp;&nbsp;=20
or</FONT></DIV></FONT>
<DIV><FONT face=3D"Courier New">43&nbsp;48 03 01 8D BB 01 01 =
07&nbsp;&nbsp;=20
or</FONT></DIV>
<DIV>or something else?</DIV>&nbsp; </FONT><FONT =
size=3D2></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Also, are the lengths low/high byte=20
too</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>eg in example 6.1 should the sequence =
be&nbsp;=20
for</FONT></DIV>
<DIV><FONT size=3D2><FONT face=3DArial>&nbsp;</FONT><BR><FONT =
face=3D"Courier New">0=20
30&nbsp; 286: SEQUENCE=20
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></FON=
T>=20
<DIV><FONT face=3D"Courier New" size=3D2>4 06&nbsp;&nbsp;&nbsp; =
9:&nbsp;&nbsp;=20
OBJECT IDENTIFIER envelopedData (1 2 840 113549 1 7=20
3)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
:&nbsp;&nbsp;&nbsp;&nbsp;=20
(PKCS #7)<BR>15 A0&nbsp; 271:&nbsp;&nbsp; [0]=20
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;---=20
I can't get this line either?<BR>19 30&nbsp; =
267:&nbsp;&nbsp;&nbsp;&nbsp;=20
SEQUENCE {<BR>23 02&nbsp;&nbsp;&nbsp; =
1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
INTEGER 0</FONT></DIV>
<DIV><FONT size=3D2><FONT face=3D"Courier =
New"></FONT></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><FONT face=3D"Courier New">30 1E 01 06 09 2B 03 48 =
01 BB 8D 01=20
07 03 0A 0F 01&nbsp;00 30 0B 01&nbsp;02 01 00</FONT></FONT></DIV>
<DIV><FONT size=3D2><FONT face=3D"Courier New">&nbsp;</FONT><FONT=20
face=3DArial>&nbsp;&nbsp;&nbsp; ??&nbsp;&nbsp;=20
??&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;??&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
??&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;??&nbsp; =
??&nbsp;=20
</FONT></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>And&nbsp;should&nbsp;the lengths for =
integer data=20
have 4 bytes&nbsp;? and what about the octec strings? </FONT></DIV>
<DIV>&nbsp;</DIV></DIV>
<DIV><FONT face=3DArial size=3D2>Second, when I base64 decode&nbsp;your =
examples it=20
is in what appears to be UNICODE.&nbsp; It isn't though.&nbsp; I can't =
see how=20
you go from the sequence&nbsp;above to the data I get after base 64 =
decoding the=20
example.&nbsp; If there is&nbsp;a RFC or other document which explains =
these=20
things could you tell me what it is?</FONT></DIV>
<DIV>&nbsp;</DIV></FONT></DIV></BODY></HTML>

------=_NextPart_000_013F_01C0B14C.9BE32780--