6.2 Influencing System Parameters
6.3.2 Memory Usage
In this section, we analyze the additional memory (RAM) needed on each device. We dis-tinguish between network setup, i.e. the memory needed for the initial key graph, and key establishment, i.e. the memory needed when two devices establish a new key.
6.3 ANALYSIS 137
Furthermore, we can distinguish the memory consumption used for storing local algorithm vari-ables like e.g. state and the memory consumption used for storing keys, i.e. the two key stores (see Section2.5). Since the memory usage for the local algorithm variables are highly imple-mentation dependent and also constant, we focus in our analysis on the memory consumption of the key stores, i.e. the amount of keys which need to be stored on a single device.
Network Setup
Due to our key graph construction algorithms (Algorithm 3.1, Algorithm 4.1 and5.1) each device needs z (with z = s + r) shared keys to connect to the initial key graph. Since each key is stored on two devices, we have an average of 2z keys per device, which is independent of the total network size n. Hence, we require only a constant amount of memory on each device, i.e.
the initial key graph requires on average O(1) memory space on each device.
Assuming a key length of lk bit, we calculate the average memory consumption in bytes on each device as follows:
memavg= 2zlk
8 = 2(s + r)lk
8 (6.8)
Clearly, the actual memory requirement may be higher for some devices. This largely depends on the structure of the key graph (see Section5.6for a discussion of different structures). The worst case with respect to memory consumption is a ”star” shaped key graph where each new device after the first s devices shares a key with the first s devices. Thus, the first s devices would need to store n − 1 keys and would require O(n) space. However, such graphs can be avoided at construction time by controlling the introduction of a new device. One way to do so is to limit the total number of keys stored in the key store by a parameter dmax≥ 2z, resulting in a k-degree key graph structure. In this case the maximum memory consumption can be calculated as:
memmax= dmax
lk
8 (6.9)
Finally, in the special case of a ”chain” key graph structure we have exactly dmax= 2z. Hence, the memory consumption on each individual node will not exceed memmax= 2zl8k bytes.
In conclusion we can say, that if we avoid some graph structures by controlling the introduction of new devices, our key graph algorithms use only a constant amount of memory on each device for the initial key graph, i.e. memory consumption is in O(1)-space.
Key Establishment
Our algorithms need additional memory on some devices when establishing a new key. With the basic and the fault-tolerant key establishment algorithm the two devices that establish a new key need only to store the new key shares, i.e. they need space for one additional key.
All intermediary nodes need to store and forward the key shares, hence they also need only space for one additional key share. However, these two algorithms need to discover the s device-disjoint paths using a path search algorithm (see Section3.5). Hence, the total memory consumption for a key establishment is heavily dependant on the used path search algorithm and its specific implementation. We measure the total memory usage for a key establishment using a max-flow algorithm in Section6.4.3.
For the extended key establishment algorithm each entry in the QuerySet of a device (one per query) consists of the RequestingSet and EstablishedSet, which, taken together, contain at most the direct neighbors of this device, i.e. on average 2z. Moreover, for each query, at most one temporary key will be established between a device and the target device. Thus, a query requires O(1) space on each intermediate device and at most O(n) on the target device.
The exact memory requirement on the target device depends on the key graph structure: Every device that receives a query tries to establish a new key to the target device. When it has done so, it sends a ”Cancel”-message notifying other devices that their temporary keys are no longer needed. Thus, at least s temporary keys need to be held on the target device in order to establish a new one, i.e. in total s + 1.
However, there is not only one device trying to establish a new key to the target, the amount of temporary keys on the target device depends on how many devices do simultaneously establish a key to the target device. The number of such devices is highly influenced by the key graph structure. If we have a ”chain” graph structure the number of additionally temporarily needed keys on the target device is exactly (s + 1), since there is always only one parallel temporarily key establishment. In contrast, when using a k-degree key graph structure the memory re-quirements on the target device is k(s + 1) with k being constant. This is because every parallel running temporary key establishment needs s + 1 additional keys. In our emulation we examine the maximum temporary memory required on the target device experimentally.
In conclusion, the memory needed on each device for the basic and the fault tolerant approach depends on the path search algorithm. For the extended key establishment algorithm the mem-ory needed is independent of the total network size n, hence each device needs only a constant amount of memory.
6.3 ANALYSIS 139