[OTR-dev] Fingerprints?

Ian Goldberg ian at cypherpunks.ca
Tue Jan 18 23:53:52 EST 2005


On Tue, Jan 18, 2005 at 09:34:56PM -0500, alex323 wrote:
> Do you remove the NULs at the beginning of the MPI when you are 
> generating your session key? (secbytes).
> 
> Write the value of secret as a minimum-length MPI, as specific above
>    (4-byte big-endian len, len-byte big-endian value).  Let this
>    (4+len)-byte value be "secbytes".
> 
> 
> That seems to indicate to me that you leave the NULs there.

"minimum length" indicates the removal of leading 0x00 bytes.

Let's say you've got an MPI with the (implausibly small) value of
0x123456.  Mathematically, that's the same number as 0x00123456
or 0x000000000000123456.  What the above is saying is that you need
to encode it as 00000003123456, not 0000000400123456 or any other
such thing.

   - Ian



More information about the OTR-dev mailing list