rchain / rchain-api

Obsoleted in favor of https://github.com/rchain-community/rchain-api. Use at your own risk.
Other
8 stars 4 forks source link

Construct unforgeable names offchain #21

Closed JoshOrndorff closed 5 years ago

JoshOrndorff commented 5 years ago

Some historical context: https://github.com/JoshOrndorff/RChain-API/issues/5

A description from Kyle:

The important part is being able to manipulate the parameters in non-standard ways.
Blake2b512Random manages a hash-state, and a block.
The 1024-bit 128-byte block is split into 2 portions: 112 bytes of path information, and 16-bytes of counter.
Yes 16-bytes of counter is overkill.
When you generate k names we get the final hash for the block with the counter set to a different value ceil(k/2) times, because names are 256 bits and the output is 512 bits.
We use the path portion of the block to split the generator when you have more than one thing in parallel in a body.
If you generate names at the top level, the path is just 112 bytes of 0's
JoshOrndorff commented 5 years ago

Schematic of blake2b: https://www.youtube.com/watch?v=bc-lu8uyivk

dckc commented 5 years ago

repeating my Sep 19 notes:

I watched that RCon3 talk. It was thin on examples of actually computing an unforgeable name.

Best I can tell, we'd have to port the 2 Blake512b classes from https://github.com/rchain/rchain/tree/dev/crypto/src/main/scala/coop/rchain/crypto/hash and then figure out how to use them when constructing Par objects.

dckc commented 5 years ago

maybe phrase this as " do registry lookups without transactions"