home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / doc / ekeyd / README.egd-protocol < prev    next >
Encoding:
Text File  |  2011-08-10  |  1.9 KB  |  51 lines

  1. Entropy Key - EGD Protocol
  2. ==========================
  3.  
  4. The EGD (Entropy Gathering Daemon) program defined a simple byte-based
  5. protocol for retrieving entropy from a daemon.  The protocol is run
  6. over stream sockets, either UNIX domain sockets, or TCP sockets.  The
  7. Entropy Key software can provide sockets which act in the same way in
  8. order to allow software compatible with EGD to retrieve high quality
  9. entropy from the Entropy Keys.
  10.  
  11. The protocol is a byte-based command/response protocol which is always
  12. initiated by the client.  Where values longer than one byte are used,
  13. they are in network-byte-order.  i.e. U32 is an unsigned four byte
  14. number, big-endian.
  15.  
  16. Command: 0x00  -  Read entropy pool size
  17.   Arguments: None
  18.   Response:  U32 (Available entropy in bits)
  19.  
  20. Command: 0x01  -  Retrieve entropy (non-blocking)
  21.   Arguments: U8 (Number of bytes of entropy desired)
  22.   Response: U8 (Number of bytes of entropy returned)
  23.             STR (The bytes of entropy)
  24.  
  25. Command: 0x02  -  Retrieve entropy (blocking)
  26.   Arguments: U8 (Number of bytes of entropy desired)
  27.   Reponse: STR (The bytes of entropy)
  28.  
  29.   This command will block until sufficient entropy is available to
  30.   satisfy the request.  The entropy will be streamed to the client as
  31.   and when it becomes available.  The ekeyd will make some attempt to
  32.   spread the available entropy around between clients which are
  33.   blocked, however a blocking client can starve a non-blocking client
  34.   of entropy.
  35.  
  36. Command: 0x03  -  Add entropy to pool
  37.   Arguments: U16 (Number of shannons of entropy)
  38.              U8  (Number of bytes containing that)
  39.              STR (The bytes of entropy)
  40.   Response: None
  41.  
  42.   This command is parsed by ekeyd but ignored.
  43.  
  44. Command: 0x04  -  Get PID of EGD
  45.   Arguments: None
  46.   Response:  U8  (Number of bytes in PID string)
  47.              STR (PID string)
  48.  
  49.   This command is parsed by ekeyd but will always
  50.   return PID -1.
  51.