{"id":167,"date":"2020-09-21T12:28:26","date_gmt":"2020-09-21T12:28:26","guid":{"rendered":"http:\/\/scaine.net\/kb\/?p=167"},"modified":"2020-09-21T12:36:59","modified_gmt":"2020-09-21T12:36:59","slug":"the-protect-scotland-app","status":"publish","type":"post","link":"http:\/\/scaine.net\/kb\/general\/the-protect-scotland-app\/","title":{"rendered":"The Protect Scotland app"},"content":{"rendered":"<p class=\"western\">Protect Scotland is the name given to our nation\u2019s new COVID-19 contact tracing application. I&#8217;ve researched this pretty thoroughly and as far as I can tell, from a data security, technical and privacy perspective the app gets a clean bill of health. I&#8217;ve downloaded the app myself and encourage everyone who can to do so.<\/p>\n<p class=\"western\">You can download the app from the <span style=\"color: #0000ff;\"><u><a href=\"https:\/\/protect.scot\/\">Protect Scotland<\/a><\/u><\/span> website which has links for both iPhones and Androids.<\/p>\n<p class=\"western\"><b>How does it work?<\/b><\/p>\n<p class=\"western\">The contact tracing app being recommended by our First Minister is based on <span style=\"color: #0000ff;\"><u><a href=\"https:\/\/www.google.com\/covid19\/exposurenotifications\/\">a collaboration by Apple and Google<\/a><\/u><\/span>. This collaboration was necessary to ensure a reliable notification service is tied to the Bluetooth hardware on your phone in a way that allows it to consistently poll for the people around you. This lets it build a picture of who you\u2019ve come into contact with. It uses BLE (Bluetooth Low Energy) to ensure minimum impact on battery.<\/p>\n<p class=\"western\">Now, assuming for simplicity that everyone has downloaded the app on a compatible device, the idea is that as you walk along the road and pass people, your phones are broadcasting an anonymous key, and collecting the keys of everyone else. This is all done locally, and nothing is sent over the internet.<\/p>\n<p class=\"western\">If the app sees any given key for more than 15 consecutive minutes, it tallies that up as a \u201ccontact\u201d, and stores the key on your phone for two weeks. After two weeks, it ages out and is deleted. If a key disappears before hitting that 15 minute mark, it\u2019s never stored in the first place.<\/p>\n<p class=\"western\">Assuming you later test positive for C19, the NHS give you a code to enter to your phone. When you do this, your phone notifies the NHS server, and uploads its \u201ccontacts\u201d \u2013 the list of keys it\u2019s stored as a result of the above process. The NHS will then send a notification to those devices. These people should then self isolate, or book a test themselves if they show symptoms.<\/p>\n<p class=\"western\"><b>Issues<\/b><\/p>\n<p class=\"western\">Like all complex subjects, there are some nuances worth highlighting.<\/p>\n<ol>\n<li value=\"1\">While Protect Scotland\u2019s app is currently free from security and privacy issues (as far as I can tell), this is of course only true of the actual Protect Scotland app. I can\u2019t vouch for how the Welsh or English apps will pan out.<\/li>\n<li>Similarly, other countries might use the Google\/Apple framework in vastly different ways that <i>do<\/i> introduce security or privacy issues. Please bear that in mind when thinking of other apps already out there. This isn\u2019t a blanket recommendation<\/li>\n<li>The Apple\/Google framework allows for more than just the bare minimum contact tracing and there\u2019s already been some discussion around whether future iterations of the app might include new functionality, such as location tracking for verifying self isolation or symptom tracking. Of course, features like those might well break the privacy-first model I\u2019m discussing here.<\/li>\n<li>I cover this in greater detail in the FAQ (see below), but the Bluetooth signals that contact tracing relies on are certainly not 100% reliable, so there\u2019s a realistic chance of false positives, or worse, false negatives.<\/li>\n<li>With point #4 in mind, please remember that contact tracing is just one extra element of our defence against COVID-19. Don\u2019t over rely on this technical solution \u2013 continue to practice social distancing, wear a mask, wash your hands, adhere to the official advice on groups and so on.<\/li>\n<\/ol>\n<p><em><strong>Frequently Asked Questions<\/strong><\/em><\/p>\n<p class=\"western\"><b>Is it private?<\/b><\/p>\n<p class=\"western\">Yes. Nothing the NHS stores is identifiable. Also, there\u2019s no location data sent or associated with a key. So when the NHS notifies your \u201ccontacts\u201d after you test positive, it doesn\u2019t know who it\u2019s notifying, or where they are. So yes, it\u2019s written with privacy front and centre.<\/p>\n<p class=\"western\"><b>Why would I trust a government-built app on my phone!?<\/b><\/p>\n<p class=\"western\">There\u2019s a number of really positive factors which will really help you overcome your inherent seditionist, insurrectional impulses here, never fear!<\/p>\n<ol>\n<li>\n<p class=\"western\">The app is open source. This means that you can read and review the source code that underpins the app, to see what it does and doesn\u2019t do. Here\u2019s the link: <span style=\"color: #0000ff;\"><u><a href=\"https:\/\/github.com\/NES-Digital-Service\/protect-scotland\">https:\/\/github.com\/NES-Digital-Service\/protect-scotland<\/a><\/u><\/span>. If, like me, you can\u2019t read or understand React Native and Typescript (which is how the app is written), then at least we can put some trust in the fact that others can and they will no doubt call out any bad behaviour they see.<\/p>\n<\/li>\n<li>\n<p class=\"western\">The app is decentralised. This means that nothing is stored by NHS servers by default. In fact, only if you enter an NHS-provided \u201ctested positive\u201d code to your app is anything sent at all. Even then, only the encrypted keys of your \u201ctracked contacts\u201d are sent.<\/p>\n<\/li>\n<li>\n<p class=\"western\">This is almost the same app that Northern Ireland deployed back in August. In fact, it\u2019s written by the same company (<span style=\"color: #0000ff;\"><u><a href=\"https:\/\/www.nearform.com\/\">Nearform<\/a><\/u><\/span>), who have deployed variations of this decentralised app for Ireland, Northern Ireland and Gibraltar. So it&#8217;s had plenty of time to address criticism and incorporate improvements before the NHS brought them in for Protect Scotland.<\/p>\n<\/li>\n<\/ol>\n<p class=\"western\">So you can retire the tinfoil hat! There\u2019s no evidence here of shenanigans.<\/p>\n<p class=\"western\"><b>Does it actually work?<\/b><\/p>\n<p class=\"western\">There are mixed reports on this. An <span style=\"color: #0000ff;\"><u><a href=\"https:\/\/www.research.ox.ac.uk\/Article\/2020-04-16-digital-contact-tracing-can-slow-or-even-stop-coronavirus-transmission-and-ease-us-out-of-lockdown\">Oxford study<\/a><\/u><\/span> showed that, assuming that the contact tracing mechanism is reasonably accurate (more on that below), we need around 60% of the population to use a contact tracing app before we stop the pandemic completely. However, that same report notes that even if only as few as 15% use it, it still has a positive effect on reducing cases.<\/p>\n<p class=\"western\">A few days after its launch, during the <span style=\"color: #0000ff;\"><u><a href=\"https:\/\/news.gov.scot\/speeches-and-briefings\/coronavirus-covid-19-update-first-ministers-speech-14-september-2020\">First Minister\u2019s COVID-19 briefing<\/a><\/u><\/span>, Nicola Sturgeon reported that the app has been downloaded 900,000 times. With Scotland\u2019s population estimated around 5.5M, that puts us at nearly 17%, which is pretty encouraging for an app which at that point had only been available for just over 4 days. That&#8217;s already over the threshold that the Oxford researchers suggest will make a difference.<\/p>\n<p class=\"western\">However, critics for contact tracing include the ICCL (Irish Council for Civil Liberties), who created <span style=\"color: #0000ff;\"><u><a href=\"https:\/\/www.iccl.ie\/wp-content\/uploads\/2020\/07\/ICCL-DRI-HSE-App-Pre-Release-Report-Card.pdf\">a fairly damning report card<\/a><\/u><\/span> of the Ireland government\u2019s version of Protect.scot. They challenge some of Ireland\u2019s assertions around the use of the app, but at least give it a (mostly) thumbs up from a technical and privacy perspective.<\/p>\n<p class=\"western\">The app that Protect Scotland delivered appears to be a fork of Ireland\u2019s app, which is good, but even better, without the problematic symptom-tracking features which the ICCL so heavily criticised. Additionally, the Scottish government haven\u2019t made unsubstantiated claims about the efficacy of this app, which was another criticism levelled at Ireland\u2019s HSE.<\/p>\n<p class=\"western\"><b>My phone is too old!<\/b><\/p>\n<p class=\"western\">Possibly: you have to be running IOS 13.7, or at least Android 6 (Marshmallow) to use the app. In practical terms, that\u2019s an iPhone 6s or above, or pretty much any Android phone that isn\u2019t more than five years old. Google are (for once!) ahead of the game here, since that Android 6 release was the first version to incorporate the Google Play Services framework that the new notification system is using. So it\u2019s just an app update, rather than needing a whole new feature being baked into the O\/S which was the case for IOS.<\/p>\n<p class=\"western\">Note: Some articles suggest that IOS 13.5 is enough to support the app, but I suspect that this was before the Apple\/Google API was updated to its current version (1.5). Your mileage may vary, but recent reports do suggest that 13.7 will be required.<\/p>\n<p class=\"western\"><b>Will my use of Bluetooth earbuds\/headphones\/speakers interfere with the app?<\/b><\/p>\n<p class=\"western\">Definitely not. Even classic Bluetooth could support up to 7 simultaneous connections, but BLE supports up to 20. You can read more about <span style=\"color: #0000ff;\"><u><a href=\"https:\/\/blog.beaconstac.com\/2018\/08\/ble-made-simple-a-complete-guide-to-ble-bluetooth-beacons\/\">how BLE beacons work here<\/a><\/u><\/span>.<\/p>\n<p class=\"western\"><b>But it\u2019s otherwise a perfect system?<\/b><\/p>\n<p class=\"western\">Ha, good god no. If only that were true. Or even possible.<\/p>\n<p class=\"western\">The First Minister is coming under fire because the NHS chose to use Amazon Web Services to host the servers which perform the notifications for Protect Scotland. Since Amazon are commonly criticised for not paying taxes in the UK, this has caused some outcry. It\u2019s a ten year deal too, which might give you an indication of how long the Scottish government expects to need contact tracing!<\/p>\n<p class=\"western\">Also, while the app is open source, the notification API that Google and Apple created is still closed-source, so there\u2019s some secret sauce going into the mix there. That might affect, for example, how the notifications are encrypted, or how the random keys which denote your phone are generated. We can still observe the end results of that encryption or key generation, but if the API were open source, the entire process could be audited for mathematical integrity. Apple and Google have so far announced no plans to open source their joint API.<\/p>\n<p class=\"western\">Finally, there\u2019s some doubt as to whether those Bluetooth Low Energy broadcasts are accurate enough to paint a consistent picture of who you are in proximity to. Technically BLE can work at up to 30 metres away, although most uses revolve around reducing the broadcast emission to just 15cm for things like pairing headphones or earbuds. In the worst case scenario here, you might be notified incorrectly that you\u2019ve \u201cbeen in contact\u201d with someone who tested positive, when in fact you were just waiting for a bus and someone on the other side of the road (who later tests positive for COVID-19) was also waiting for a bus!<\/p>\n<p class=\"western\">While that scenario is inconvenient, at least it\u2019s not life threatening. Because of course, the other worst-case scenario is <i>not<\/i> being notified, which is. So while I agree that there are technical challenges to this solution, it\u2019s still better than nothing and I believe it increases our chances of containing the threat.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Protect Scotland is the name given to our nation\u2019s new COVID-19 contact tracing application. I&#8217;ve researched this pretty thoroughly and as far as I can tell, from a data security, technical and privacy perspective the app gets a clean bill of health. I&#8217;ve downloaded the app myself and encourage everyone who can to do so. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_expiration-date-status":"saved","_expiration-date":0,"_expiration-date-type":"","_expiration-date-categories":[],"_expiration-date-options":[]},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/scaine.net\/kb\/wp-json\/wp\/v2\/posts\/167"}],"collection":[{"href":"http:\/\/scaine.net\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/scaine.net\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/scaine.net\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/scaine.net\/kb\/wp-json\/wp\/v2\/comments?post=167"}],"version-history":[{"count":2,"href":"http:\/\/scaine.net\/kb\/wp-json\/wp\/v2\/posts\/167\/revisions"}],"predecessor-version":[{"id":169,"href":"http:\/\/scaine.net\/kb\/wp-json\/wp\/v2\/posts\/167\/revisions\/169"}],"wp:attachment":[{"href":"http:\/\/scaine.net\/kb\/wp-json\/wp\/v2\/media?parent=167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/scaine.net\/kb\/wp-json\/wp\/v2\/categories?post=167"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/scaine.net\/kb\/wp-json\/wp\/v2\/tags?post=167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}