Research Article
Blockchain-Based Secure Outsourcing of Polynomial Multiplication and Its Application in Fully Homomorphic Encryption
| (1) | function TASK UPLOAD (user, tasks, data, price) | | (2) | if the balance of addr[user] ≥ |tasks| price then | | (3) | put tasks into Task; put data into Data | | (4) | else | | (5) | Rep[user]⟵Rep[user] − ∆c | | (6) | end if | | (7) | end function | | (8) | function TASK ALLOCATION (nodes, task) | | (9) | if task ≠ ALLOCATED then | | (10) | sort the nodes with their credit descending; send task and Data[task] to nodes [0] | | (11) | put task into ALLOCATED; Time[task]⟵current time + ∆t | | (12) | end if | | (13) | end function | | (14) | function RESULT UPLOAD (node, task, result) | | (15) | if current time < Time[task] then | | (16) | put node into Honest; Put result into result | | (17) | else | | (18) | put node into Dinhonest | | (19) | end if | | (20) | end function | | (21) | function RESULT UPLOAD(node, task, result) | | (22) | if Dishonest = 0 and |Result| = |Task| then | | (23) | send Result to user; Wait for the feedback from user | | (24) | end if | | (25) | call verification and payment | | (26) | end function |
|