ietf-openpgp
[Top] [All Lists]

Suggested DER Prefixes

2003-05-21 03:13:32

-----BEGIN PGP SIGNED MESSAGE-----

Greetings,

Please find below some suggested DER prefixes
for the hash algorithms with no OID's.

Best regards

Imad R Faiad

PS Can someone clarify OpenPGP symmetric
algorithm ID: 6 (DES/SK), I mean, what
variant of the DES algorithm are we talking about.
TIA

//Double width SHA (SHA1x) experimental algorithm
//Used In: PGP 5.x
//OpenPGP Hash Algorithm ID: 04
unsigned char const SHA1xDERprefix[] = {
        0x30, /* Universal, Constructed, Sequence */
        0x35, /* Length 53 (bytes following) */
                0x30,  /* Universal, Constructed, Sequence */
                0x09,  /* Length 9 bytes*/
                        0x04, /* Universal, Primitive, Octet string */
                        0x05, /*Length 5 bytes*/
                           0x53, 0x48, 0x41, 0x31, 0x78,  /*SHA1x*/
                        0x05,  /* Universal, Primitive, NULL */
                        0x00, /* Length 0 */
                0x04, /* Universal, Primitive, Octet string */
                0x28 /* Length 40 bytes = 320 bits*/
                /* 40 bytes SHA1x digest start here */
};

//HAVAL 5 pass, 160 bits (HAVAL-5-160)
//OpenPGP Hash Algorithm ID: 07
//Used in: PGP 2.6.3ia-multi04+
unsigned char const HAVAL-5-160DERprefix[] = {
        0x30, /* Universal, Constructed, Sequence */ 
        0x27, /* Length 39 (bytes following) */
                0x30,  /* Universal, Constructed, Sequence */
                0x0f,  /* Length 15 bytes*/
                        0x04, /* Universal, Primitive, Octet string */
                        0x0B, /*Length 11 bytes*/
                           0x48, 0x41, 0x56, 0x41, 0x4C, 0x2D,
                           0x35, 0x2D, 0x31, 0x36, 0x30, /*HAVAL-5-160*/
                        0x05,  /* Universal, Primitive, NULL */
                        0x00, /* Length 0 */
                0x04, /* Universal, Primitive, Octet string */
                0x14 /* Length 20 bytes = 160 bits*/
                /* 20 bytes HAVAL-5-160 digest start here */
};

//HAVAL 5 pass, 256 bits (HAVAL-5-256)
//OpenPGP Hash Algorithm ID: None
//Used in: PGP 2.6.3ia-multi04+
//Hash Algorithm ID used: 11
unsigned char const HAVAL-5-256DERprefix[] = {
        0x30, /* Universal, Constructed, Sequence */ 
        0x33, /* Length 51 (bytes following) */
                0x30,  /* Universal, Constructed, Sequence */
                0x0f,  /* Length 15 bytes*/
                        0x04, /* Universal, Primitive, Octet string */
                        0x0B, /*Length 11 bytes*/
                           0x48, 0x41, 0x56, 0x41, 0x4C, 0x2D,
                           0x35, 0x2D, 0x32, 0x35, 0x36, /*HAVAL-5-256*/
                        0x05,  /* Universal, Primitive, NULL */
                        0x00, /* Length 0 */
                0x04, /* Universal, Primitive, Octet string */
                0x20 /* Length 32 bytes = 256 bits*/
                /* 32 bytes HAVAL-5-256 digest start here */
};

-----BEGIN PGP SIGNATURE-----

iQEVAwUBPstebrzDFxiDPxutAQG59gf/RacmJy5hXblTPLE3TWPxm6kr+BttAL0b
osCJX125UxrhCailjERQwhy9ZGonw2rAPLScY6J2dfle/Zcu69ZL8Mppp9MEsHGT
J9nqAyR1gWvC5omSSr9CQoYHO1MkDzfSAec3QVd+tL9rEouqEcuTkVAJ1s1fbDT5
SxazIu0u/XIL5O2qwFBcVGPhvc4Otn++drz7u5Eh9ZlzktoyJFPQwSQIsbAAyKgN
dlonhygYvDVGdrq/NbjSP9cMg0Azs4e/EJp5AUnZPJmQ7jixhQa7Fc6JczVm2qMZ
RY7ph9cF+R7HdCI+6l1wOYEbQuvXdyKL4hrmYSAEotDDPCyCViTKmQ==
=wSbE
-----END PGP SIGNATURE-----



<Prev in Thread] Current Thread [Next in Thread>