[Cryptography] Random numbers for Diffie-Hellman

Patrick Chkoreff pc at fexl.com
Fri Dec 6 10:53:29 EST 2024


On 12/5/24 2:48 PM, Pierre Abbat wrote:
> On Thursday, December 5, 2024 11:36:02 AM EST Patrick Chkoreff wrote:
>> 2.4 Using 8 bits
>>
>> The bound B = 255.  Probability of rejection is 1/256.  Another improvement.
> 
> Sounds like you're getting one trit out of a byte, which is terribly
> inefficient. A byte is 5.047438 trits. You can get 4.828125 trits out of a byte
> easily, which is 95.655% efficient. Not as good as the 99% you get from 27 bits,
> but it's up there.

I was just illustrating how raising the bit count reduces the rejection 
rate.  I chose an 8 bit example because that's typically how many bits 
you have in front of you anyway.  However, the example is unrealistic 
because you would simply use each of the four pairs of bits to generate 
up to four trits, rejecting any occurrences of 11.

I need to look into implementing the algorithm that Christian Huitema 
mentioned.  It's no surprise that it interprets the bit stream as a real 
number (in the limit, abstractly).  I also like the idea of accepting a 
2^-64 bias on the basis that it's unobservable.


-- Patrick



More information about the cryptography mailing list