# Proxy Signature-Based Management Model of Sharing Energy Storage in Blockchain Environment
## 5 Case Study
### Digital Signature Process  
A digital signature process on an SES market blockchain based on the proposed proxy signature mechanism is shown in Figure 5. In the process, there are three types of nodes: delegation nodes (i.e., owners of energy storage resources), proxy nodes (i.e., SESOs) and verification nodes (i.e., other nodes on the blockchain, including demanders, other suppliers, power grid and so on). A delegation node as an original signer delegates its digital signature power to a proxy node--i.e., a proxy signer. The proxy node signs a bidding message of SES, and sends the message and its proxy signature to verification nodes. The verification nodes verify the proxy signature, and accept the message if the proxy signature is valid. Figure 5: The digital signature process on an SES market blockchain based on the proposed proxy signature mechanism. It can be seen from Figure 5 that a safe prime \(p\) of 40 bits is selected, and the encryption bits are determined. A generator \(g\) is selected according to the characteristics of the safe prime and the method described above. Then a private key \(x\) generates randomly, and then the public key \(y\) can be obtained based on the private key. For each node on the blockchain, the group \((y,p,g)\) can be queried publicly. In this case, there are two delegation processes between the delegation node and proxy node. In the first process, a random number \(k\) with a value of \"1 ff2921 bfb\" is generated, and then the proxy key (\(K\), \(\delta\)) is computed and sent to the proxy node. After receiving the proxy key, the proxy node queries the public key of the delegation node, and checks the received key through Equation (6). However, the check fails due to the unequal values of the equation, and therefore a message about this is answered by the delegation node. Presently, another random number \(k\) with a value of \"515 da08b16\" is generated. Similarly, the proxy key is sent and checked successively. The new proxy key passes the check in the second process. Therefore, the proxy node accepts the delegation from the delegation node successfully. From the above analysis, it can be found that the delegation process of the proposed proxy signature mechanism has a certain probability of failure because of the value of \(k\). However, it only has a modest impact on the whole process because the time of delegation process is negligible compared to the total agent time. The proxy node will participate in the SES market and exercise the rights on behalf of the delegation node after accepting the delegation. In this case, the proxy node wants to sell the idle energy storage resources from 3:00 to 3:30 p.m. according to the scheduling of the delegation node. Therefore, a bidding message, whose contents are \"Capacity: 80 kWh; Price: 0.7 yuan/kWh; Time: 3:00 p.m.-3:30 p.m.\", will be signed and sent to other nodes. It is worth mentioning that the bidding price in the message is determined based on the experience and information of the proxy node--i.e., SESO. For the signing process, firstly, the hash of the message is obtained by a specified hash function (SHA-256 is used in this paper). Moreover, the proxy signature is generated based on a new random number, system parameters and the proxy key. Then, the message and its proxy signature are sent to other nodes including the delegation node. The message is accepted only when the proxy signature is verified by the verification nodes successfully. In Figure 5, the verification nodes verify the proxy signature according to the received signature and the message from the proxy node, as well as the public information from the delegation node. The verification result shows that the message is signed by the proxy node on behalf of the delegation node and is not modified after signing. The bidding information from the accepted message will be matched in the next stage of the transaction process of SES.