module arch.system.state.resource_machine.primitive_interfaces.fixed_size_type.hash;
Hash¶
Hash type is defined as a fixed size type that is binding, meaning that if the input value of type Arg
changed, the output value would change as well.
In the context of hashes, we say a
is an opening of a hash h: Hash
if h = hash(a)
.
Todo
- for shielded: cryptographic hash, hiding
- do we want a separate interface for the logic hash, given it is a verifier key? UPD in Taiga we had the verifier key hashed. Is it fixed size? If not, what was the reason for tripple hashing? vk + hash + function privacy commitment
LogicHash¶
In the case of resource logic, the hash used to compute it should output the logic's verifying key and therefore is determined by the proving system used to compute resource logic proofs.
Hash interface diagram¶
classDiagram
class Hash~T, Arg~ {
<<Interface>>
}
Hash <|-- LogicHash
Hash <|-- LabelHash
Hash <|-- ValueHash
Hash <|-- Commitment
Hash <|-- Nullifier
Hash <|-- Kind
Hash <|-- DeltaHash
Hash <|-- LogicRefHash
Hash <|-- MerkleTreeNodeHash
Hash <|-- AppDataValueHash
Used in¶
-
Resource components:
logicRef
labelRef
valueRef
-
Resource computable components:
commitment
nullifier
kind
delta
-
Computing Merkle tree nodes and roots