Skip to content

Commit

Permalink
Key computation changes and actual use
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks Orlovich committed Jul 11, 2023
1 parent ba8dbec commit 6659c3d
Showing 1 changed file with 36 additions and 18 deletions.
54 changes: 36 additions & 18 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1758,6 +1758,10 @@ null |winningComponentConfig|:
1. Let |sellerCurrency| be |leadingBidInfo|'s [=leading bid info/auction config=]'s [=auction config/seller currency=].
1. [=map/Set=] |browserSignals|["`desirability`"] to |leadingBidInfo|'s
[=leading bid info/top score=].
1. If the result of [=query reporting ID k-anonymity count=] given |winner|'s [=generated bid/interest group=] and |winner|'s [=generated bid/ad descriptor=]'s [=ad descriptor/url=] is true:
1. Let |igAd| be the [=interest group ad=] from |winner|'s [=generated bid/interest group=]'s [=interest group/ads=] whose [=interest group ad/render url=] is |winner|'s [=generated bid/ad descriptor=]'s [=ad descriptor/url=].
1. If |igAd|'s [=interest group ad/buyer and seller reporting ID=]
[=map/exists=], [=map/set=] |browserSignals|["`buyerAndSellerReportingId`"] to |igAd|'s [=interest group ad/buyer and seller reporting ID=].
1. [=map/Set=] |browserSignals|["`bid`"] to the result of [=rounding a value=] given
|winner|'s [=generated bid/bid=]'s [=bid with currency/value=].
1. [=map/Set=] |browserSignals|["`bidCurrency`"] to the result of [=serializing a currency tag=]
Expand Down Expand Up @@ -1828,9 +1832,14 @@ To <dfn>report win</dfn> given a [=leading bid info=] |leadingBidInfo|, a [=stri
1. If the result of [=query reporting ID k-anonymity count=] given |winner|'s [=generated bid/interest group=]

and |winner|'s [=generated bid/ad descriptor=]'s [=ad descriptor/url=] is true:

1. [=map/Set=] |browserSignals|["`interestGroupName`"] to |winner|'s
[=generated bid/interest group=] [=interest group/name=].
1. Let |igAd| be the [=interest group ad=] from |winner|'s [=generated bid/interest group=]'s [=interest group/ads=] whose [=interest group ad/render url=] is |winner|'s [=generated bid/ad descriptor=]'s [=ad descriptor/url=].
1. If |igAd|'s [=interest group ad/buyer and seller reporting ID=]
[=map/exists=]:
1. [=map/Set=] |browserSignals|["`buyerAndSellerReportingId`"] to |igAd|'s [=interest group ad/buyer and seller reporting ID=].
1. Otherwise, if |igAd|'s [=interest group ad/buyer reporting ID=]
[=map/exists=]
1. [=map/Set=] |browserSignals|["`buyerReportingId`"] to |igAd|'s [=interest group ad/buyer reporting ID=].
1. Otherwise, [=map/Set=] |browserSignals|["`interestGroupName`"] to |winner|'s [=generated bid/interest group=] [=interest group/name=].
1. [=map/Set=] |browserSignals|["`bid`"] to the result of [=rounding a value=]
given |winner|'s [=generated bid/bid=]'s [=bid with currency/value=].
1. [=map/Set=] |browserSignals|["`bidCurrency`"] to |serializedPerBuyerCurrency|.
Expand Down Expand Up @@ -1925,6 +1934,28 @@ threshold when responding to [=query k-anonymity count=].
1. Return the result of [=query k-anonymity count|querying the k-anonymity count=] given |keyHash|.
</div>

<div algorithm>
To <dfn>compute the key hash of reporting ID</dfn> given an [=interest group=] |ig| and a [=URL=] |ad|:
1. Let |igAd| be the [=interest group ad=] from |ig|'s [=interest group/ads=] whose [=interest group ad/render url=] is |ad|.
1. Let |keyString| be the [=string/concatenation=] of the following strings separated with U+000A LF:
1. "NameReport"
1. the [=serialization of an origin|serialization=] of |ig|'s [=interest group/owner=]
1. the [=URL serializer|serialization=] of |ig|'s [=interest group/bidding url=]
1. the [=URL serializer|serialization=] of |ad|
1. If |igAd|'s [=interest group ad/buyer and seller reporting ID=]
[=map/exists=]:
1. "BuyerAndSellerReportingId"
1. |igAd|'s [=interest group ad/buyer and seller reporting ID=]
1. Otherwise, if |igAd|'s [=interest group ad/buyer reporting ID=]
[=map/exists=]
1. "BuyerReportingId"
1. |igAd|'s [=interest group ad/buyer reporting ID=]
1. Otherwise:
1. "IgName"
1. |ig|'s [=interest group/name=].
1. Return the [=SHA-256=] hash of the [=ASCII encoding=] of |keyString|.
</div>

<div algorithm>
To <dfn>query component ad k-anonymity count</dfn> given a [=URL=] |ad|:
1. Let |keyString| be the [=string/concatenation=] of the following strings separated with U+000A LF:
Expand All @@ -1950,14 +1981,7 @@ threshold when responding to [=query k-anonymity count=].

<div algorithm>
To <dfn>query reporting ID k-anonymity count</dfn> given an [=interest group=] |ig| and a [=URL=] |ad|:
1. Let |keyString| be the [=string/concatenation=] of the following strings separated with U+000A LF:
1. "NameReport"
1. the [=serialization of an origin|serialization=] of |ig|'s [=interest group/owner=]
1. the [=URL serializer|serialization=] of |ig|'s [=interest group/bidding url=]
1. the [=URL serializer|serialization=] of |ad|
1. |ig|'s [=interest group/name=].
1. Let |keyHash| be the [=SHA-256=] hash of the [=ASCII encoding=] of |keyString|.

1. Let |keyHash| be the result of [=computing the key hash of reporting ID=] given |ig| and |ad|.
1. Return the result of [=query k-anonymity count|querying the k-anonymity count=] given |keyHash|.
</div>

Expand Down Expand Up @@ -1989,13 +2013,7 @@ threshold when responding to [=query k-anonymity count=].
<div algorithm>
To <dfn>increment reporting ID k-anonymity count</dfn> given an [=interest group=] |ig| and a [=URL=]
|ad|:
1. Let |keyString| be the [=string/concatenation=] of the following strings separated with U+000A LF:
1. "NameReport"
1. the [=serialization of an origin|serialization=] of |ig|'s [=interest group/owner=]
1. the [=URL serializer|serialization=] of |ig|'s [=interest group/bidding url=]
1. the [=URL serializer|serialization=] of |ad|
1. |ig|'s [=interest group/name=].
1. Let |keyHash| be the [=SHA-256=] hash of the [=ASCII encoding=] of |keyString|.
1. Let |keyHash| be the result of [=computing the key hash of reporting ID=] given |ig| and |ad|.
1. [=Increment k-anonymity count=] given |keyHash|.
</div>

Expand Down

0 comments on commit 6659c3d

Please sign in to comment.