Research Article
ROS-Ethereum: A Convenient Tool to Bridge ROS and Blockchain (Ethereum)
Algorithm 5
The pseudocode of the SM2 decrypt algorithm.
(i) | Input: the bit string type ciphertext , the private key | (ii) | Output: the bit string type message | (iii) | Initialization: extract byte strings , , and from | (iv) | Begin | (v) | | (vi) | | (vii) | If equals | (viii) | throw error and exit | (ix) | | (x) | | (xi) | If equals | (xii) | throw error and exit | (xiii) | | (xiv) | | (xv) | If not equals | | throw error and exit | | | | End |
|