v1.0.0
·
31 commits
to master
since this release
The major version.
Features
- use of patterns:
- implementation based on Clean Architecture principles with separate use case layers for server and client;
- input parsing and validation handled internally in the use cases (inputs are passed as raw DTOs);
- relies on the library
github.com/thewizardplusplus/go-powfor PoW algorithm implementation;
- use cases:
- server-side:
SignChallenge(): generate a message authentication code (MAC) signature for a challenge:- MAC signature generation uses a secret key and configurable hashing algorithm;
GenerateChallenge(): generate a challenge with specified parameters:- number of leading zero bits (hash difficulty);
- current timestamp rounded to a configurable precision;
- time to live (TTL);
- target resource URI;
- payload consisting of static and random parts;
- hashing algorithm;
GenerateSignedChallenge(): generate a challenge and sign it;VerifySolution(): verify the correctness of a PoW solution;VerifySolutionAndChallengeSignature(): verify both PoW solution and challenge MAC signature;
- client-side:
SolveChallenge(): solve a challenge using the PoW algorithm;
- server-side:
- providers:
- extensible provider interfaces for:
- hash difficulty;
- target resource URI;
- static payload part;
- built-in provider implementations:
- extensible provider interfaces for: