A place to cache linked articles (think custom and personal wayback machine)
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

index.md 8.9KB

il y a 4 ans
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. title: Temporary Contact Number based Contact Tracing
  2. url: https://lucumr.pocoo.org/2020/4/9/tcn-contact-tracing/
  3. hash_url: 7f71531b565d7a8b0a99100786687cfd
  4. <p class="date">written on Thursday, April 9, 2020
  5. </p><p>I have already talked here before about <a class="reference external" href="https://lucumr.pocoo.org/2020/4/3/contact-tracing/">privacy preserving contact
  6. tracing</a> to fight Covid-19 but I figured I
  7. give an update to this. I have spent the last week now investigating
  8. different approaches to this and my view has changed quite a bit.</p>
  9. <p>I strongly believe that contact tracing through phone apps is one of our
  10. best chances to return to normal and without losing our civil liberties.
  11. If you want to understand why, have a look at <a class="reference external" href="https://lucumr.pocoo.org/2020/4/3/contact-tracing/">previous post about this
  12. topic</a>.</p>
  13. <div class="section" id="two-fundamental-approaches">
  14. <h2>Two Fundamental Approaches</h2>
  15. <p>In the previous post I talked in favour of a partially centralized
  16. approach. This was largely because I felt that one of the inherent
  17. problems of any privacy preserving contact tracing system could be
  18. somewhat mitigated. That downside is that a person could always use any
  19. such contact tracing system in a way where they could determine that
  20. another person they met tested positive for covid-19 later. With a
  21. system that has support from a central authority this still cannot be
  22. prevented, but such behavior could be detected as abusive. However I am
  23. not quite convinced that this would just be security by obscurity and that
  24. the more correct way to deal with this is to just fundamentally
  25. communicate to users that this is an inherent property of the system.</p>
  26. <p>So the disclaimer to any app has to be: if you do not want that other
  27. people discover when you will test positive for covid-19 you should not
  28. use any contact tracing apps. Which is also why I strongly believe that
  29. any such system absolutely needs to be voluntary.</p>
  30. <p>So if I no longer believe in favour of the centralized approach, what do I
  31. prefer then? Quite simply put an approach based on temporary contact
  32. numbers, short <a class="reference external" href="https://tcn-coalition.org/">TCNs</a>. These protocols are
  33. fundamentally decentralized and give us some other benefits.</p>
  34. </div>
  35. <div class="section" id="reality-on-the-ground">
  36. <h2>Reality on the Ground</h2>
  37. <p>What makes application based contact tracing very interesting is that they
  38. take advantage of working on top of a widely deployed piece of hardware:
  39. smart phones. Specifically smartphones which support Bluetooth low
  40. energy (BLE). If you hold an AirPods case close to your iPhone you will
  41. notice that something happens on your screen. BLE is what enables that.</p>
  42. <p>The downside of this is that BLE comes with some restrictions. The two
  43. most relevant ones are the payload size. BLE comes with different modes
  44. and different platforms call this in different ways but the most
  45. compatible and energy preserving modes restrict us to under 30 bytes of
  46. payload. That's not enough to make fancy public key cryptography work
  47. which would be necessary for centralized approaches to play to their
  48. advantages. This is also why systems that currently follow the
  49. centralized approach will typically exchange a short ID and the extra
  50. payload is then actually exchanged through the cloud or <a class="reference external" href="https://en.wikipedia.org/wiki/Bluetooth_Low_Energy#GATT_operations">GATT</a>.
  51. The former makes a system that could be somewhat decentralized much more
  52. centralized.</p>
  53. <p>TCN based protocols instead will exchange just random identifiers instead.
  54. Most TCN based protocols currently suggest between 16 and 26 bytes of
  55. effectively random data which is easier to work with.</p>
  56. <p>Another complexity is that at present iOS devices in background cannot
  57. discover each other. This limitation might be solvable by Apple and it
  58. appears various groups are currently in contact with Apple to see what can
  59. be done. Interestingly an iOS device with the app in background can be
  60. discovered by an Android device so there might be a way to fix this.</p>
  61. </div>
  62. <div class="section" id="tcn-strawman-protocol">
  63. <h2>TCN Strawman Protocol</h2>
  64. <p>The TCN strawman protocol is the most basic of all these protocols. It
  65. was first written down by the <a class="reference external" href="https://www.coepi.org/">Co-Epi project</a>
  66. and is very easy to explain.</p>
  67. <ol class="arabic simple">
  68. <li>all mobile phones randomly generate TCNs and remember and broadcast
  69. these.</li>
  70. <li>all mobile phones check against a server which publishes TCNs that are
  71. known to be covid-19 positive.</li>
  72. <li>all mobile phones check their local contact list against the downloaded
  73. list locally for an intersection.</li>
  74. </ol>
  75. <p>Step 2 is the only one where a central system is necessary. For instance
  76. this could be the server of the Austrian Red Cross which publishes TCNs.
  77. Since the TCNs of encounters are only stored on the devices they have to
  78. get on contact with covid-19 tested positive individuals first.</p>
  79. <p>The strawman protocol wouldn't work in practice at the peak of the
  80. infection because of the sheer data requirements. However there are
  81. various cryptographic tricks which are floating around to reduce the size
  82. of the data set.</p>
  83. </div>
  84. <div class="section" id="dp-3t">
  85. <h2>DP-3T</h2>
  86. <p><a class="reference external" href="https://github.com/DP-3T/documents/">DP-3T</a> is currently one of the
  87. most promising protocols here. It has a low cost variant which satisfies
  88. most of the qualities of the strawman protocol while reducing the amount
  89. of data greatly (to around 1.5MB of data per day for a peak infection rate
  90. of 40.000 infections a day). Additionally it comes with a protocol
  91. extension (“Unlinkable decentralized proximity tracing”) which improves on
  92. the simple protocol in a few important aspects. Specifically it makes it
  93. significantly harder for an adversary to track or identify infected users
  94. at the cost of higher bandwidth requirements.</p>
  95. <p>A simple version of the protocol is easily explained:</p>
  96. <ol class="arabic simple">
  97. <li>A device generates a secret key. Each day the user derives a new
  98. version of the secret key by feeding it into a ratchet like a SHA256
  99. hash function.</li>
  100. <li>Each day the device generates TCNs out of the day's secret key for
  101. instance by using a AES in counter mode. If for instance we want to
  102. switch TCNs every 15 minutes we would need to generate 4 * 24 * 16 bytes
  103. worth of TCNs to have enough for a day.</li>
  104. <li>Devices now broadcast a random TCN for the day for 15 minutes each.</li>
  105. <li>When a device encounters another person and they consider the contact
  106. long enough, they record the approximate time of day and the TCN
  107. encountered.</li>
  108. <li>When a user tests covid-19 positive they upload the secret key of the
  109. first day of infection and generate a new secret key.</li>
  110. <li>Other devices now download the secret key for that user and generate
  111. all possible TCNs locally and check for infection. They only need to
  112. generate 14 derivations of the secret key and the 96 TCNs for each day.</li>
  113. </ol>
  114. <p>In the more complex version the device uploads seeds of the secret keys
  115. for all time windows in the infection window. On the backend server a
  116. <a class="reference external" href="https://en.wikipedia.org/wiki/Cuckoo_filter">cuckoo filter</a> is created
  117. every 4 hours and the seeds are inserted. Because Cuckoo filters have a
  118. small probability of producing false positives parameters need to be
  119. selected appropriately to reduce this risk. The upside is that the sets
  120. of identifiers used by the same user are hidden.</p>
  121. </div>
  122. <div class="section" id="pepp-pt-and-local-governments">
  123. <h2>PEPP-PT and Local Governments</h2>
  124. <p>So this leads us to <a class="reference external" href="https://www.pepp-pt.org/">PEPP-PT</a>. It would
  125. appear that PEPP-PT is evaluating DP-3T as the reference protocol and
  126. they are going to open source the code with the idea to support local
  127. authorities in implementing their own version. Officially they have not
  128. decided between centralized or TCN approaches yet, but there seems to be a
  129. high chance it will be the latter. The concept is also very simple.
  130. Simple enough that if you want to explain this system to others, there is
  131. also a nice little <a class="reference external" href="https://ncase.me/contact-tracing/">comic strip available</a> that explains it.</p>
  132. <p>If your local government is planning on implementing a covid tracing app
  133. it might be worth directing them towards <a class="reference external" href="https://github.com/Co-Epi">Co-Epi</a>. It already has an implementation
  134. of many of the same ideas in their GitHub repository. If they do want a
  135. centralized approach the Singaporean government Open Sourced their
  136. application under GPL3 under the name <a class="reference external" href="https://bluetrace.io/">BlueTrace</a>. It avoids largely unnecessary cloud
  137. infrastructure from what I can tell.</p>
  138. </div>