A method of encrypting metadata that can be represented by a tree
structure. The method involves generating an encryption key for a
predetermined node of the metadata using a function that takes as input
parameters an encryption key for an upper node of the predetermined node
and information specifying the predetermined node, and encrypting data of
the predetermined node using the generated encryption key.