openssh's private DSA key format is the format used by openssl. check the source. -m On Fri, Aug 03, 2001 at 05:11:46PM -0400, [EMAIL PROTECTED] wrote: > After stripping out the non-base64 encoded stuff from a dsa private > key, and examining the resulting binary data, it is seems the format of > the key file is as follows: > > -two bytes (0x30, 0x82) > -two bytes (an encoded value for the size of the remaining file) > -three bytes (an encoded "zero") > -many bytes containing what I believe to be the encoded key prime > -many bytes containing what I believe to be the encoded q > -many bytes containing what I believe to be the encoded g > -many bytes containing what I beleive to be the encoded x > -many bytes containing some 160 bit number. > > Can anybody please explain: > a) What the first two bytes are for, > b) The encoding mechanism, > c) The role of each encoded value (i.e. please confirm my suspicions) > d) What the last 160 bit number is, and how it is generated? > > I have spent several hours trying to step through various pieces of > code to understand this, and so far I cannot. > I have tried various combinations of hashing stuff with sha and > comparing it to the value in the file, but no go. > > Even better, if somebody could point me in the direction of any > documentation on this stuff, that would be great! > > David Henderson > [EMAIL PROTECTED] > FSC Internet Corp. > 229 Yonge Street, Toronto, ON > (416) 921-4280 >