NotesHash

Hash

In the context of Condensation, a hash is a 32-byte (256-bit) value denoting the SHA-256 hash of some byte sequence.

In binary context, e.g. in the hash list of an object, hashes are written as 32 bytes. In textual context, hashes are written as 64 consecutive hex digits, in the order of the bytes:

bf691049538cf525a2a515b5b2aa5195aaaacb8a7b0d0c6176c7ab4556a7fbb7

Hashes are used in different contexts, and for different purposes.

Object hash

Hashes are used as object identifiers. Objects are referred to by their hash when retrieving them from a store, or to build trees.

An object's hash is also used to verify its integrity.

On a HTTP store, an object may be referred to as follows:

http://condensation.io/objects/bf691049538cf525a2a515b5b2aa5195aaaacb8a7b0d0c6176c7ab4556a7fbb7

Tree hash

The hash of an object uniquely identifies the tree it spans. Hence, a tree hash is simply the hash of its root object.

Actor hash

Hashes are also used to identify actors. By definition, the hash of an actor is the hash of its public key object. This protects against identity spoofing.

An actor hash also identifies its actor group.

Account hash

When an actor accesses a store, it uses its actor hash as account hash. This allows the store to authenticate the actor by retrieving its public key, and verifying its signature.

On a HTTP store, an account may be referred to as follows:

http://condensation.io/accounts/bf691049538cf525a2a515b5b2aa5195aaaacb8a7b0d0c6176c7ab4556a7fbb7

and its boxes are:

http://condensation.io/accounts/bf691049538cf525a2a515b5b2aa5195aaaacb8a7b0d0c6176c7ab4556a7fbb7/in-queue
http://condensation.io/accounts/bf691049538cf525a2a515b5b2aa5195aaaacb8a7b0d0c6176c7ab4556a7fbb7/private
http://condensation.io/accounts/bf691049538cf525a2a515b5b2aa5195aaaacb8a7b0d0c6176c7ab4556a7fbb7/public