Transcription

1 Computer Networks 55 (2) Contents lists available at ScienceDirect Computer Networks journal homepage: In-packet Bloom filters: Design and networking applications Christian Esteve Rothenberg a,, Carlos Alberto Braz Macapuna a, Maurício Ferreira Magalhães a, Fábio Luciano Verdi b, Alexander Wiesmaier c a University of Campinas (Unicamp), School of Electrical and Computer Engineering, Brazil b Federal University of São Carlos (UFSCar), Campus Sorocaba, Brazil c Technische Universität Darmstadt/CASED, Germany article info abstract Article history: Received 9 January 2 Received in revised form October 2 Accepted 3 December 2 Available online 9 December 2 Responsible Editor: K. Kant Keywords: Bloom filter Algorithms Distributed systems Packet forwarding Inter-networking The Bloom filter (BF) is a well-known randomized data structure that answers set membership queries with some probability of false positives. In an attempt to solve many of the limitations of current network architectures, some recent proposals rely on including small BFs in packet headers for routing, security, accountability or other purposes that move application states into the packets themselves. In this paper, we consider the design of such in-packet Bloom filters (ibf). Our main contributions are exploring the design space and the evaluation of a series of extensions () to increase the practicality and performance of ibfs, (2) to enable false-negative-free element deletion, and (3) to provide security enhancements. In addition to the theoretical estimates, extensive simulations of the multiple design parameters and implementation alternatives validate the usefulness of the extensions, providing for enhanced and novel ibf networking applications. Ó 2 Elsevier B.V. All rights reserved.. Introduction Since the seminal survey work by Broder and Mitzenmacher [], the Bloom filter (BF) [2] has increasingly become a fundamental data aggregation component to address performance and scalability issues of very diverse network applications, including overlay networks [3], data-centric wireless networks [4], traffic monitoring, and so on. With the caveat of one-sided errors, the use of Bloom filters turns memory and computational expensive operations into simple, resource-friendly set membership problems (e.g. is x 2 S? ). In this work, we focus on the subset of distributed networking applications that use packet-header-size Bloom filters to share some state (i.e. information set S) among Corresponding author. addresses: (C.E. Rothenberg), (C.A.B. Macapuna), unicamp.br (M.F. Magalhães), (F.L. Verdi), cased.de (A. Wiesmaier). network nodes. The specific state carried in the Bloom filter varies from application to application, ranging from secure credentials [5,6] to IP prefixes [7] and link identifiers [8], with the shared requirement of a fixed-size packet header data structure to efficiently verify set memberships. The commonality of recent inter-networking proposals [5 ] is relying on Bloom filters to move application state to the packets themselves in order to alleviate system bottlenecks (e.g. IP multicast [7], source routing overhead [8]), enable new in-network applications (e.g. security [5,6,9]) or stateless protocol designs []. We refer to the BF used in this type of applications as an in-packet Bloom filter (ibf). In a way, an ibf follows a reverse approach compared to a traditional standalone BF implementation: ibfs can be issued, queried, and modified by multiple network entities at packet processing time. These specific needs benefit from additional capabilities like element removals or security enhancements. Moreover, careful design considerations are required to deal with the potential effects of false positives, as every packet header bit counts and the actual performance of the distributed system is a key goal /$ - see front matter Ó 2 Elsevier B.V. All rights reserved. doi:.6/j.comnet.2.2.5

2 C.E. Rothenberg et al. / Computer Networks 55 (2) In this paper, we address common limitations of naive ibf designs and provide a practical foundation for networking application designs requiring to solve set-membership problems on a packet basis (Section 3). Our main contribution consists of assembling and evaluating a series of practical extensions (i) to increase the system performance, (ii) to enable false-negative-free element deletion, and (iii) to provide security-enhanced constructs at wire speed (Section 4). Via extensive simulation work, we explore the rich design space and provide a thorough evaluation of the observed trade-offs (Section 5). Finally, we relate our contributions to previous work on Bloom filter designs and briefly discuss the applicability of the ibf extensions to existing applications (Section 6). 2. Networking applications ibfs are well suited for applications where one might like to include a list of elements in every packet, but a complete list requires too much space. In these situations, a hash-based lossy representation, like a BF, can dramatically reduce space, maintaining a fixed header size, at the cost of introducing false positives when answering setmembership queries. From its original higher layer applications such as dictionaries, BFs have spanned their application domain down to hardware implementations, becoming a daily aid in network applications (e.g., routing table lookups, DPI, etc.) and future information-oriented networking proposals [2]. As a motivation to our work and to get some practical examples of ibf usages, we first briefly survey a series of networking applications with the common theme of using small BFs carried in packets. 2.. Data path security The credential-based data path architecture [5] proposes the following network router security feature. During the connection establishment phase, routers authorize a new traffic flow request and issue a set of credentials (aka capabilities) compactly represented as bit positions of a BF. The flow initiator constructs the credentials by including all the router signatures into an ibf. Each router along the path checks on packet arrival for presence of its credentials, i.e., the k bits resulting from hashing the packet 5-tuple IP flow identifier and the routers (secret) identity. Hence, unauthorized traffic and flow security violations can be probabilistically avoided in a stateless, per hop fashion. Using 28 bits only, for typical Internet path lengths, the ibf-based authorization token reduces the probability that attack traffic reaches its destination to a fraction of a percent Wireless sensor networks A typical attack by compromised sensor nodes consists of injecting large quantities of bogus sensing reports, which, if undetected, are forwarded to the data collector(s). The statistical en-route filtering approach [6] proposes a detection method based on an ibf representation of the report generation (collection of keyed message authentications), that is verified probabilistically and dropped en-route in case of incorrectness. The ibf-based solution uses 64 bits only and is able to filter out 7% of the injected bogus reports within 5 hops, and up to 9% within hops along the paths to the data sink IP traceback The packet-marking IP traceback method proposed in [9] relies on ibfs to trace an attack back to its approximate source by analyzing a single packet. On packet arrival, routers insert their mark (IP mask) into the ibf, enabling a receiver to reconstruct probabilistically the packet path(s) by testing for ibf presence of neighboring router addresses Loop prevention In Icarus [], a small ibf is initialized with s and then filled as forwarding elements add their Bloomed interface mask (setting k bits to ). If the OR operation does not change the ibf, then the packet might be looping and should be dropped. If the Bloom filter changes, the packet is definitely not looping IP multicast Revisiting the case of IP multicast, the authors of [7] propose inserting an ibf above the IP header to represent domain-level paths of multicast packets. After discovering the dissemination tree of a specific multicast group, the source border router searches its inter-domain routing table to find the prefixes of the group members. It then builds an 8-bit shim header by inserting the path labels (AS a : AS b ) of the dissemination tree into the ibf. Routers receiving the ibf check for presence of next hop autonomous systems and forward the packet accordingly Source routing & multicast The LIPSIN [8] forwarding fabric leverages the idea of having interface identifiers in BF-form (m-bit Link ID with only k bits set to ). A routing ibf can be constructed by ORing the different Link IDs representing a source route. Forwarding nodes maintain a small Link ID table whose entries are checked for presence in the ibf to take the forwarding decision. In a typical WAN topology and using 256-bit ibfs, multicast trees with around 4 links can be constructed to reach up to 24 users while maintaining the false positive rate (3%) and the resulting forwarding efficiency within reasonable performance levels. 3. Basic design The basic notation of an ibf is equivalent to the standard BF, that is an array of length m, number of independent hash functions k, and inserted elements n. On insertion, the element is hashed to k hash values and the corresponding bit positions are set to (see example in Fig. ). On element check, if any of the bits determined by the hash outputs is, we can be sure that the element

3 366 C.E. Rothenberg et al. / Computer Networks 55 (2) Fig.. Overview of the Bloom filter probabilistic data structure. was not inserted (no false negative property). If all the k bits are set to, we have a probabilistic argument to believe that the element was actually inserted. The case of collisions to bits set by other elements causing a non-inserted element to return true is referred to as a false positive. In the example of Fig., a false positive for w would be returned if all three hashes would map to s. For the sake of generality, we refer simply to elements as the objects carried in the ibf. Depending on the application, elements may take different forms such as interface names, IP addresses, certificates, and so on. False positives manifest themselves with different harmful effects such as bandwidth waste, security risks, computational overhead, etc. Thus, a system design goal is keeping false positives to a minimum. 3.. False positive estimates The a priori false positive estimate, fpb, is the expected false positive probability for a given set of parameters (m, n, k) before actually adding the elements. Let p = ( /m) kn be the probability that a particular bit is set to. Then, fpb ¼ð ð =mþ kn Þ k : The number k that minimizes the false positive probability can be obtained by setting the partial derivative of fpb with respect to k to. This is attained when k = m/n ln 2, and is rounded to an integer to determine the optimal number of hash functions to be used []. While Eq. () has been extensively used and experimentally validated as a good approximation, for small values of m the actual false positive rate is larger. Recently, Bose et al. [3] have shown that fpb is actually only a lower bound, and a more accurate estimate can be obtained by formulating the problem as a balls-into-bins experiment: m kn p k;n;m ¼ m kðnþþ X m i¼ i k i! i i ðþ : ð2þ According to [3, Theorem 4], Eq. (2) can be lower- and upper-bounded as follows: p k < p k;n;m < p k þ O k r ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi!! ln m k ln p : ð3þ p m Hence, the difference between the observed false positive rate and the theoretical estimates can be significant for small size BFs, a fact that we (and others) have empirically observed (see evaluation in Section 5..2). Thus, small ibfs are prone to more false positives than larger ibfs for equivalent m/n ratios. Both Eqs. () and (2) do not involve knowing exactly how many bits are actually set to. A more accurate estimate can be given once we know the fill factor q; that is the observed fraction of bits that are actually set to after elements have been inserted. We can define the posterior false positive estimate, fpa, as the expected false positive probability after inserting the elements: fpa ¼ q k : ð4þ Finally, the observed false positive rate (fpr) can be obtained after testing for the presence of elements: fpr ¼ Observed false positives : ð5þ Tested elements Note that the fpr is an experimental quantity obtained via simulation or system measurements and not a theoretical estimate. Hence, the fpr is the key performance indicator we want to measure in a real system, where every observed false positive will cause some form of degradation. Therefore, practitioners are less interested in the asymptotic bounds of the hash-based data structure and more concerned with the actual false positive rates, especially in the case of space-constrained ibfs Naming and basic operations A nice property of hash-based data structures is that they do not depend on the form of the inserted elements. Independent of its size or representation, every element carried in the ibf contributes with at most k bits set to. In order to meet the line speed requirements of ibf operations, one design recommendation is to have the elements readily in a pre-computed BF-form (m-bit vector with k bits set to ), avoiding thereby any hashing at packet processing time. Element insertion becomes a simple, parallelizable bitwise OR operation. Analogously, an ibf element check can be performed very efficiently in parallel via fast bitwise AND and COMPARE operations. A BF-ready element name, also commonly referred to as element footprint, can be stored as an bit vector of size m or, for space efficiency, it can take a sparse representation including only the indexes of the k bit positions set to. In this case, each element entry requires only klog 2 m bits. 4. Extensions In this section, we describe three useful extensions to basic in-packet Bloom filter designs in order to address the following practical issues:

4 C.E. Rothenberg et al. / Computer Networks 55 (2) (i) Performance: Element Tags exploit the notion of power of choices in combining hashing-based element names to select the best ibf according to some criteria, for instance, less false positives. (ii) Deletion: Deletable regions introduce an additional header to code collision-free zones, enabling thereby safe (false-negative-free) element removals at an affordable packet header bit space. (iii) Security: Secure constructs use packet-specific information and distributed time-based secrets to provide protection from ibf replay attacks and bit pattern analysis, preventing attackers from misusing ibfs or trying to infer the identities of the inserted elements. 4.. Element tags The concept of element Tags (etags) is based on extending BF-compatible element naming with a set of equivalent footprint candidates. That is, instead of each element being identified with a single footprint, every element is associated with d alternative names, called etags, uniformly computed by applying some system-wide mapping function (e.g., k d hash functions). That allows us to construct ibfs that can be optimized in terms of the false positive rate and/or compliance with element-specific false positive avoidance strategies. Hence, for each element, there are d different etags, where d is a system parameter that can vary depending on the application. As we see later, a practical value of d is in the range of multiples of 2 between 2 and 64. We use the notion of power of choices [4] and take advantage of the random distribution of the bits set to to select the ibf representation among the d candidates that leads to a better performance given a certain optimization goal (e.g., lower fill factor, avoidance of specific false positives). This way, we follow a similar approach to the Best-of-N method applied in [5], with the main differences of () a distributed application scenario where the value d is carried in the packet header, and (2) the best candidate selection criterion is not limited to the least amount of bits set but may include other optimization criteria (e.g., Section 5.2 bit deletability), including those that involve counting false positives against a training set (e.g. Section 4..2 fpr-based selection). The caveats of this extension are, first, it requires more space to store element names, and second, the value d needs to be stored in the packet header as well, consuming bits that could be used for the ibf. However, knowing d at element query time is fundamental to avoid checking multiple element representations, which would traduce in potentially more false positives (cf. [4]). Upon packet arrival, the ibf and the corresponding etag entries can be ANDed in parallel Generation of etags To achieve a near uniform distribution of s in the ibf, k independent hash functions per etag are required. In general, k may be different for each etag, allowing to adapt better to different fill factors and reducing the false positives of more sensitive elements. Using the double hashing technique [6] to compute the bits set to in the d etags, only two independent hash functions are required without any increase of the asymptotic false positive probability. That is, we rely on the result of Kirsch and Mitzenmacher [6] on linear combination of hash functions, where two independent hash functions and can be used to simulate i random hash functions of the form: g i ðxþ ¼½h ðxþþi h 2 ðxþš modm: As long as h (x) and h 2 (x) are system wide parameters, sharing i = d k integers is only required to derive the etags for any set of elements. For space efficiency, another optimization for the sparse representation of the candidates consists of defining the d etags by combinations among k + x ibf positions, i.e., d ¼ k þ x k. ð6þ Candidate selection Having equivalent ibf candidates enables to define a selection criteria based on some design-specific objectives. To address performance by reducing false positives, we can select the candidate ibf that presents the best posterior false positive estimate (fpa-based selection; Eq. (4)). If a reference test set is available to count false positives, the ibf choice can be done based on the lowest observed rate (fprbased selection; Eq. (5)). Other types of selection policies can be specified to favor the candidate presenting less false positives for certain system-critical elements (fp-element avoidance selection) False positive improvement estimate Following the same analysis as in [5], the potential gain in terms of false positive reduction due to selecting the ibf candidate with fewer s can be obtained by estimating the least number of bits set after d independent random variable experiments (see Appendix A for the mathematical details). Fig. 2 shows the expected gains when using the fpa-based selection after generating d candidate ibf for a given element set. With a few dozen candidates, one can expect a factor 2 improvement in the observed fpr when selecting the candidate with fewer ones. Note that the four ibf configurations plotted in Fig. 2 have the same m/n ratio. In line with the theoretical predictions [3], smaller bit vectors are subject to slightly larger false positive probabilities. However, as shown in Fig. 2(b), the fpr improvement factor of smaller ibfs due to the d-etag extension is larger. Hence, especially for small ibfs, computing d candidates can highly improve the false positive behavior, a fact that we have validated experimentally in Section Deletable regions Under some circumstances, a desirable property of ibfs is to enable element deletion as the ibf packet is processed along network nodes. For instance, this is the case if some inserted elements are to be processed only once (e.g., a hop within a source route), or, if bit space is required to add more elements upfront. Unfortunately, due to its compression nature, bit collisions hamper naive element removals unless we allow introducing false negatives into the

5 368 C.E. Rothenberg et al. / Computer Networks 55 (2) false positive probability false positive improvement factor 8E-3 7E-3 6E-3 5E-3 4E-3 m=64, n=6 m=28, n=2 m=256, n=24 m=52, n= candidates (d) (a) A priori false positive estimate of the ibf candidate with the lowest fill factor m=64, n=6 m=28, n=2.2 m=256, n=24 m=52, n= candidates (d) (b) Potential false positive improvement when being able to choose among d ibfs. Fig. 2. False positive probability gains of the power of choices extension. system. To overcome this limitation (with high probability), so-called counting Bloom filters (CBF) [7] were proposed to expand each bit position to a cell of c bits. In a CBF, each bit vector cell acts as a counter, increased on element insertion and decreased on element removal. As long as there is no counter overflow, deletions are safe from false negatives. The main caveat is the c times larger space requirement, a prohibitive price for the tiny ibfs under consideration. The key idea of the deletable region extension is to keep track of where the collisions occur at element insertion time. By using the property that bits set to by just one element (collision-free bits) are safely deletable, the proposed extension consists of encoding the deletable regions as part of the ibf header. Then, an element can be effectively removed if at least one of its bits can be deleted. Encoding the deletable region information should consume a minimum of bits from the allocated ibf space. A straightforward coding scheme is to divide the ibf bit vector into r regions of m /r bits each, where m is the original m minus the extension header bits. As shown in Fig. 3, this extension uses r bits to code with a collision-free region and with a non-deletable region. The probability of element deletion, i.e., the chances of an element having at least one bit in a collision-free region, can be approximated to (see Appendix B for the mathematical details): p d ¼ð ð p c Þ m =r Þ k : ð7þ Fig. 4(a) plots p d against the number of regions r and confirms the intuition that increasing r results in a larger proportion of elements being deletable. As more elements are inserted into the ibf, the number of collisions increases and the deletion capabilities (i.e., bits in collision-free regions) are reduced (see Fig. 4(b)). As a consequence, the target element deletion probability p d and the number of regions r establish a practical limitation on the capacity n max of a deletable ibf. Fig. 4(b) plots p d against the filter density m/n for different memory to regions ratios m/r. As expected, increasing r results in a larger portion of deletable elements. As more elements are inserted (lower m/n and more collisions), the deletion capabilities are reduced. Hence, the parameter r can be chosen by defining a target element deletion probability p d and estimating the upper bound of the set cardinality n. For instance, allocating only 5 % of the available bits (m/r = 2) to code the collision bitmap, we can expect to remove around 9 % of the elements when the bits per element ratio m/n is around 6. From a performance perspective, enabling deletions comes at the cost of r bits from the ibf bit space. However, removing already processed elements decreases the fill factor and consequently reduces the probability of false positives upfront. Later in Section 5.2 we explore the trade-offs between the overhead of coding the deletable regions, the impact on the fpr, and the implications of the candidate selection criteria Secure constructs The hashing nature of ibfs provides some inherent security properties to obscure the identities of the inserted elements from an observer or attacker. However, there are Fig. 3. An example of the DlBF with m = 32, k = 3 and r = 4, representing the set x,y,z. The s in the first r bits indicate that a collision happen in the corresponding region and bits therein cannot be deleted. Since each element has at least one bit in a collision-free zone, all of them are deletable.

6 C.E. Rothenberg et al. / Computer Networks 55 (2) element deletability (%) 8 6 m/n = 8 4 m/n = 2 m/n = 6 2 m/n = 2 m/n = 24 m/n = 32 /32 /6 / /8 /6 /5 /4 the ratio of regions to memory (r/m) (a) Deletability as function of number of regions Binding to packet contents We strive to provide a lightweight, bit mixing function O = F(K,I) to make an element name K dependent on additional in-packet information I. For this extension, an element name K is an m-bit hash of the element and not the etag representation with only k bits set to. The function F must be fast enough to be done at packet processing time over the complete set of elements to be queried by a node processing the ibf. The output O is the k bit positions to be set/checked in the ibf. Using cryptographic hash functions (e.g., MD5, SHA) for F becomes unpractical if we want to avoid multiple (one per element) cycle-intense hashing per packet. element deletability probability m/r = 2 m/r = m/r = 4 m/r = bits per element (m/n) (b) Deletability as function of inserted elements. Fig. 4. Element deletability probability (m = 256). a series of cases where improved security means are desirable. For instance, an attacker is able to infer, with some probability, whether two packets contain an overlapping set of elements by simply inspecting the bits set to in the ibfs. In another case, an attacker may wait and collect a large sample of ibfs to infer some common patterns of the inserted elements. In any case, if the attacker has knowledge of the complete element space (and the etags generation scheme), she can certainly try a dictionary attack by testing for presence of every element and obtain a probabilistic answer to what elements are carried in a given ibf. A similar problem has been studied in [8] to secure standalone BFs representing a summary of documents by using keyed hash functions. Our solution follows the same approach i.e. obscuring the resulting bit patterns in the filter by using additional inputs to the hashes. However, our attention is focused to the specifics of distributed, line-speed ibf operations. The main idea to improve the security is to bind the ibf element insertion to () an invariant of the packet or flow (e.g., IP 5-tuple, packet payload, etc.), and (2) system-wide time-based secret keys. Basically, the inserted elements become packet- and time-specific. Hence, an ibf gets expirable and meaningful only if used with the specific packet (or authorized packet flow), avoiding the risk of an ibf replay attack, where the ibf is placed on a different packet. As an example resource-efficient implementation of F, we propose the lightweight Algorithm to mix each element K with a fixed bit string I. Taking I as an input, the algorithm runs in parallel on each element K and returns the k bit positions in the ibf to be set or checked. After an initial bitwise XOR operation (Step ), the output O is divided into k segments of m/k bits (Step 2). To build the folding matrix in Step 3, each segment is transformed into a matrix of clog 2 m bits. For instance, with m = 256 and k = 4, each segment O k would be a 64-bit bit vector transformed into a 8 8 matrix. Finally, each of the k output values is computed by XORing the rows of each matrix into a log 2 m bit value that returns the bit position to be set/checked (Step 4). The d-bit shifting enables the power of choices. We are faced with the classic trade-off between security and performance. An heuristic evaluation suggests that the proposed F provides a good balance between performance and security. First, F involves only bit shifting and XOR operations that can be done in a few clock cycles in parallel for every K. Second, the k bit positions depend on all the bits, within an m/k bit segment, from the inputs I and K. The security of F depends on how well I and K are mixed. For security sensitive applications, the XOR operation in Step should be replaced with a more secure transformation P(K, I) i.e., using lightweight hash functions or linespeed stream ciphers (see e.g. [9]). The final choice of F Note that depending on the values of m and k, some padding bits (e.g., from within segments) may be required to complete the matrix.

7 37 C.E. Rothenberg et al. / Computer Networks 55 (2) should take the application specifics into account (e.g., nature of K, computation of I per-packet) and the target security level Time-based keyed hashing A more elaborate security extension consists of using a keyed element name construction, and change the secret key S(t) regularly. We can define S(t) as the output of a pseudo random function S i = F(seed,t i ), where seed is the previous value and t a time-based input. Then, we can include the current S value in the algorithm for element check/insertion e.g., O = F(K, I, S(t)). Thereby, we obtain a periodically updated, shared secret between ibf issuers and ibf processing entities, with the benefit that an ibf cannot be re-utilized after a certain period of time or after an explicit re-keying request. Moreover, by accepting S i and S i the system requires only loose synchronization similar to commercial time-coupled token generators. At the cost of initial synchronization efforts and computational overhead, this method provides an effective means to make ibf applications secure (e.g., forwarding availability [2,2]) Density factor Finally, a basic security measure for ibfs, also proposed in [5], is to limit the percentage of s in the ibf to 5% 75%. A density factor q max can safely be set to k n max /m, as each legitimate element contributes with at most k bits. Then, the probability of an attacker guessing a bit combination that causes a single false positive can be upper bounded by q k max. false positive rate (%) false positive rate (%) Theor. k=5 no choices 4 choices 6 choices 32 choices 64 choices Theor. k=5 no choices 4 choices 6 choices 32 choices 64 choices (a) Best fill rate candidate (b) Best observed fpr Fig. 5. Power of choice gains (m = 256, k = 5). 5. Practical evaluation We now turn our attention to the practical behavior of the ibf in function of the multiple design parameters and carry out extensive simulation work to validate the usefulness of the three extensions under consideration. For these purposes, we use randomly generated bit strings as input elements and the double hashing technique using SHA and MD5. The section concludes exploring the potential impact of different types of ibf elements (flat labels, IP addresses, dictionary entries) and the hash function implementation choice. 5.. Element tags We are interested in evaluating the gains of the power of choices that underpins the element Tag extension (Section 4.), where any element set can be equivalently represented by d different ibfs, different in their bit distribution but equivalent with regard to the carried element identities. We first explore the case where k = 5 and then the impact of using a distribution around 5 for candidate naming. 2 2 We choose k = 5 to have a probabilistically sufficient footprint space for the etags (m!/(m k)! 2 with m = 256) when targeting an m/n of about 8 bits per element Power of choices (d) We run the simulations varying d from 2 to 64 and updating m accordingly to reflect the overhead of including the value d in the packet header. Fig. 5 compares the observed fpr for different values of d. In accordance with the theoretical predictions (Section 4..3), increasing d and choosing the candidate ibf just by observing its fill factor after construction (Fig. 5(a)) leads to better performing ibfs. In the region where the ibf is more filled (3 4 elements), the observed fpr drops between 3% and 5% when 6 or more candidate ibfs are available. Another interpretation is that for a maximal target fpr we can now insert more elements. As expected, the performance gain is more significant if we consider the best performing ibf after testing for false positives. Observing Fig. 5(b), the number of false positives is approximately halved when comparing the best ibf among 6 or more against a standard 256-bit ibf. We also note that the observed fpr is slightly larger than the commonly assumed theoretical estimate (Eq. ()), confirming thus the findings (Eq. (4)) by[3]. As shown in Table, this difference is more noticeable for smaller m, becoming negligible for m larger than Distribution of the number of hash functions (k) Now, we explore allowing a different number of bits k per candidate. For instance, with d = 8 the distribution of

8 C.E. Rothenberg et al. / Computer Networks 55 (2) Table Observed fpr for ibfs with 6 etag choices. m n Std. (%) fpa-opt. (%) fpr-opt. (%) Th. fpr k cte k dst k cte k dst k among the candidates could be {4,4,5,5,6,6,7,7}. Intuitively, this naming scheme adapts better to the final number of elements in the ibf (as k d closer to k opt = m/nln (2)). The fpa-based selection criterion (Section 4.) is now choosing the candidate with the lowest estimate minfq k ;...; q k d d g. Fig. 6(a) shows the distribution of the selected 256- bit ibfs for the case of d = 6 and k evenly distributed between 4 and 7. The line shows the percentage of times that the selected ibf actually yielded the best performance among the candidates. Disregarding the scenarios with fewer elements, the fpa-based selection strategy succeeded to choose the optimal candidate in about 3% of the times. selected ibf candidate (%) best performance (%) k=5 k=4 k=7 k=6 best ibf elements in ibf (#) (a) Best fill rate candidate k=4 k=5 k=6 k= elements in ibf (#) (b) Best observed fp r Fig. 6. Distribution of ibf candidates for different number of hash functions k. (d = 6, m = 256). Fig. 6(b) shows the percentile distribution of the best performing ibf after fpr testing. As expected, in more filled ibfs scenarios, setting less bits per element is beneficial. However, the differences are relatively small. As shown in Table, the observed fpr in the case of k const. = 5 is practically equivalent (if not slightly better) to the case where k is distributed. We can also observe what the theory in Section 2 predicts with regard to smaller ibfs: (i) inferior fpr performance for the same m/n ratio, and (ii) larger potential to benefit from the power of choices extension Discussion Based on our experimental evaluation, having more than 32 candidates per element is not compelling in terms of additional proportional fpr benefits beyond approximately a factor 2 depending on the specific parameters. The results are consistent with the theoretical estimates in Section However, if the system design choice is based on selection criteria optimized for the non occurrence of specific false positives (i.e. element-avoidance Section 4.), increasing the number of choices d allows complying to a larger set of false positive avoidance policies. The practical limitations would be how much space the application designer is willing to pay to store the candidate element representations in the nodes and code the index d in the packets Deletion We explore two important aspects of the deletable regions extension. First, from a qualitative point of view we examine the actual capabilities to successfully delete elements for different m/n ratios, number of regions r and choices d. Second, we evaluate the quantitative gains in terms of false positive reduction after element bits are deleted. Obviously, both aspects are related and intertwined with the ability to choose among candidate ibf representations to favor the deletion capabilities. Now, the application can choose the ibf candidate with the most number of bits set in collision free-zones, increasing thus the bit deletability. Alternatively, one may want to favor the element deletability, recalling that removing a single element bit is traduced into a practical deletion of the element. Using our basic coding scheme (Section 4.2), we consume one bit per region to code whether collision

9 372 C.E. Rothenberg et al. / Computer Networks 55 (2) happened and deletion is prohibited or not. Thus, the bits available for ibf construction are reduced to m = m log 2 d r. On each experiment round, we randomly select n elements from a pool of million unique bit strings, and insert them updating the r bitmap accordingly. We then try to remove every inserted element and measure the quality and quantity of the deletion capabilities Quality: how many elements can be removed in practice? Fig. 7(a) plots the average percentage of elements that could be deleted. As expected, partitioning the ibf into more regions results in a larger fraction of elements (and bits) being deletable. For instance, in the example of a 256-bit ibf with 32 regions (Fig. 7), when 24 elements are inserted, we are able to delete an average of more than 8% of the elements by safely removing around 5% of the bits (Fig. 7(b)). Playing with the candidate choices, we can enhance the bit (Fig. 8(a)) and element (Fig. 8(b)) deletability considerably. The actual deletability rates are lower than expected by theory (Fig. 4) but behave as predicted by the mathematical model of the element deletability probability (Eq. (7)). This divergence can be explained by the theoretical assumptions on random bit distributions deletable elements (%) deletable bits (%) Theor. R=6 R = R = R = R = R = 24 R = (a) Deletability - elements R = 8 R = 24 R = 28 R = (b) Deletability - bits (d=6) Fig. 7. Deletability as function of r (m = 256). deletable elements (%) deletable bits (%) Theor. 2 choices 4 choices 8 choices 6 choices 32 choices no choices 2 choices 4 choices (a) Deletability - elements 8 choices 6 choices 32 choices (b) Deletability -bits Fig. 8. Deletability as f(d). m = 256, r = 6. and the actual behaviour of hash functions, especially in small size bit vectors Quantity: what are the false positive rate gains due to bit deletability? On the one hand, we have the potential gains of removing bits from collision-free zones. On the other, the cost of () coding the deletable regions (r bits), and (2) having more filled ibfs due to the rarefication of colliding bits. While Fig. 9(a) shows the price of having to code more regions (fpr before deleting elements), Fig. 9(b) illustrates the potential gains of removing every deletable bit. If we average the fpr before and after elements are deleted, the ibf performance appears equivalent to the fpr of a standard non-deletable m-bit ibf. In comparison, a counting BF with 2 bits per cell 3 would behave like an ibf of size m/2, which would have its element capacity prohibitively constrained. Analyzing the impact of the power of choices, Fig. shows that choosing the best deletable ibf candidate causes the colliding bits to thin out (greater q), yielding a higher fpr before deletion (Fig. (a)) and a smaller fpr after elements are removed (Fig. (b)). 3 Using the power of choices, we could have with very high probability a candidate that does not exceed the counter value of 3, avoiding false negatives as long as no new additions are considered.

10 C.E. Rothenberg et al. / Computer Networks 55 (2) fpr before deletion (%) R = R = 4 R = 8 R = 24 R = 28 R = 32 fpr before deletion (%) no choices 2 choices 4 choices 8 choices 6 choices 32 choices (a) fpr - before deletion (a) fpr - before deletion fpr before deletion (%) R = R = 4 R = 8 R = 24 R = 28 R = 32 fpr after deletion (%) no choices 2 choices 4 choices 8 choices 6 choices 32 choices (b) fpr - after deletion Fig. 9. False positives in function of r (m = 256, d = 6) (b) fpr - after deletion Fig.. False positives as f(d). (m = 256, r = 6) Discussion There is a tussle between having a smaller fill factor q, with more collisions at construction time reducing the fpa, and the deletability extension that benefits from fewer collisions. Deletability may be a key property for some system designs, for instance, whenever an element in the ibf should be processed only once and then be removed, or when space is needed to add new elements on the fly. One key property is that just by inspecting the bitmap r, any node can safely (without introducing false negatives) remove an element from the ibf. A more detailed evaluation should consider the specific application dynamics into consideration, i.e., the nature and frequency of deletions/ insertions at runtime. From a fpr performance perspective, the cost of coding the deletable regions is only a slight increase in the fpr due to r being only a small fraction of m. However, reducing m seems to hinder the average fpr gains due to bit deletions upfront. Nonetheless, especially for space-restricted ibfs, the proposed extension is a far more attractive approach to enable (probabilistic) deletions than alternative solutions based on counting BFs. An open question is whether there is a better coding scheme for the deletable regions, for instance, using error correcting codes. Finally, the power of choices again proved to be a very handy technique to deal with the probabilistic nature of hash-based data structures, enabling candidate selection for different criteria like better fpr or certain element/bit deletability Security Besides fast computation, the main requirements for the security extension are that (i) the random distribution of the ibf bits is conserved, and (ii) given a collection of packets I and the securely constructed ibfs, one cannot easily reveal information about the inserted elements (K). More generally, given a set of (I,iBF) pairs, it must be at best very expensive to retrieve information about the identities of K. We first measured the randomness of the secure ibf construction outputs from Algorithm by fixing a set of 2 elements and changing the per-packet 256-bit randomly generated I value on each experiment run. Table 2 gathers the average results of experiments with runs per experiment. The observed distribution of outputs within an experiment, measured as the Hamming distance between output bit vectors (BV), was very close to the mean value of m/2 bits (28) with a small standard deviation. 4 The observed average number of bits set and their distribution were comparable to standard ibf constructs. Additionally, we analyzed whether the 2 most frequent bit positions set in secure ibfs corresponded to bits set in 4 In future work we will extend these results and the hashing techniques evaluation of Section 5.4 with standard randomness tests such as those included in the Diehard suite (http://www.stat.fsu.edu/pub/diehard).

11 374 C.E. Rothenberg et al. / Computer Networks 55 (2) Table 2 Evaluation of the secure ibf algorithm (m = 256, k = 4, n = 2). Avg. (Stdev) after runs. Sec. ibf Plain ibf Random BV Hamming dist (8.6) (8.3) # Bits set (3.2) ( ) (7.97) Correlation.37 plain ibfs. We defined the correlation factor as the fraction of matches and obtained a value of,37, which is close to the probability of randomly guessing bits in a 256-bit ibf with k = 4 and n = 2 elements (Pr 96/256,37). The results indicate that, assuming a random packet identifier I, first, no actual patterns can be inferred from the securely inserted elements, and second, the random bit distribution of an ibf is conserved when using the proposed algorithm. However, we recognize the limitations of Algorithm. For instance, if provable protection against more elaborated attacks is required, then, a more secure and computationally expensive bit mixing procedure (Step in Algorithm ) should be considered, in addition to a time-based shared secret as suggested in Section Hashing technique Finally, we investigate the impacts of the hash function implementation choice and the nature of the input elements in small size ibfs. There are two factors that determine the quality of the bit distribution and consequently may impact the observed fpr: () the input bit string, and (2) the implementation of the hash function Input data sets Instead of considering elements as simple random bit strings, we now explore three types of elements that cover typical inputs of ibf applications: 32-bit IP addresses: Nearly 9M IP addresses were generated by expanding the subnet values of IP prefixes advertised in the CAIDA database. 5 In addition, private IP addresses (.../6, /6) were also used in the experiments. 256-bit random labels: A set of 3M random labels was generated constructing each 256-bit label by picking randomly 64 hex characters and checking for uniqueness. Variable-bit dictionary words: A set formed by entries of the American dictionary Hash function choice We chose 3 commonly used cryptographic hash functions (MD5, SHA and SHA256) and 2 general purpose hash functions (CRC32 and BOB). 7 5 ftp.ripe.net/ripe/stats/delegated-ripencc /usr/share/dict/american-english. 7 Related work has investigated the properties of 25 popular hash functions, pointing to BOB as a fast alternative that yields excellent randomized outputs for network applications [22]. Although MD5 and SHA are considered broken due to the recent discovery of collisions, they are perfectly valid for our randomness purposes. Table 3 Observed fpr in 256-bit ibf using double hashing with SHA & MD5 and with 8-bit segments of CRC32. Avg. (StdDev); tests. n DoubleHash IP Random Dict. 6 SHA& MD5.34 (.35).338 (.32).328 (.34) CRC32 segm..345 (.37).349 (.34).338 (.34) 32 SHA& MD (.436) (.449) 2.59 (.385) CRC32 segm (.48) (.43) 2.57 (.444) The observed fpr (Table 3) imply that, on average, the input type does not affect the ibf performance. Fig. plots the observed normalized sample variance for different bit vector sizes (m). For lower m values the variances show a larger difference and start converging for m > 52. CRC presents the best output distribution when dealing with IP addresses as inputs. This may be explained by the 32- bit match of inputs and outputs. In general, the functions exhibit similar behavior, leading to the conclusion that all 5 hash functions can be used independently from the nature of the elements. This result experimentally confirms, also in the case of small m values, the observation by Mitzenmacher and Vadhan [23] that given a certain degree of randomness in the input, simple hash functions work well in practice. variance variance MD5 SHA SHA256 CRC BOB bits - Bloom Filter (a) Random labels - 3M # MD5 SHA SHA256 CRC BOB bits - Bloom Filter (b) IP - 8,957,84 # Fig.. Normalized bit distribution variance of hash outputs.

12 C.E. Rothenberg et al. / Computer Networks 55 (2) Hash segmentation technique For the purposes of ibf construction, there is a waste of hash output bits due to the mod m residual restrictions. Hence, we want to know whether we can divide the output of a hash function into log 2 m segments and use each segment as an independent hash value. We compare the bit distribution and fpr performance of ibfs constructed using the double hashing technique with MD5 and SHA against ibfs generated with CRC32 segments as h i (x). The differences of the observed fpr (Table 3) are negligible, which suggests that this hashing technique may be practical. Hence, we can reduce the two independent hash function requirement of the double hashing technique to a single hash computation based on e.g., CRC32 or BOB. This result can be applied to ibf networking applications with on-line element hashing instead of pre-computed element names. Moreover, this efficient hash segmentation technique may be useful in other multiple-hashing-based data structures (e.g., d-left hash tables) that require hashing on a packet basis. 6. Related work Although multiple variants of Bloom filter designs and applications have been proposed in the last years (e.g., Bloomier, dynamic, spectral, adaptive, retouched, etc.), to the best of our knowledge, none of the previous work focuses on the particular requirements of distributed networking applications using small Bloom filters in packet headers. Prior work on improved Bloom filters include the Power of Two Choices filter [4] and the Partitioned Hashing [24], which rely on the power of choices at hashing time to improve the performance of BFs. False positives are reduced in [24] by a careful choice of the group of hash functions that are well-matched to the input elements. However, this scheme is not practical in distributed, highly dynamic environments. The main idea of [4] is to reduce the number of s by choosing the best set of hash functions. Besides our in-packet-header scope, our approach differs in that we include the information of which group of hash functions was used (d value) in the packet itself, avoiding thereby the caveat of checking multiple sets. On the other hand, we need to stick to one set of hash functions for all elements in the BF, whereas in [4] the optimal group of hash functions can be chosen on an element basis. To our benefit, due to the reduced bit vector scenario, we are able to select an optimal BF after evaluating all d candidates, which leads to improved performance even in very dense BF settings (small m/n ratios). Regarding the extension to choose the best candidate filter, the Best-of-N method [5] only considers a standalone application where the best BF selection is based on the least dense filter constructed using the optimal number of hash functions. In contrast, our distributed ibf applications include candidates with different amount of bits set, as the maximum set cardinality may be unknown a priori. An optimized candidate ibf selection is possible whenever the ibf application is able to test for presence of elements that are known to be queried upfront. Moreover, selection criteria may be beyond reducing fpr, for instance benefiting the deletion of elements or avoiding specific false positives. The closest BF design innovations to support deletions, other than counting BFs or d-left fingerprint hash tables [7], are the Variable-length Signatures (VBF) [25]. Similarly based on resetting at least one bit from element signatures, the main caveat is being prone to false negatives. In contrast, our deletable regions do not introduce false negatives at the cost of providing only probabilistic element deletions. Security and privacy preserving extensions for standalone BFs have been previously proposed in different contexts (e.g., [8,26]). The novelty of our application resides in taking distributed systems and data packets specifics into consideration (e.g., flow-identifier, time-based loose synchronization of distributed secrets). 7. Relevance and extensions in practice Our work on ibfs is mostly an outcome from our research on compact packet forwarding mechanisms. The idea of element Tags has its roots in the work on a link identifier based forwarding fabric [8], rendering the system more useful (network policy compliance, loop avoidance, security) and efficient (fpr control, larger multicast groups). Recently, we applied the notion of power of choices in the design of scalable data center forwarding services [27,28] based on 96-bit ibf encoding of valiant load balanced fat tree network paths between virtual machines hosted in rack servers. In general, the element tag extensions can be applied to similar use cases of compact source routing. For instance, in the IP multicast proposal [7], having multiple choices would reduce false positives and enable compliance to inter-domain AS policies in the case of false positives. When applied to the credentials-based architecture proposed in [5], multiple candidates may allow ibfs to transverse larger paths before reaching the maximum density. Additionally, the security extension may provide extra protection from an en-route attacker spoofing the source IP address and re-using the flow credentials for unauthorized traffic. In the field of secure packet forwarding mechanisms, we contributed to the development of self-routing capabilities for DDoS protection in Bloom filter based forwarding services [2]. In addition, recent work has validated the effectiveness of loop prevention with a new extension based on performing per-hop bit permutations [29]. A joint application of these ibf algorithmic techniques aims at solving forwarding anomalies of naive approaches to ibf based networking. Related work has explored the application of secure ibf forwarding methods to provide fast host mobility [3], scalable multicast VPN services in GMPLSenabled networks [3], and an edge-controlled approach to stateless inter-domain bloomcasting [2]. Last but not least, we are looking for new use cases for our deletable Bloom filter design [32]. Due to its space efficiency and the tunable probability of safe bit removals, the deletable regions extension may have interesting applications beyond the scope of ibfs. Similarly, the hash segmentation

15 378 C.E. Rothenberg et al. / Computer Networks 55 (2) Dr. Alexander Wiesmaier studied computer science with the focus on cryptography, communication networks, and software engineering. He did his final year thesis on IT security and software engineering, especially in the field of public key infrastructures (PKI). In his doctoral studies he deepened and broadened his knowledge in many areas of IT security. Besides PKI and amongst other topics he also dealt with embedded systems, information systems, electronic voting, and electronic identities. During and after his studies he gained practical work experience in IT security companies such as Flex- Secure GmbH (Eberstadt, Germany) and Safelayer Secure Communications (Barcelona, Spain). Currently, he holds a position as Senior Researcher at Technische Universität Darmstadt (Department of Cryptography and Computer Algebra CDC/Center for Advanced Security Research Darmstadt CASED). He is in charge of research projects in the field of applied cryptography.

Module 7 Routing and Congestion Control Lesson 4 Border Gateway Protocol (BGP) Specific Instructional Objectives On completion of this lesson, the students will be able to: Explain the operation of the

Security vulnerabilities in the Internet and possible solutions 1. Introduction The foundation of today's Internet is the TCP/IP protocol suite. Since the time when these specifications were finished in

Interconnection Networks Interconnection Networks Interconnection networks are used everywhere! Supercomputers connecting the processors Routers connecting the ports can consider a router as a parallel

Bloom Filter based Inter-domain Name Resolution: A Feasibility Study Konstantinos V. Katsaros, Wei Koong Chai and George Pavlou University College London, UK Outline Inter-domain name resolution in ICN

Border Gateway Protocol Exterior routing protocols created to: control the expansion of routing tables provide a structured view of the Internet by segregating routing domains into separate administrations

Routing with OSPF Introduction The capabilities of an internet are largely determined by its routing protocol. An internet's scalability, its ability to quickly route around failures, and the consumption

Chapter 5 Simple Ad hoc Key Management 5.1 Introduction One of the most important consequences of the nature of the MANET networks is that one cannot assume that a node that is part of a network will be

152 APPENDIX 1 USER LEVEL IMPLEMENTATION OF PPATPAN IN LINUX SYSTEM A1.1 INTRODUCTION PPATPAN is implemented in a test bed with five Linux system arranged in a multihop topology. The system is implemented

Introduction Electronic transactions and activities taken place over Internet need to be protected against all kinds of interference, accidental or malicious. The general task of the information technology

CS 5480/6480: Computer Networks Spring 2012 Homework 4 Solutions Due by 1:25 PM on April 11 th 2012 Important: The solutions to the homework problems from the course book have been provided by the authors.

Module 6 Internetworking Lesson 2 Internet Protocol (IP) Specific Instructional Objectives At the end of this lesson, the students will be able to: Explain the relationship between TCP/IP and OSI model

VXLAN: Scaling Data Center Capacity White Paper Virtual Extensible LAN (VXLAN) Overview This document provides an overview of how VXLAN works. It also provides criteria to help determine when and where

Introduction Computer Network. Interconnected collection of autonomous computers that are able to exchange information No master/slave relationship between the computers in the network Data Communications.

Concept of Cache in web proxies Chan Kit Wai and Somasundaram Meiyappan 1. Introduction Caching is an effective performance enhancing technique that has been used in computer systems for decades. However,

International Journal of Current Engineering and Technology E-ISSN 2277 4106, P-ISSN 2347 5161 2015 INPRESSCO, All Rights Reserved Available at http://inpressco.com/category/ijcet Research Article Rahul

Symbol Tables IE 496 Lecture 13 Reading for This Lecture Horowitz and Sahni, Chapter 2 Symbol Tables and Dictionaries A symbol table is a data structure for storing a list of items, each with a key and

User s Manual Second Edition, July 2011 www.moxa.com/product 2011 Moxa Inc. All rights reserved. User s Manual The software described in this manual is furnished under a license agreement and may be used

Module 6 Internetworking Lesson 1 Internetworking Devices Specific Instructional Objectives At the end of this lesson, the students will be able to: Specify the need for internetworking State various issues

A PKI For IDR Public Key Infrastructure and Number Resource Certification AUSCERT 2006 Geoff Huston Research Scientist APNIC If You wanted to be Bad on the Internet And you wanted to: Hijack a site Inspect

Load Balancing Backtracking, branch & bound and alpha-beta pruning: how to assign work to idle processes without much communication? Additionally for alpha-beta pruning: implementing the young-brothers-wait

Packet forwarding using improved Bloom filters Thomas Zink thomas.zink@uni-konstanz.de A Master Thesis submitted to the Department of Computer and Information Science University of Konstanz in fulfillment

Cloud and Big Data Summer School, Stockholm, Aug., 2015 Jeffrey D. Ullman To motivate the Bloom-filter idea, consider a web crawler. It keeps, centrally, a list of all the URL s it has found so far. It

Securing an IP SAN Application Brief All trademark names are the property of their respective companies. This publication contains opinions of StoneFly, Inc., which are subject to change from time to time.

Intel Ethernet Switch Load Balancing System Design Using Advanced Features in Intel Ethernet Switch Family White Paper June, 2008 Legal INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL

Protecting Neighbor Discovery Against Node Compromises in Sensor Networks Donggang Liu isec Laboratory, CSE Department The University of Texas at Arlington Abstract The neighborhood information has been