## 5 Case Study: Smart Energy Use Case
### Integration of the Homomorphic Encryption Micro-Service  
As briefly discussed in Section 1.2, homomorphic encryption is particularly useful, when data are supposed to be processed by a third party, which cannot fully be trusted. One example could be a  
Figure 7: Smart energy use case: Omnet++ model of parking deck at Level 2.  
value-added service by someone else. If a user is expecting some particular benefits or is even forced into using it, keeping his sensitive data private is a major concern. Missing trust can potentially even be a showstopper for the whole Internet of Things.  
Homomorphic encryption can help us with the above mentioned privacy concerns. However, this privacy comes at the price of increased computational effort for encryption, decryption and also functions evaluated on cipher texts are more costly in terms of computational demand. Currently, the VICINITY project (see Section 1.1) is investigating the use of homomorphic encryption for these scenarios. To evaluate its practical feasibility, the computational overhead introduced by the use of homomorphic encryption needs to be analyzed. As there are numerous potential encryption schemes that offer homomorphic properties, it is also important to evaluate them. In particular, we want to compare partially and fully homomorphic encryption to evaluate the overhead introduced by the latter and also compare both to the same scenario executed without any encryption and hence without ensuring privacy at the VAS. To this end, we simulated one of VICINITYs use cases with partially (additive) homomorphic, fully homomorphic and without encryption as to calculate the overhead this introduces under Lab conditions. Our lab setup utilizes hardware-in-the-loop simulations of the VICINITY infrastructure and can be adjusted way quicker and cheaper than an actual re-deployment on site. Figures 8 and 9 visualize the two simulated use cases.  
As shown in Figure 8, energy consumption data of the simulated cars are gathered and transmitted to the operators' value-added service. The operator is only interested in the overall energy consumption of its whole fleet and so it calculates the sum over all inputs first. As the energy consumption allows to draw some conclusion about the owners behavior, we consider these data as private data and also wish to keep this data private and not share it with any third-party.  
Figure 8: Use case integrated into the VICINITY network. Private data are available to value-added service in clear text.  
Figure 9: Homomorphic encryption micro-service applied to use case.  
As neither the operator nor the users themselves have any particular interest in sharing their individual, private data, we introduce the homomorphic encryption micro-service. It is integrated into the VICINITY dataflow as shown in Figure 9 and can be compared to the setup in Figure 8: Input data (e.g., the Energy Consumption of each car) are encrypted using a homomorphic encryption scheme. In the case of partially homomorphic encryption, we used a simple Paillier encryption (see [34]), which allows addition of cipher texts. To calculate the overall energy consumption of the whole fleet, this is sufficient. As this concept will be applied to other use cases as well, addition might not suffice in all cases. Hence, we further simulated this scenario using the Brakerski-Gentry-Vaikuntanathan (BGV) scheme (see [38]), which is a fully homomorphic encryption scheme. In both cases, the encrypted payload is then transmitted through the VICINITY peer-to-peer network and to the operators value-added service again. The homomorphic encryption micro-service performs the addition on the encrypted inputs, followed by a decentralized decryption on the aggregated data. This way, only the anonymized, aggregated data are visible and handed over to the value-added service in the first place. All measurements are compared to the use case shown in Figure 8, which serves as a baseline.