Skip to content

badrootd/pow-tcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Design and implement “Word of Wisdom” tcp server

Requirements

  • TCP server should be protected from DDOS attacks with the Proof of Work (https://en.wikipedia.org/wiki/Proof_of_work), the challenge-response protocol should be used.
  • The choice of the POW algorithm should be explained.
  • After Proof Of Work verification, server should send one of the quotes from “word of wisdom” book or any other collection of the quotes.
  • Docker file should be provided both for the server and for the client that solves the POW challenge

How to

Run server:

make run_server

Run client:

make run_client SERVER_HOST=$(ipconfig getifaddr en0):8081

Why sha256?

  1. Its well known and widely used (in Bitcoin for example)
  2. Considered to be highly secure (not a signel collision found yet)
  3. Due its efficiency which can also be implemented in hardware

What can be improved in future?

  1. Add prometheus metrics to track how clients "struggle" to access service in terms of seconds dedicated to solve hash
  2. Dynamically adjust leading zeros difficulty in solving sha256 hash if connection count grows rapidly

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published