Skip to content

Commit

Permalink
rephrase mathspec
Browse files Browse the repository at this point in the history
  • Loading branch information
tromp committed Nov 17, 2020
1 parent 9044c9d commit 6894c71
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ Cuckatoo Cycle is a variation of Cuckoo Cycle that aims to simplify ASICs by red

Simplest known PoW
------------------
With a 42-line [complete specification](doc/spec), Cuckatoo Cycle is less than half the size of either
[SHA256](https://en.wikipedia.org/wiki/SHA-2#Pseudocode),
With a 42-line [complete specification in C](doc/spec) and a brief
[mathematical description](doc/mathspec), Cuckatoo Cycle is less than half the
size of either [SHA256](https://en.wikipedia.org/wiki/SHA-2#Pseudocode),
[Blake2b](https://en.wikipedia.org/wiki/BLAKE_%28hash_function%29#Blake2b_algorithm), or
[SHA3 (Keccak)](https://github.com/mjosaarinen/tiny_sha3/blob/master/sha3.c)
as used in Bitcoin, Equihash and ethash. Simplicity matters.
Expand Down
7 changes: 4 additions & 3 deletions doc/mathspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ and a modified Initialization phase that sets v_i to k_i for 0 <= i < 4.

Set N = 2^32
Define a bipartite graph [1] G_K=(V,E) with N edges on N + N nodes as follows:
For 0 <= i < N, E_i = (V_i_0, V_i_1) = (siphash24(K,2*i) % N, siphash24(K,2*i+1) % N)
for 0 <= i < N, E_i = (V_i_0, V_i_1) = (siphash24(K,2*i) % N, siphash24(K,2*i+1) % N)

Define the associated bipartite node-pairs graph G'_K=(V',E') with N edges on N/2 + N/2 node-pairs as follows:
For 0 <= i < N, E'_i = (V_i_0 >> 1, V_i_1 >> 1)
From G_K we obtain the graph G'_K by identifying nodes that differ only in the last bit:
for 0 <= i < N, E'_i = (V_i_0 >> 1, V_i_1 >> 1)

A Cuckatoo32 solution for key K is a 42-cycle [2] in G'_K that is a matching [3] in G_K.
In other words, it's a cycle on node-pairs with edges incident on both nodes in a pair.

For verification purposes, the solution is given as the sequence of 42 edge indices in increasing order.

Expand Down

0 comments on commit 6894c71

Please sign in to comment.