Research Article
Time-Enabled and Verifiable Secure Search for Blockchain-Empowered Electronic Health Record Sharing in IoT
Algorithm 3
Search smart contract construction algorithm.
(1) | function PUT) payable public returns() | (2) | if keyword and state do not exist then | (3) | store states ciphertext | (4) | else | (5) | return | (6) | end if | (7) | end function | (8) | function SEARCH() | (9) | if keyword authorization time is larger than keyword generation time then | (10) | execute the process of search in Phase 5 of the protocol | (11) | return matching file index | (12) | else | (13) | return | (14) | end if | (15) | end function |
|