Proof Of Work Specification

Abstract

A Spam and Denial of Service countermeasure. Reduce the capability of each single client to flood the server with messages.

It is not planned to be implemented for the BETA.

Scheme

  • Run a Flood Control using stochastical techniques or if the server detects a suspicious connection.
  • Additionally the client could send a calculation based on parameters and date/time with each query.

Protocol

  • The smallest time unit could be 1 second
  • A certain time period could be 1 minute
  1. The client requests the number of leading zeros X of a proper request and the current IVserver
  2. The server responses X and IVserver if it was generated for this time period already, else it generates IVserver and stores it for a time period
  3. The client generates a random IVclient
  4. The client iterates the counter to find hash(IVserver || IVclient || time || hash(m) || counter) = "000..." with X leading zeros
  5. The client sends IVserver || IVclient || time || hash(m) || counter || hash(IVserver || IVclient || time || hash(m) || counter) || m
  6. The server verifies
    1. that the proof of work hash begins with X zeros
    2. that (time, IVserver, IVclient) is unique and thus not stored yet
    3. that requested time does not differ more than a time period from current time and IVserver matches the time period
    4. proof of work hash
    5. message hash
  7. On successful verification server accepts the message and stores (time, IVclient) for a time period, else server rejects the message

Parameters

  • X variable number of leading zeros to dynamically adapt the workload
  • IVserver is generated, stored and used for a time period to prevent precomputation of PoW hashes
  • IVclient to prevent reusing of drop messages during the smallest time unit; using a server generated unique IV could lead to an overflow (e.g., see SYN flood); storing a fix number of IVs could lead to an overflow (100 IVs: IV_1=IV_101, IV_2=IV_102, ... => client can resend messages during the smallest time unit)
  • time to prevent reusing of drop messages
  • hash(m) to bind a PoW hash to a certain message
  • counter to find a well formated hash

Remote Data

The server stores its state and information on previous drop messages:

    powConfig     = "{"
                    'timePeriod' : INT,
                    'leadingZeros' : INT,
                    "}"

    serverIVs     = "["
                    serverIV*
                    "]"

    serverIV      = "{"
                    'periodStartTime' : LONG, //time stamp 
                    'IV' : STR,
                    "}"

    clientIVs     = "["
                    clientIV*
                    "]"

    clientIV      = "{"
                    'transmissionTime' : LONG, //time stamp
                    'IV' : STR,
                    "}"