Skip to content

Commit a067005

Browse files
Add blocklist to the spec (#553)
* Add blocklist.txt for managing NFC devices blocklist * Add blocklist to the spec
1 parent f791f8e commit a067005

File tree

2 files changed

+69
-3
lines changed

2 files changed

+69
-3
lines changed

blocklist.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@
77

88
# Additions to this file must be made by pull request.
99

10-
8073C021C057597562694B6579 # YubiKey 5 series
11-
597562696B65794E454F7233 # YubiKey NEO
10+
# YubiKey 5 series
11+
8073C021C057597562694B6579
12+
# YubiKey NEO
13+
597562696B65794E454F7233

index.html

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
adapters, for instance a built-in one, and one or more attached via USB.
215215
</p>
216216
<div>
217-
An <dfn>NFC tag</dfn> is a passive NFC device.
217+
An <dfn>NFC tag</dfn> is a passive NFC device that is not <a>blocklisted</a>.
218218
The <a>NFC tag</a> is powered by magnetic induction when an active NFC
219219
device is in proximity range. An <a>NFC tag</a> that supports <a>NDEF</a>
220220
contains a single <a>NDEF message</a>.
@@ -4273,6 +4273,63 @@ <h3>Parsing content</h3>
42734273
</section>
42744274
</section>
42754275

4276+
<!-- - - - - - - - - - - - - - - The Blocklist - - - - - - - - - - - - - - - -->
4277+
<section> <h2 id="blocklist">The Blocklist</h2>
4278+
<p>
4279+
This specification relies on a blocklist file to restrict the set of NFC
4280+
devices a website can access.
4281+
</p>
4282+
<p>
4283+
The result of <dfn>parsing the blocklist</dfn> at a |url:URL| is a list of
4284+
historical bytes hexadecimal values, produced by the following algorithm:
4285+
<ol class=algorithm>
4286+
<li>
4287+
Fetch |url:URL|, and let |contents:string| be its body, decoded as UTF-8.
4288+
</li>
4289+
<li>
4290+
Let |lines:array| be |contents| split on `"\n"`.
4291+
</li>
4292+
<li>
4293+
Let |result:list| be an empty <a>list</a>.
4294+
</li>
4295+
<li>
4296+
[= list/For each =] |line:string| in |lines|, run the following sub-steps:
4297+
<ol>
4298+
<li>
4299+
If |line| is empty, continue to the next line.
4300+
</li>
4301+
<li>
4302+
If |line| starts with `"#"`, continue to the next line.
4303+
</li>
4304+
<li>
4305+
If |line| contains invalid hexadecimal values, continue to the next line.
4306+
</li>
4307+
<li>
4308+
<a>Append</a> |line| to |result|.
4309+
</li>
4310+
</li>
4311+
</ol>
4312+
</li>
4313+
<li>
4314+
Return |result|.
4315+
</li>
4316+
</ol> <!-- parsing the blocklist -->
4317+
</p>
4318+
<p>
4319+
The <dfn>blocklist</dfn> is the result of <a>parsing the blocklist</a> at
4320+
<a
4321+
href="https://github.com/w3c/web-nfc/blob/master/blocklist.txt">https://github.com/w3c/web-nfc/blob/master/blocklist.txt</a>.
4322+
The UA should re-fetch the blocklist periodically, but it’s unspecified how
4323+
often.
4324+
</p>
4325+
<p>
4326+
An <a>NFC device</a> is <dfn>blocklisted</dfn> if the <a>blocklist</a>’s
4327+
value contains the device's <a>historical bytes</a> hexadecimal values. In
4328+
ISO 14443-4 terminology, the <dfn>historical bytes</dfn> are a subset of the
4329+
RATS (Request for Answer To Select) response.
4330+
</p>
4331+
</section>
4332+
42764333
<!-- - - - - - - - - - - - - Security and Privacy - - - - - - - - - - - - - -->
42774334
<section> <h2 id="security">Security and Privacy</h2>
42784335
<section> <h3>Chain of trust</h3>
@@ -4637,6 +4694,13 @@ <h3>Parsing content</h3>
46374694
</p>
46384695
</section>
46394696

4697+
<section> <h4>Blocklist</h4>
4698+
<p>
4699+
Web NFC includes a <a>blocklist</a> of vulnerable NFC devices to prevent
4700+
websites from taking advantage of them.
4701+
</p>
4702+
</section>
4703+
46404704
<section> <h4>Warn about risk of physical location leak</h4>
46414705
<p>
46424706
When listening for and writing <a>NFC content</a>,

0 commit comments

Comments
 (0)