<div dir="ltr"><div>For any prime p suitable for Diffie-Hellman key agreement with group generator g = 2, simply generate the binary digits of fraction(2^n/p), where n is a shared secret.  XOR these digits over the message stream for both encryption and decryption.<br></div><div><br></div><div><div>I'm ignoring issues such as the need for a unique nonce, and maliability defense.  The standard fixes apply.  The ability to determine n is trivially equivalent to solving the discrete log problem.</div></div><div><br></div><div>Is this well known?  I'm pretty much finding that everything seems to be already known in crypto...</div><div><br></div><div>Bill</div></div>