DERO Homomorphic Encryption Blockchain Protocol
Transaction Details
Each transaction consists of 2 parts:
- Statement: Contains ring members keys, commitments, encrypted balances (this grows linear), basically 4 curve points per ring member.
- Proof: Grows logarithmically in ring members. For example:
- 8 ring size proof is only 1997 bytes
- 512 ring size proof is only 3965 bytes
Ring Size, Tx Size Data
Ring Size | Tx Size | Statement Bytes | Proof Bytes |
---|---|---|---|
2 | 1669 | 328 | 1341 |
4 | 2261 | 592 | 1669 |
8 | 3117 | 1120 | 1997 |
16 | 4501 | 2176 | 2325 |
32 | 6941 | 4288 | 2653 |
64 | 11493 | 8512 | 2981 |
128 | 20269 | 16960 | 3309 |
256 | 37493 | 33856 | 3637 |
512 | 71613 | 67648 | 3965 |
Build
The build process involves switching to the directory containing the readme file, setting the GOPATH, and running the code using Go (version 1.12.7). The output sample illustrates the creation and successful execution of transactions, showcasing the transfer of funds between sender and receiver accounts, along with the changes in account balances.
- Switch to directory containing this Readme.md file
-
export GOPATH=pwd go run *.go
Note: Developed and tested on Linux, go version 1.12.7
Output Sample
Creating Transaction
I0706 16:05:28.258801 93136 main.go:101] Transferring 10 from sender to receiver (ring size 8) tx size 3117 bytes
I0706 16:05:28.258810 93136 main.go:102] Total tx size 3117 bytes (1120 byte statement, 1997 bytes proof)
I0706 16:05:28.341387 93136 main.go:107] Transfer successful
I0706 16:05:28.343528 93136 main.go:116] Sender Balance 150 - 10 = 140
I0706 16:05:28.343533 93136 main.go:117] Receiver Balance 0 + 10 = 10
Creating Transaction
I0706 16:05:28.568605 93136 main.go:101] Transferring 90 from sender to receiver (ring size 16) tx size 4501 bytes
I0706 16:05:28.568614 93136 main.go:102] Total tx size 4501 bytes (2176 byte statement, 2325 bytes proof)
I0706 16:05:28.680647 93136 main.go:107] Transfer successful
I0706 16:05:28.682788 93136 main.go:116] Sender Balance 140 - 90 = 50
I0706 16:05:28.682792 93136 main.go:117] Receiver Balance 10 + 90 = 100
More about Derohe here: Explaining Derohe