The tresor_init component creates a fresh Tresor container on a back-end
block-device according to the configured parameters. On success, the component
exits with exit value 0, otherwise with exit value -1.


Configuration
~~~~~~~~~~~~~

This is an example configuration of the component:

! <config>
!   <virtual-block-device max_lvl="2" degree="64" num_leaves="512" />
!   <free-tree max_lvl="2" degree="64" num_leaves="2048" />
! </config>

This is a short description of the tags and attributes:

:config.virtual-block-device.degree:
  Contains the configuration for the hash tree that forms the virtual block
  device of the Tresor container. The leaves of this tree hold the most
  recent state of the encrypted payload data stored in the container.
  Therefore, the dimensions of this tree define the storage capacity of the
  container.

:config.virtual-block-device.degree:
  The trees degree or number of children per inner tree node. The minimum value
  is 2 and the maxiumum value 64.

:config.virtual-block-device.max_lvl:
  Highest level index beneath the trees root. Level index 0 is the
  leaf level that consists of the encrypted payload-data blocks. A value of
  1 is the minimum and results in one inner tree level and a maximum of
  [degree^1] leaves. The maximum value is 5 resulting in a maximum of
  [degree^5] leaves.

:config.virtual-block-device.num_leaves:
  The number of leaves of the tree that are used. This value must
  be within the limit defined by [max_level] and [degree].
  Considering the above mentioned maxima and the fixed leaf-size of 4Kbyte,
  the upper limit for the storage capacity of the container is 4Tbyte .

:config.free-tree:
  Contains the configuration for the hash tree that forms the journaling buffer
  of the Tresor container. This buffer is used for implementing the
  Copy-On-Write semantics of the container and keeping snapshots of older
  states of the stored data. The buffers capacity is determined by the
  number of leaves of this tree and affects how many snapshots can be kept at
  a time.

:config.free-tree.degree:
  The trees degree or number of children per inner tree node. The minimum value
  is 2 and the maxiumum value 64.

:config.free-tree.max_lvl:
  Highest level index beneath the trees root. Level index 0 is the
  leaf level that consists of the buffered blocks. A value of
  1 is the minimum and results in one inner tree level and a maximum of
  [degree^1] leaves. The maximum value is 5 resulting in a maximum of
  [degree^5] leaves.

:config.free-tree.num_leaves:
  The number of leaves of the tree that are used. This value must
  be within the limit defined by [max_level] and [degree].
  Considering the above mentioned maxima and the fixed leaf-size of 4Kbyte,
  the upper limit for the journaling buffer of the container is 4Tbyte .


Sessions
~~~~~~~~

This is an overview of the sessions required and provided by the
component apart from the environment sessions:

* Requires one Block session.


Examples
~~~~~~~~

An example of how to use the tresor_init component can be found in the test
script 'gems/run/tresor_utils.run'.
