Hi, Edward Chan wrote: > When I call this function, I can see from the generated binary data that > the format is the public key, followed by the P param, followed by 3 > bytes which I don't know what they are, followed by the Q param, > followed by the G param. >
You have got an ASN.1 DER encoding which is Tag || Length || Value Since P, Q, G are integers they'll encoded with the tag of an integer (0x2 i think), followed by a length and then the value bytes. > > I haven't tried generating more than one DSA pub/priv key pair yet using > these params so I don't know if these 3 bytes are the same all the time, > but does someone know off hand what those bytes are? > If you can tell what those bytes are which are confusing you maybe someone can confirm that you are indeed seeing the ASN.1 tag|length. > > > Is there some standard encoding for how a public key and private key are > stored? i.e. do the params always come after the pub/priv key, or > before? And do they always appear in the order of P,Q,G? > Yes, it is a standard. Please refer to RFC 3279 for DSSParms. -jb -- Tact is the art of making a point without making an enemy. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]