[OTR-dev] A C# lib
alex323
alex323 at gmail.com
Sat Jan 15 17:46:17 EST 2005
I think I know what I need to do now.. Do I need to insert the length of
p, q, g, and e seperately? So if:
p.Length = 12
q.Length = 34
g.Length = 56
e.Length = 7890
i'd have my array look like this:
[4] = 0 /* It's 4 bytes per MPI */
[5] = 0
[6] = 0
[7] = 12
[8] = 0
[9] = 0
[10] = 0
[11] = 34
[12] = 0
[13] = 0
[14] = 0
[15] = 56
[16] = 0
[17] = 0
[18] = 90 /* Big-Endian right? */
[19] = 78
Please correct me if I am wrong :)
Regards,
Alex
Ian Goldberg wrote:
>On Sat, Jan 15, 2005 at 05:07:07PM -0500, alex323 wrote:
>
>
>>I see. Let me admonish you that the .NET crypto libs are slightly
>>different than gcrypt. Before I read the protocol, I never knew what an
>>MPI was.
>>
>>
>
>The wire format in the protocol isn't the native one of libgcrypt,
>either. (In fact, the Protocol document was written before coding
>started, and I think even before libgcrypt was chosen.) It's just
>an easy-to-generate, easy-to-parse format.
>
>
>
>>"4 byte unsigned len, big-endian"
>>
>>I am assuming that that is supposed to be 4 bytes that indicate the
>>length of hte public key?
>>
>>
>
>That's right.
>
> - Ian
>_______________________________________________
>OTR-dev mailing list
>OTR-dev at lists.cypherpunks.ca
>http://lists.cypherpunks.ca/mailman/listinfo/otr-dev
>
>
>
More information about the OTR-dev
mailing list