Windows DLL

Nicolas Lynch-Aird lynchaird at
Sat Oct 20 11:50:23 BST 2012

The attached .zip file contains my own effort at a Windows DLL for the
entropy key. This software is released for free use, modification, and
distribution. It has not been formally tested and is provided with no
warranties whatsoever. The file set contains:




The Windows setup file needed to install the necessary drivers for the
entropy key.






The DLL file and associated header and lib files. I created this DLL using
Borland Turbo C++ 2006, so the lib file may need to be rebuilt for other




The source code for the DLL.




An example program showing usage of the DLL.


ekey_connect() locates any entropy keys present on the system and attempts
to reset these keys and re-key their long-term and session keys. A separate
thread is then launched which continually retrieves the entropy generated by
the keys and writes it into an entropy pool (a byte array).


ekey_disconnect() terminates the execution of the thread launched by


ekey_get_bytes() gets a specified number of random bytes from the pool.


A number of other functions are included which return random values in
different formats, but these all use ekey_get_bytes() to retrieve the
necessary bytes of entropy.


Please bear in mind that I am not a professional C/C++ programmer. I learnt
to program in C under Unix years ago. My efforts to create Windows C/C++
programs have been entirely self-taught. As a consequence I would expect
that certain things could be done better, especially the error handling and
naming conventions. This is also my first attempt at creating a DLL.


The software seems to work but it has not been properly tested. I have
written ekey_connect() to support multiple entropy keys simultaneously with
a common pool. I, however, only have one key so I don't know how well this
will actually work. Particular functions which would benefit from close
scrutiny are EntropyFrame() and WritePool(), which decode the entropy and
add it to the pool, and ekey_get_bytes() which reads it out again.


I make no undertaking to correct or maintain this code, but I would be very
interested to receive any feedback on the code, suggestions for improvement,
or any modified versions created by others.


Nicolas Lynch-Aird





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/x-zip-compressed
Size: 32333 bytes
Desc: not available
URL: <>

More information about the EntropyKey-users mailing list