Skip to content

Commit

Permalink
Merge pull request #335 from patcg-individual-drafts/yao-per-epoch-in…
Browse files Browse the repository at this point in the history
…tro-delay

SHA: e56d8e0
Reason: push, by xyaoinum

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
xyaoinum and github-actions[bot] committed Sep 25, 2024
1 parent a742101 commit 23a15e3
Showing 1 changed file with 34 additions and 12 deletions.
46 changes: 34 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<title>Topics API</title>
<meta content="UD" name="w3c-status">
<link href="https://www.w3.org/StyleSheets/TR/2021/W3C-UD" rel="stylesheet">
<meta content="Bikeshed version a1dabb26c, updated Mon Jun 17 15:00:44 2024 -0700" name="generator">
<meta content="Bikeshed version 6270e4735, updated Tue Aug 6 12:12:30 2024 -0700" name="generator">
<link href="https://github.com/patcg-individual-drafts/topics" rel="canonical">
<meta content="2df537b95e2e1377825d29121d560b0042387feb" name="revision">
<meta content="e56d8e02a07ef8930c0b9dc69466f0652ec5522e" name="revision">
<meta content="dark light" name="color-scheme">
<link href="https://www.w3.org/StyleSheets/TR/2021/dark.css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css">
<style>
Expand Down Expand Up @@ -710,21 +710,43 @@
4 = lab(85,5,15)
5 = lab(85,-10,-50)
6 = lab(85,35,-15)
For darkmode:
0 = oklab(50% 0% 108%)
1 = oklab(50% -51% 51%)
2 = oklab(50% -64% -20%)
3 = oklab(50% 6% 19%)
4 = oklab(50% -12% -64%)
5 = oklab(50% 44% -19%)
6 = oklab(50% 102% 38%)
*/

[data-algorithm] var { cursor: pointer; }
var[data-var-color="0"] { background-color: #F4D200; box-shadow: 0 0 0 2px #F4D200; }
var[data-var-color="1"] { background-color: #FF87A2; box-shadow: 0 0 0 2px #FF87A2; }
var[data-var-color="2"] { background-color: #96E885; box-shadow: 0 0 0 2px #96E885; }
var[data-var-color="3"] { background-color: #3EEED2; box-shadow: 0 0 0 2px #3EEED2; }
var[data-var-color="4"] { background-color: #EACFB6; box-shadow: 0 0 0 2px #EACFB6; }
var[data-var-color="5"] { background-color: #82DDFF; box-shadow: 0 0 0 2px #82DDFF; }
var[data-var-color="6"] { background-color: #FFBCF2; box-shadow: 0 0 0 2px #FFBCF2; }
var[data-var-color] { background-color: var(--var-bg); box-shadow: 0 0 0 2px var(--var-bg); }

var[data-var-color] { --var-bg: #F4D200; }
var[data-var-color="1"] { --var-bg: #FF87A2; }
var[data-var-color="2"] { --var-bg: #96E885; }
var[data-var-color="3"] { --var-bg: #3EEED2; }
var[data-var-color="4"] { --var-bg: #EACFB6; }
var[data-var-color="5"] { --var-bg: #82DDFF; }
var[data-var-color="6"] { --var-vg: #FFBCF2; }

@media (prefers-color-scheme: dark) {
var[data-var-color] { --var-bg: #bc1a00; }
var[data-var-color="1"] { --var-bg: #007f00; }
var[data-var-color="2"] { --var-bg: #008698; }
var[data-var-color="3"] { --var-bg: #7f5b2b; }
var[data-var-color="4"] { --var-bg: #004df3; }
var[data-var-color="5"] { --var-bg: #a1248a; }
var[data-var-color="6"] { --var-vg: #ff0000; }
}
</style>
<body class="h-entry">
<div class="head">
<p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2021/logos/W3C" width="72"> </a> </p>
<h1 class="p-name no-ref" id="title">Topics API</h1>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#UD">Unofficial Proposal Draft</a>, <time class="dt-updated" datetime="2024-07-08">8 July 2024</time></p>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#UD">Unofficial Proposal Draft</a>, <time class="dt-updated" datetime="2024-09-25">25 September 2024</time></p>
<details open>
<summary>More details about this document</summary>
<div data-fill-with="spec-metadata">
Expand Down Expand Up @@ -1221,7 +1243,7 @@ <h2 class="heading settled" data-level="11" id="epochs-for-caller-header"><span
<li data-md>
<p>Let <var>lastEpochTime</var> be <var>epochs</var>[<var>numEpochs</var> − 1]'s <a data-link-type="dfn" href="#epoch-time" id="ref-for-epoch-time②">time</a>.</p>
<li data-md>
<p>Let <var>epochSwitchTimeDecisionMessageArray</var> be the concatenation of "epoch-switch-time-decision|" and <var>callerContext</var>’s <a data-link-type="dfn" href="#topics-caller-context-top-level-context-domain" id="ref-for-topics-caller-context-top-level-context-domain">top level context domain</a>.</p>
<p>Let <var>epochSwitchTimeDecisionMessageArray</var> be the concatenation of "epoch-switch-time-decision|", <var>lastEpochTime</var>, and <var>callerContext</var>’s <a data-link-type="dfn" href="#topics-caller-context-top-level-context-domain" id="ref-for-topics-caller-context-top-level-context-domain">top level context domain</a>.</p>
<li data-md>
<p>Let <var>epochSwitchTimeDecisionHmacOutput</var> be the output of the <a data-link-type="dfn" href="https://www.rfc-editor.org/rfc/rfc6234#section-8.3" id="ref-for-section-8.3">HMAC algorithm</a>, given input parameters: whichSha=SHA256, key=user agent’s <a data-link-type="dfn" href="#user-agent-user-topics-state" id="ref-for-user-agent-user-topics-state⑨">user topics state</a>'s <a data-link-type="dfn" href="#user-topics-state-hmac-key" id="ref-for-user-topics-state-hmac-key①">hmac key</a>, and message_array=<var>epochSwitchTimeDecisionMessageArray</var>.</p>
<li data-md>
Expand Down Expand Up @@ -1270,7 +1292,7 @@ <h2 class="heading settled" data-level="11" id="epochs-for-caller-header"><span
<p>Return <var>result</var>.</p>
</ol>
</div>
<div class="note" role="note"> This roughly returns 3 recently calculated epochs, either counting back from the last epoch, or from the second to the last epoch. The decision depends on whether some fixed duration (between 0 and 2 days, sticky to a user agent &amp; site) has passed since the last epoch was calculated. This essentially adds a per-site fixed delay to the epoch switch time, to make it harder to correlate the same user across sites via the time that topics are changed. The HMAC helps to compute the per-site delay on the fly, without needing to store extra data for each site. </div>
<div class="note" role="note"> This roughly returns 3 recently calculated epochs, either counting back from the last epoch, or from the second to the last epoch. The decision depends on whether some fixed duration (between 0 and 2 days, sticky to a user agent, site, and the last epoch) has passed since the last epoch was calculated. This essentially adds a per-site per-epoch fixed delay to the epoch switch time, to make it harder to correlate the same user across sites via the time that topics are changed, or via the time interval between two changes. The HMAC helps to compute the per-site per-epoch delay on the fly, without needing to store extra data for each site or epoch. </div>
<h2 class="heading settled" data-level="12" id="get-the-number-of-distinct-versions-in-epochs-header"><span class="secno">12. </span><span class="content">Get the number of distinct versions in epochs</span><a class="self-link" href="#get-the-number-of-distinct-versions-in-epochs-header"></a></h2>
<div class="algorithm" data-algorithm="get the number of distinct versions in epochs">
To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="get-the-number-of-distinct-versions-in-epochs">get the number of distinct versions in epochs</dfn>, given a <a data-link-type="dfn" href="#browsing-topics-types-topics-caller-context" id="ref-for-browsing-topics-types-topics-caller-context①">topics caller context</a> <var>callerContext</var>, perform the following steps. They return an integer.
Expand Down

0 comments on commit 23a15e3

Please sign in to comment.