Research Article

Tree-Based Public Key Encryption with Conjunctive Keyword Search

Algorithm 6

The algorithm for encrypting each node in the index tree, declared by encryptNode (, ).
Input: a tree node and the public key .
Output: an encrypted node .
(1)if is then
(2)return
(3)end if
(4)if is a leaf node then
(5) calls to generate , and replaces with ;
(6)else This means is an internal node.
(7) calls to generate , and replaces with ;
(8) calls encryptNode (, );
(9) calls encryptNode (, );
(10)end if
(11)return