1 00:00:00,000 --> 00:00:05,540 Now we have Alex and Konark with anonymous rate limiting with direct anonymous attestation. 2 00:00:10,520 --> 00:00:16,520 Thank you and welcome everybody to our talk. My name is Konark and this is Alex and we both work 3 00:00:16,520 --> 00:00:21,260 for a company called Clix based out of Munich, Germany. For those of you who have not heard about 4 00:00:21,260 --> 00:00:25,300 Clix, we are basically a privacy friendly search engine which can be accessed through our browser 5 00:00:25,300 --> 00:00:29,600 and through our Firefox add-on. And apart from being a search engine, we also package the browser 6 00:00:29,600 --> 00:00:36,480 and an add-on with various privacy features like anti-tracking, ad-blocking. And we're also the 7 00:00:36,480 --> 00:00:43,020 parent company for GhostRaid. Today we're going to talk about a system that we developed and use 8 00:00:43,020 --> 00:00:48,760 at Clix, which basically helps us prevent attacks on our data collection system. Although the 9 00:00:48,760 --> 00:00:55,560 examples that we will take here will be based on the events that we receive in our data streams, 10 00:00:55,840 --> 00:00:59,120 but we believe the system is generic enough that 11 00:00:59,120 --> 00:00:59,580 we're not going to use it as a means to other users. So we're going to talk about a system that 12 00:00:59,600 --> 00:01:05,480 wherever rate limiting applies, this system can be used. Before Alex will talk about the 13 00:01:05,480 --> 00:01:10,520 system in detail, I would just like to explain why at first place we needed to build an 14 00:01:10,520 --> 00:01:17,320 anonymous rate limiting system and how it has evolved since 2016. Now, it's important to 15 00:01:17,320 --> 00:01:22,360 understand that data is important to build services. And Clicks is no exception. To power 16 00:01:22,360 --> 00:01:27,520 our search engine, anti-tracking, anti-phishing, data is of the most importance. And yes, it 17 00:01:27,520 --> 00:01:32,320 might sound a bit controversial talking about data collection at a privacy village, but it's 18 00:01:32,320 --> 00:01:36,780 important to understand that when you talk about data and privacy, how that data is being 19 00:01:36,780 --> 00:01:43,860 collected is of the uttermost importance. If you look at this table here, this is what most of 20 00:01:43,860 --> 00:01:48,100 the data streams in the industry will look like. Most of the data collection happens with an 21 00:01:48,100 --> 00:01:53,240 identifier that is sent back home with the events. The identifier could be a long-term 22 00:01:53,240 --> 00:01:57,140 identifier, an explicit identifier like a cookie, which you see on the extreme right. 23 00:01:57,140 --> 00:02:02,840 Or it could be based on, it could be an implicit identifier based on multiple parameters like IP 24 00:02:02,840 --> 00:02:08,620 and the user agent. The whole, the whole notion of sending back identifier is so that use cases 25 00:02:08,620 --> 00:02:13,400 like analytics could be solved on the back end. So, for example, based on this data stream, we 26 00:02:13,400 --> 00:02:18,400 can easily solve the question, how many unique visitors visited Facebook.com in a given hour, 27 00:02:18,640 --> 00:02:24,040 right? But also, because of the presence of the identifier, you can link multiple events on the 28 00:02:24,040 --> 00:02:27,120 back end. Which means not only can you solve the use cases, but you can also solve the 29 00:02:27,140 --> 00:02:31,620 use case of finding out unique visits on Facebook. You can also see that the same user also 30 00:02:31,620 --> 00:02:36,900 visited booking.com, Twitter dashboard, and maybe because of some capability URLs, you can 31 00:02:36,900 --> 00:02:43,540 potentially de-anonymize the user itself, right? So, when we started to design our data 32 00:02:43,540 --> 00:02:49,600 collection streams, we wanted to ensure that any data point that can link multiple messages on the 33 00:02:49,600 --> 00:02:54,540 back end needs to be dropped on the client side itself. What that means is, in our data 34 00:02:54,540 --> 00:02:57,120 streams, there is no way you can link multiple messages on the back end. So, when we started to 35 00:02:57,120 --> 00:03:01,320 think about how to link multiple messages together, that could be implicitly or explicitly, and in 36 00:03:01,320 --> 00:03:07,020 order for us to even prevent ourselves from linking messages based on network fingerprinting, we 37 00:03:07,020 --> 00:03:11,320 also want to route the data through a set of proxies. So, that means the data collection streams 38 00:03:11,320 --> 00:03:17,720 are clean and cannot be linked with multiple events. That said, we still can solve the use cases 39 00:03:17,720 --> 00:03:23,980 that the, that is needed, that is needed to collect identifiers for, but for this purpose, for 40 00:03:23,980 --> 00:03:27,100 this talk, we will not dig deeper into how we do it. If you want to know how to do that, go to 41 00:03:27,100 --> 00:03:30,180 more details we can talk offline or you can read this paper and 42 00:03:30,180 --> 00:03:33,860 our approach how we do data collection anonymously and yet 43 00:03:33,860 --> 00:03:38,380 solve the use cases. Coming back to the motivation of doing this 44 00:03:38,380 --> 00:03:43,560 talk. Now the problem is all the data collection systems suffer 45 00:03:43,560 --> 00:03:46,500 from the same problem that attacker can spam you with 46 00:03:46,500 --> 00:03:49,800 multiple messages which are fake. Which are not actually 47 00:03:49,800 --> 00:03:52,420 happening on the user's machine. Right? And we are no 48 00:03:52,420 --> 00:03:57,800 exception. But because so if you take let's take an example 49 00:03:57,800 --> 00:04:01,280 here. So for example one of the most important data points for 50 00:04:01,280 --> 00:04:04,620 us is query logs. What that means is what is the query that 51 00:04:04,620 --> 00:04:08,060 user did and what result did the user select from our search 52 00:04:08,060 --> 00:04:12,120 results. Right? And this query log powers how we rank our 53 00:04:12,120 --> 00:04:15,040 search engine and how we promote the content because that 54 00:04:15,040 --> 00:04:17,920 detects what's the popularity of a query and landing page. 55 00:04:18,180 --> 00:04:22,380 Right? Now an attacker knowing that we do not have a 56 00:04:22,380 --> 00:04:25,380 lot of identifiers in our data streams can spam us with 57 00:04:25,380 --> 00:04:28,820 multiple messages. Right? And once the spammer starts to send 58 00:04:28,820 --> 00:04:32,340 us multiple messages it could be used for altering or promoting 59 00:04:32,340 --> 00:04:36,180 their own content at a different rank or maybe disrupt our 60 00:04:36,180 --> 00:04:39,440 services by promoting a bad result for a good query. Right? 61 00:04:40,720 --> 00:04:44,300 To give you a more concrete example just based on these two 62 00:04:44,300 --> 00:04:47,800 messages these are two sample query logs. Query booking, the 63 00:04:47,800 --> 00:04:50,840 landing page booking dot com. Query booking, the landing page 64 00:04:50,840 --> 00:04:52,360 booking holidays dot com. And you can see that this query 65 00:04:52,380 --> 00:04:56,000 log is based on the message content. We cannot detect whether 66 00:04:56,000 --> 00:04:59,840 it's a fabricated data or a genuine data. Right? And because 67 00:04:59,840 --> 00:05:03,500 unlike other search engines we do not track users there is no 68 00:05:03,500 --> 00:05:06,480 way we can know what is the source of the message and what 69 00:05:06,480 --> 00:05:10,200 is the history of the source itself to use it for server side 70 00:05:10,200 --> 00:05:15,160 rate limiting or for server side rate limiting solutions. Right? 71 00:05:15,280 --> 00:05:19,160 And this is a big, big concern for us because now at one point 72 00:05:19,160 --> 00:05:22,100 we are doing anonymous data collection but because it's 73 00:05:22,100 --> 00:05:22,360 anonymous we are not able to track users. Right? And this is 74 00:05:22,360 --> 00:05:22,600 a big, big concern for us because now at one point we are doing 75 00:05:22,600 --> 00:05:23,160 anonymous data collection but because it's anonymous it can 76 00:05:23,160 --> 00:05:26,580 negatively impact our services itself. Right? So one solution 77 00:05:26,580 --> 00:05:29,520 could be let's stop anonymous data collection and let's start 78 00:05:29,520 --> 00:05:32,920 tracking users. But that is not what we want to do. So we want 79 00:05:32,920 --> 00:05:36,660 to build a service wherein we can detect without de-anonymizing 80 00:05:36,660 --> 00:05:40,300 the user whether it's the same user sending us multiple messages 81 00:05:40,300 --> 00:05:44,120 or these are different users. You can think about this as a 82 00:05:44,120 --> 00:05:47,920 voting system where a trusted user can vote but can only vote 83 00:05:47,920 --> 00:05:52,060 once for a given period. Right? Now think about this problem as 84 00:05:52,060 --> 00:05:56,340 the user needs to vote for popularity of a query but can 85 00:05:56,340 --> 00:06:01,300 only vote once in a given time frame. In the context of this 86 00:06:01,300 --> 00:06:05,940 query log we only want to receive one query per user, one 87 00:06:05,940 --> 00:06:10,280 normalized query per user in one hour. Right? And if you talk 88 00:06:10,280 --> 00:06:13,360 about the general implementation of the system based on the 89 00:06:13,360 --> 00:06:16,740 message type and the content of the message we want to rate limit 90 00:06:16,740 --> 00:06:21,820 the users, rate limit per user per time frame. Right? And that's 91 00:06:21,820 --> 00:06:25,220 kind of important for us. And that's why the problem that we try 92 00:06:25,220 --> 00:06:29,180 to solve is without knowing the user how do we enforce these rate 93 00:06:29,180 --> 00:06:34,160 limiting users or these rate limiting rules. Right? So in 94 00:06:34,160 --> 00:06:38,140 2016 we pushed a version to production which we call 95 00:06:38,140 --> 00:06:41,680 anonymous rate limiting version one. And the idea was because we 96 00:06:41,680 --> 00:06:45,340 are already using proxies to transport data we can actually 97 00:06:46,000 --> 00:06:49,320 empower the proxies without learning the content of message 98 00:06:49,320 --> 00:06:51,560 but still perform de-duplication for us. 99 00:06:51,820 --> 00:06:55,540 But what that meant was these proxies needed to run custom 100 00:06:55,540 --> 00:06:59,520 software which perform these de-duplication tasks. Now this 101 00:07:00,200 --> 00:07:02,720 protocol was based on blind signatures and other standard 102 00:07:02,720 --> 00:07:07,020 crypto primitives. But yet for this solution to work we needed 103 00:07:07,020 --> 00:07:10,220 multiple trusted third party providers to run proxies for us. 104 00:07:11,160 --> 00:07:14,480 The reason we needed multiple third party proxy providers first 105 00:07:14,480 --> 00:07:18,300 was because they need to run the custom application and second we 106 00:07:18,300 --> 00:07:21,680 did not want that the users could collide with the proxies or the 107 00:07:21,820 --> 00:07:25,000 proxies could collide among themselves or clicks in clicks 108 00:07:25,000 --> 00:07:29,220 itself could collude among the proxies. Right? But what happened 109 00:07:29,220 --> 00:07:32,740 was we tried finding these multiple third party vendors to 110 00:07:32,740 --> 00:07:36,160 run proxies for us and sadly in about two years we could not 111 00:07:36,160 --> 00:07:39,620 find any. Right? What that meant was clicks had to run their own 112 00:07:39,620 --> 00:07:42,520 proxies which kind of defeated the whole purpose. And because 113 00:07:42,520 --> 00:07:45,500 these proxies had to run a custom software to perform 114 00:07:45,500 --> 00:07:50,000 de-duplication we cannot rely on the off shelf solutions like tor 115 00:07:50,000 --> 00:07:50,980 or other um. 116 00:07:51,820 --> 00:07:55,500 Trusted vendors. So based on these challenges that we faced in 117 00:07:55,500 --> 00:07:59,180 the first version uh earlier this year we started testing a new 118 00:07:59,180 --> 00:08:02,020 version which we call HPN uh which we call anonymous rate 119 00:08:02,020 --> 00:08:08,860 limiting version two and which Alex will explain in detail. So 120 00:08:09,480 --> 00:08:14,620 uh as Konrad said I'll uh talk about our new anonymous rate 121 00:08:14,620 --> 00:08:18,140 limiting uh system which is based on the right anonymous 122 00:08:18,140 --> 00:08:21,800 attestation. Uh he already made a statement about the 123 00:08:22,640 --> 00:08:27,780 benefits but just as a quick review uh this system has 124 00:08:27,780 --> 00:08:30,300 several benefits over the previous one. Uh the first one 125 00:08:30,300 --> 00:08:35,120 is is that now we don't need uh we we remove the need for 126 00:08:35,120 --> 00:08:38,700 trusted third parties. Uh second there are less 127 00:08:38,700 --> 00:08:40,820 interactions between the client and the server because in the 128 00:08:40,820 --> 00:08:45,120 previous system we required uh one blind signature per message 129 00:08:45,120 --> 00:08:49,640 so the client had to first get message blind sign then actually 130 00:08:49,640 --> 00:08:51,800 uh send a message. So there was a lot of problems with that. So 131 00:08:51,800 --> 00:08:54,800 there was two interactions. And the third one is now that we can 132 00:08:54,800 --> 00:08:59,040 we can use uh known solutions for network anonymity like tor 133 00:08:59,040 --> 00:09:01,340 which in the previous system was a bit more complicated 134 00:09:01,340 --> 00:09:08,200 because of this custom third party proxies. So what is 135 00:09:08,200 --> 00:09:11,280 actually direct anonymous attestation? Direct anonymous 136 00:09:11,280 --> 00:09:13,800 anonymous attestation is a cryptographic primitive which is 137 00:09:13,800 --> 00:09:16,500 implemented in processors that follow the trusted platform 138 00:09:16,500 --> 00:09:19,860 module standard as well as other chips which follow the 139 00:09:20,440 --> 00:09:21,780 Intel enhanced privacy of the system. So this is actually a 140 00:09:21,800 --> 00:09:24,820 very specific application. But rather than focusing on the 141 00:09:24,820 --> 00:09:30,960 hardware that runs this uh cryptographic uh protocol we 142 00:09:30,960 --> 00:09:33,820 would rather like to focus on the cryptographic primitive 143 00:09:33,820 --> 00:09:38,760 itself. So uh for our purposes uh direct anonymous attestation 144 00:09:38,760 --> 00:09:41,660 has two key features. First it allows for anonymous 145 00:09:41,660 --> 00:09:46,180 authentication. Uh this means that you can prove that a trusted 146 00:09:46,180 --> 00:09:50,700 platform is signing a message but not which concrete platform 147 00:09:50,700 --> 00:09:51,780 is doing so. So in order to do that you have to have a 148 00:09:51,800 --> 00:09:54,280 specific device. In other words uh the signatures can prove 149 00:09:54,280 --> 00:09:58,720 membership of the device in a group but not which concrete 150 00:09:58,720 --> 00:10:04,120 device is signing the message. Uh the second feature that uh is 151 00:10:04,120 --> 00:10:06,960 important for us is the controlled linkability. So 152 00:10:07,860 --> 00:10:12,260 given sorry for this controlled linkability a device signs a 153 00:10:12,260 --> 00:10:16,680 message with respect to a base name string. Uh in a way that 154 00:10:16,680 --> 00:10:20,760 two signatures from the same member are linkable if and only 155 00:10:20,760 --> 00:10:21,780 if they are done in a group. So this means that the device is 156 00:10:21,800 --> 00:10:24,600 signed with respect to the same base name string. So for 157 00:10:24,600 --> 00:10:29,020 example if a device always signs a message with the same base 158 00:10:29,020 --> 00:10:33,280 name then all the signatures will be linkable. So we will be 159 00:10:33,280 --> 00:10:37,480 able to link all his messages together. Uh on the other 160 00:10:37,480 --> 00:10:40,840 extreme if a device would randomize this base name and 161 00:10:40,840 --> 00:10:45,540 sign every message with respect to a different base name then all 162 00:10:45,540 --> 00:10:49,420 the all the messages will be completely unlinkable. So we'll 163 00:10:49,420 --> 00:10:51,780 see later that we can use this linkability properties to 164 00:10:51,800 --> 00:11:01,940 uh achieve our rate limiting uh needs. But before that uh we 165 00:11:01,940 --> 00:11:05,700 have to talk about the main four operations about uh that are 166 00:11:05,700 --> 00:11:07,960 involved in direct anonymous attestation because we'll need 167 00:11:07,960 --> 00:11:11,960 to refer to them later. Uh the first one is called join. And 168 00:11:11,960 --> 00:11:14,900 this is where a device gets credentials from an issuer. 169 00:11:15,080 --> 00:11:19,120 Typically a device is a client and the issuer is a server. And 170 00:11:19,120 --> 00:11:21,780 we can see this as the device gets credentials from an issuer. 171 00:11:21,800 --> 00:11:22,060 So the linkability properties are fulfilled using the device 172 00:11:22,060 --> 00:11:25,840 becoming a member of the issuer group. Then once this device 173 00:11:25,840 --> 00:11:29,180 obtains credentials it can sign messages with respect to this 174 00:11:29,180 --> 00:11:32,300 base name string in a way that uh the linkability properties 175 00:11:32,300 --> 00:11:36,240 are uh fulfilled the linkability properties that we talked in the 176 00:11:36,240 --> 00:11:40,020 previous light are fulfilled. So then the verify operation 177 00:11:40,580 --> 00:11:43,220 essentially means that you can check whether a signature is 178 00:11:43,220 --> 00:11:47,040 valid for the given message um base name. And finally the link 179 00:11:47,040 --> 00:11:51,560 operation is which is especially important for us, is it allows 180 00:11:51,800 --> 00:11:56,200 to check whether two signatures have been known by the same member and the same base name. 181 00:11:58,940 --> 00:12:04,680 Now since this signature linkability is essential for our purposes, we actually need this 182 00:12:04,680 --> 00:12:11,320 link algorithm to be efficient. So let's take a look at how this linkability looks in 183 00:12:11,320 --> 00:12:16,640 practice. To achieve this linkability, signatures contain a pseudonym which can be seen as a 184 00:12:16,640 --> 00:12:24,080 linkability tag and this pseudonym is computed as a one-way function of the base name and the 185 00:12:24,080 --> 00:12:29,340 user private key. Of course the user private key is unknown to the server so it is known both to 186 00:12:29,340 --> 00:12:37,600 the issuer and the verifier. The way this pseudonym works is like if you see two pseudonyms, 187 00:12:38,280 --> 00:12:43,820 two equal pseudonyms, then it means for sure that the corresponding signatures were done by the 188 00:12:43,820 --> 00:12:46,620 same member and with respect to the same user. So if you see two pseudonyms, two equal 189 00:12:46,620 --> 00:12:52,520 pseudonyms. So this means that the link algorithm is efficient because the server just needs to 190 00:12:52,520 --> 00:12:59,540 store all the previously seen pseudonyms and then whenever a new message comes, just extract its 191 00:12:59,540 --> 00:13:10,140 pseudonyms and see if it has already been seen before. Now that we have explained how direct 192 00:13:10,140 --> 00:13:15,020 anonymous attestation works, let's see how to use it actually in practice to achieve the 193 00:13:15,020 --> 00:13:16,600 relimiting algorithm. So let's take a look at how direct anonymous attestation works. So let's 194 00:13:24,400 --> 00:13:41,840 see how direct anonymous attestation works. So if you see a line on this page we want to 195 00:13:41,840 --> 00:13:46,320 show the 196 00:13:46,320 --> 00:13:50,940 then the verifier which is a server will drop messages either if this base name has 197 00:13:50,940 --> 00:14:01,640 computed incorrectly according to the rules or if the pseudonym is repeated. So this would be 198 00:14:01,640 --> 00:14:09,700 the structure to achieve our rate limiting purposes. So it looks like a couple of four 199 00:14:09,700 --> 00:14:16,300 components. The first one is a message type which can be used to have different rules 200 00:14:16,320 --> 00:14:21,560 for different kinds of messages. The second one is a time period which is actually a time stamp 201 00:14:21,560 --> 00:14:29,460 truncated to an hour or a day depending on the need. The third one is a message digest which is 202 00:14:29,460 --> 00:14:35,520 an arbitrary function on the message and is used to introduce some message content into these 203 00:14:35,520 --> 00:14:44,720 rules. And the last is a count which is an integer between 1 and N and is meant, can be seen 204 00:14:44,720 --> 00:14:46,300 as a multiplier. So if you have a message and you want to use it as a multiplier you can 205 00:14:46,320 --> 00:14:52,820 give it a fixed message type, time period message dash and you can send up to N messages. So we 206 00:14:52,820 --> 00:14:57,300 found this base name structure to be expressive enough for our needs but it doesn't mean that 207 00:14:57,300 --> 00:15:04,020 this is the only possible structure to do this kind of rate limiting. Now revisiting the 208 00:15:04,020 --> 00:15:09,260 previous example that Konarch showed, the query logs. We could have a message that would look 209 00:15:09,260 --> 00:15:16,020 like this. First the search query, in this case booking, the landing URL and the time stamp. And we 210 00:15:16,020 --> 00:15:16,300 can see the results of our query logs. We can see the result of our query logs and we can see the 211 00:15:16,300 --> 00:15:22,960 would like, we could like to enforce the following rule. We only want one message per user per 212 00:15:22,960 --> 00:15:29,920 hour per normalized search query to be accepted by the server. To achieve this rule and 213 00:15:29,920 --> 00:15:34,880 following the previous base name structure, the base name would look like this. First we 214 00:15:34,880 --> 00:15:40,200 will have the message type which is constant in this case, query log type. Second one would be 215 00:15:40,200 --> 00:15:47,560 truncated time stamp to the hour. So instead of 656, just 6. The third one normalized query. 216 00:15:47,800 --> 00:15:57,220 The last one just 1 because in this case that's the only option. So essentially the strategy is 217 00:15:57,220 --> 00:16:05,640 to not let the user choose more than one base name for a normalized search query and for a 218 00:16:05,640 --> 00:16:10,180 given hour. Another example that we want to show you is this. This is an example of the 219 00:16:10,200 --> 00:16:13,460 message type. So the first thing that we might want to enforce is let's say we have a 220 00:16:13,460 --> 00:16:20,560 different kind of message which we only want to accept three messages per user per day. So for 221 00:16:20,560 --> 00:16:25,320 this kind of message which we could call three daily type, the base names would look like 222 00:16:25,320 --> 00:16:33,500 this. First the message type, then the date and then the message digest which in this case 223 00:16:33,500 --> 00:16:39,980 would be empty because the rule is independent of the message content. And then account which in this 224 00:16:39,980 --> 00:16:48,720 case could be chosen between 1 and 3. So a client at the start of the day would like to send a 225 00:16:48,720 --> 00:16:54,640 message then it would see that it can choose out of three base names and it would choose one at 226 00:16:54,640 --> 00:17:00,920 random. It would mark this base name as used and then in the next message that it would want to 227 00:17:00,920 --> 00:17:08,900 send it would pick from the two remaining base names etc. And essentially when it runs out of base 228 00:17:08,900 --> 00:17:15,260 names there is no way that the message quota is exceeded and there is no way that the user can 229 00:17:15,260 --> 00:17:26,140 send an additional message without being detected at the server side. Now if TPM was available 230 00:17:26,140 --> 00:17:32,680 like in all the devices, 100% of the devices, we could basically end the talk here and say okay, 231 00:17:32,780 --> 00:17:38,880 we leverage on the TPM because it runs this direct anonymous attestation protocol and if the 232 00:17:39,800 --> 00:17:42,460 TPM is not available physically in the device we showed how to use it to rate limit. But in 233 00:17:42,460 --> 00:17:48,720 practice this is not the case. First TPM is not available in all the devices, like it might be 234 00:17:48,720 --> 00:17:54,060 available in this laptop but in general it's not. And then even if it's available for example in 235 00:17:54,060 --> 00:18:00,540 our execution environment we want to run this rate limiting service in the client which is a 236 00:18:00,540 --> 00:18:08,240 browser extension. So even if the TPM might be available physically in the device we might not be 237 00:18:08,900 --> 00:18:15,240 able to access it. So at the end it's not realistic to assume that the TPM is available. So 238 00:18:15,240 --> 00:18:20,900 what we did is we implemented the direct anonymous attestation protocol but without the TPM. So 239 00:18:21,520 --> 00:18:31,660 software only. Now this opens the possibility for a new problem. Which is basically, okay, in 240 00:18:31,660 --> 00:18:37,840 the system we showed we protect against a single user from sending too many messages, right? So 241 00:18:37,840 --> 00:18:38,620 we kind of. 242 00:18:38,900 --> 00:18:44,660 Okay. For a given user this user has only a limited set of votes, let's say, to contribute in 243 00:18:44,660 --> 00:18:51,600 the system. But if we remove then the TPM then it could be quite easy for an attacker to create 244 00:18:51,600 --> 00:18:56,820 many identities and then obtain credentials for all of them and then essentially bypass the whole 245 00:18:56,820 --> 00:19:04,960 system. So note that this would not happen with a TPM because if we wouldn't force a TPM then an 246 00:19:04,960 --> 00:19:08,880 attacker would need to actually get hold of many TPMs. So this is a little bit more complicated. 247 00:19:08,880 --> 00:19:15,120 So let's talk about the TPMs devices which is not so easy. So at the end if we cannot limit the 248 00:19:15,120 --> 00:19:22,100 number of credentials given to attackers then the whole system will be useless. Now this has a 249 00:19:22,100 --> 00:19:29,520 name. It's called civil attacks and we actually need to prevent them. So the good thing is that we 250 00:19:29,520 --> 00:19:35,100 can pretty much focus on one operation of the system which is the join operations. This is the 251 00:19:35,100 --> 00:19:42,800 operation where the clients get credentials and the good thing is that it does not need to be 252 00:19:42,800 --> 00:19:52,140 anonymous. So this is because according to the protocol properties there is no way to link this 253 00:19:52,140 --> 00:19:58,260 join to any other of the user interactions with the server. So essentially the join is decoupled 254 00:19:58,260 --> 00:20:04,840 from all the other interactions. So since the joins do not need to be anonymized then we can leverage a 255 00:20:04,840 --> 00:20:10,420 standard techniques but just on this join operation. For example, a simple one would be just 256 00:20:10,420 --> 00:20:18,240 to rate limit on the user IP. We believe that will already put some protection. Then depending on 257 00:20:18,240 --> 00:20:24,640 the use case of this rate limiting system we might have e-mail user accounts, paid user 258 00:20:24,640 --> 00:20:29,380 accounts, subscriptions, so we might be able to use these for the join operations to give the 259 00:20:29,380 --> 00:20:34,820 credentials. Now as an extra measure we also rotate the issuer part. So here we have an additional 260 00:20:34,840 --> 00:20:41,360 public keys. This means that every time the issuer public keys are rotated all the credentials 261 00:20:41,360 --> 00:20:46,840 that the issuer has given are invalidated. So the clients need to join again. This is to 262 00:20:46,840 --> 00:20:52,540 avoid an attacker to potentially accumulating many credentials over time and using them with 263 00:20:52,540 --> 00:20:58,780 any extra effort. So at the end as a summary of this part we believe there are ways to 264 00:20:58,780 --> 00:21:03,100 mitigate these civil attacks and that the rate limiting is useful even without TPMs. 265 00:21:06,600 --> 00:21:12,340 Okay. So as a summary for the key parts of our system, first we rate limit joins using all 266 00:21:12,340 --> 00:21:18,400 available information that we have, user IP, email if it's available, etc. Then rotate 267 00:21:18,400 --> 00:21:24,560 issuer keys periodically and last use the direct anonymous attestation link ability for doing 268 00:21:24,560 --> 00:21:30,560 the actual rate limiting on the messages. Now we have to mention some possible 269 00:21:30,560 --> 00:21:33,080 de-anonymization attacks that we might be able to do. So the first one is the 270 00:21:36,020 --> 00:21:37,400 user ID. So this would be pretty much the same as the user ID but this would contain like a 271 00:21:37,400 --> 00:21:39,940 user ID. So this would pretty much be the same as the user ID. The first attack would be 272 00:21:40,960 --> 00:21:48,200 trying to make each user join a group where they are alone. So essentially each user would 273 00:21:48,200 --> 00:21:56,720 join a group which is unique for them. And then essentially this would, each signature, if 274 00:21:56,720 --> 00:22:03,080 this was the case, would contain like a user ID. So this would pretty much be the same as the user 275 00:22:03,100 --> 00:22:07,340 ID. So basically this would pretty much make it very easy for us to build user sessions. 276 00:22:08,600 --> 00:22:14,300 This is quite easy to detect because the user fetched the issuer public keys periodically and 277 00:22:14,300 --> 00:22:20,560 then the issuer would, sorry, the user would detect that the issuer is changing this issuer 278 00:22:20,560 --> 00:22:29,160 public keys when it should not and then basically could decide to ban the issuer and not send any 279 00:22:29,160 --> 00:22:33,080 message anymore or to report it or depending on the system. The second one is a very simple 280 00:22:33,100 --> 00:22:38,620 attack is a little bit more tricky and we call it denial of join is that the issuer has the 281 00:22:38,620 --> 00:22:45,960 power of deciding who gives, who it gives credentials to. So in the, in an extreme case 282 00:22:45,960 --> 00:22:54,120 the issuer could only give credentials to a single user and then since this, since only this 283 00:22:54,120 --> 00:23:00,100 user would be able to send messages it would be trivial to track this user, right? So this is a 284 00:23:00,100 --> 00:23:09,500 bit more tricky to detect from the client side because the clients would need to cooperate with 285 00:23:09,500 --> 00:23:14,940 each other in order to know that a single part of the population is not receiving credentials and 286 00:23:14,940 --> 00:23:22,880 then react upon it but in practice this is not so easy to implement. But in our concrete use case 287 00:23:22,880 --> 00:23:29,700 since we have the incentive of keep receiving data to run our services, we have more incentive 288 00:23:30,100 --> 00:23:36,260 on receiving data than on trying to track users. And since to track users we have to drop 289 00:23:36,260 --> 00:23:44,720 messages proportionally to the granularity that we want to track. So it's not reasonable for us to 290 00:23:44,720 --> 00:23:52,880 try to do this attack. Okay. So we thought it would be a good idea to compare our system with 291 00:23:52,880 --> 00:23:56,440 similar systems that are used in production. One is called 292 00:24:00,100 --> 00:24:05,500 the way this works is basically a user solves a token, sorry, a user solves a CAPTCHA and then 293 00:24:05,500 --> 00:24:15,540 receives end tokens that can redeem later to avoid solving more CAPTCHAs, right? So these 294 00:24:15,540 --> 00:24:22,620 tokens skip the CAPTCHA, the CAPTCHA puzzle. And these tokens can be redeemed anonymously. So 295 00:24:23,520 --> 00:24:29,340 we couldn't use this, even though we could use this in some specific use cases of our 296 00:24:29,340 --> 00:24:35,780 system, we cannot use it as a general solution for our needs. Because the main reason is that 297 00:24:35,780 --> 00:24:41,280 these tokens can be redeemed at any point of time in the future and we cannot frame it to 298 00:24:41,280 --> 00:24:48,060 relimit at specific time periods as we require. Then the second one is called Anonyze and is 299 00:24:48,060 --> 00:24:54,760 implemented in Brave browser. It essentially consists in the server being able to set up 300 00:24:54,760 --> 00:24:59,320 anonymous surveys for a subset of users in a way that allows us to do the same thing as 301 00:24:59,340 --> 00:25:07,560 only one user can vote once per, sorry, in a way that users can only vote once per survey. As far as 302 00:25:07,560 --> 00:25:15,300 I know, this is used for payments to decide the popularity of websites. We couldn't find a way to 303 00:25:15,300 --> 00:25:26,100 use it directly to achieve our needs because, again, because our trade limiting rules needed a 304 00:25:26,100 --> 00:25:29,320 little bit more of complexity. Like, you need it to be a little bit more complex. You need to 305 00:25:29,340 --> 00:25:34,620 have a lot of time to do it. It needed a time period. It needed for some measures to, like the 306 00:25:34,620 --> 00:25:40,300 query logs, to include part of the content to do the remit. So we couldn't find a way of using 307 00:25:40,300 --> 00:25:53,280 this. But still, the systems are similar to our, in some way. So for the implementation part, we 308 00:25:53,280 --> 00:25:59,320 implemented a paving based cryptographic protocol which is used, which is like a, you know, a 309 00:25:59,340 --> 00:26:02,080 paving based cryptography. It's defined in a FIDO, elliptic curve, direct anonymous attestation. 310 00:26:02,940 --> 00:26:10,440 And since it uses paving based cryptography, it's not so easy to find, or at least the choices for 311 00:26:10,440 --> 00:26:17,460 libraries are a bit reduced. Eventually we decided to use a library called Apache Milagro Crypto 312 00:26:17,460 --> 00:26:22,860 Library, which is in C. So we implemented the protocol in C using this library. And since our 313 00:26:22,860 --> 00:26:29,320 client runs in a web browser, we compiled it to WebAssembly and built, we built a web assembly. So 314 00:26:29,340 --> 00:26:34,060 we wrote bindings to JavaScript for that. And then for the server side, we used the same C 315 00:26:34,060 --> 00:26:43,180 implementation but wrote native bindings for NodeJS as our server. Now the benchmarks, 316 00:26:44,420 --> 00:26:52,240 especially the most important operation is the server verify because these actually influences 317 00:26:52,240 --> 00:26:59,320 how many messages per second can the server process. So right now it's four milliseconds. So 318 00:27:00,180 --> 00:27:08,320 this means we can process 250 messages per second per CPU core. Even though this is not 319 00:27:08,320 --> 00:27:15,560 blazingly fast, we believe that it's fast enough to be used in practice, to be used in production. 320 00:27:18,820 --> 00:27:27,600 So this system, like not the whole system is open source yet. Like the server side is not open 321 00:27:27,600 --> 00:27:29,320 source. But the cryptographic code is open source. So this is a very, very, very, very, very, very 322 00:27:29,320 --> 00:27:35,180 fast implementation of the direct normalization, it is, as well as the client part in this 323 00:27:35,180 --> 00:27:38,440 repository. So thanks for listening.