Skip to content

Commit d1997a4

Browse files
committed
Updating readme.md
1 parent 58067d3 commit d1997a4

5 files changed

Lines changed: 136 additions & 137 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Code is written in TypeScript and is automatically formatted with prettier.
66

77
```
8-
$ npm run lint
8+
$ npm run lint -- --fix
99
```
1010

1111
### Naming convention

DEVELOPER.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Directory Structure
2+
3+
```
4+
challenge-bypass-extension
5+
├──📂 public: Contains all the assets which are neither the business logic files nor the style sheets.
6+
└──📂 src: Contains all the business logic files and the style sheets.
7+
└──📂 background: The business logic for the extension background process.
8+
│ └──📂 listeners: Contains all the listeners which listen on all the events happened in the browser.
9+
│ │ └──📜 tabListener.ts: The listeners which listen on all the tab related events [API](https://developer.chrome.com/docs/extensions/reference/tabs/).
10+
│ │ └──📜 webRequestListener.ts: The listeners which listen on all the web request related events [API](https://developer.chrome.com/docs/extensions/reference/webRequest/).
11+
│ └──📂 providers: Contains the provider-specific code of all the Privacy Pass providers in the extension.
12+
│ │ └──📜 cloudflare.ts: Code specific for Cloudflare provider.
13+
│ │ └──📜 hcaptcha.ts: Code specific for hCaptcha provider.
14+
│ └──📜 voprf.js: Legacy crypto code which is still in Vanilla JavaScript.
15+
│ └──📜 voprf.d.ts: TypeScript declaration file for the legacy crypto code.
16+
│ └──📜 tab.ts: Tab class to represent a tab and encapsulate everything which is Tab specific.
17+
│ └──📜 token.ts: Token class to represent a token and contain all the code related to tokens.
18+
└──📂 popup: The web app for the popup in the browser toolbar.
19+
└──📂 components: Contains all the React components.
20+
└──📂 styles: Contains all the style sheets which are shared among the React components.
21+
└──📜 types.d.ts: Global Typescript declaration.
22+
```

README.md

Lines changed: 113 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -1,160 +1,137 @@
1+
[![github release](https://img.shields.io/github/release/privacypass/challenge-bypass-extension.svg)](https://github.com/privacypass/challenge-bypass-extension/releases/)
2+
[![Privacy Pass](https://github.com/privacypass/challenge-bypass-extension/actions/workflows/action.yml/badge.svg)](https://github.com/privacypass/challenge-bypass-extension/actions)
3+
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
4+
15
# Privacy Pass Extension
26

3-
[![Privacy Pass](https://github.com/privacypass/challenge-bypass-extension/actions/workflows/action.yml/badge.svg)](https://github.com/privacypass/challenge-bypass-extension/actions)
7+
![Privacy Pass logo](./public/icons/128/gold.png)
8+
9+
This browser extension implements the client-side of the Privacy Pass protocol providing unlinkable cryptographic tokens. For example, these tokens can be used on Cloudflare-protected websites to redeem a token instead of solving a CAPTCHA.
10+
11+
Home page: **[https://privacypass.github.io][pp-home]**
12+
13+
## Installation
14+
15+
| **[Chrome][chrome-store]** | **[Firefox][firefox-store]** |
16+
| -- | -- |
17+
| [![chrome logo](./public/icons/browser/chrome.png)][chrome-store] | [![firefox logo](./public/icons/browser/firefox.png)][firefox-store] |
18+
19+
## How it works?
20+
21+
**Privacy Pass Providers:** 🟩 [Cloudflare][cf-url] 🟩 [hCaptcha][hc-url]
422

5-
**The Privacy Pass protocol is now being standardised by the
6-
[privacypass](https://datatracker.ietf.org/wg/privacypass/about/) IETF
7-
working group. All contributions are welcome! See the [GitHub
8-
page](https://github.com/ietf-wg-privacypass) for more details.**
9-
10-
The Privacy Pass browser extension implements the Privacy Pass protocol
11-
for providing a private authentication mechanism during web browsing.
12-
Privacy Pass is currently supported by Cloudflare to allow users to
13-
redeem validly signed tokens instead of completing CAPTCHA solutions.
14-
The extension is compatible with
15-
[Chrome](https://chrome.google.com/webstore/detail/privacy-pass/ajhmfdgkijocedmfjonnpjfojldioehi)
16-
and
17-
[Firefox](https://addons.mozilla.org/firefox/addon/privacy-pass/)
18-
(v48+). An example server implementation that is compatible with this
19-
extension is available
20-
[here](https://github.com/privacypass/challenge-bypass-server).
21-
22-
The protocol we use is based on a realization of a 'Verifiable,
23-
Oblivious Pseudorandom Function' (VOPRF) first established by [Jarecki
24-
et al.](https://eprint.iacr.org/2014/650.pdf). We
25-
also detail the entire protocol and results from this deployment in a
26-
[research
27-
paper](https://content.sciendo.com/view/journals/popets/2018/3/article-p164.xml)
28-
that appeared at PETS 2018 (Issue 3).
29-
30-
In October 2021, we announced a new major version (v3) as mentioned in the
31-
[blog post](https://blog.cloudflare.com/privacy-pass-v3) which makes the code
32-
base more resilient, extensible, and maintainable.
33-
34-
## Build Instruction
23+
[pp-home]: https://privacypass.github.io/
24+
[cf-url]: https://captcha.website/
25+
[hc-url]: https://www.hcaptcha.com/privacy-pass/
26+
[chrome-store]: https://chrome.google.com/webstore/detail/privacy-pass/ajhmfdgkijocedmfjonnpjfojldioehi/
27+
[firefox-store]: https://addons.mozilla.org/firefox/addon/privacy-pass/
28+
29+
**Get tokens**
30+
- Click on the extension icon, and click on top of one of the **providers**.
31+
- One page will open with a CAPTCHA to be solved.
32+
- Solve successfully the CAPTCHA and the extenison will get some tokens.
33+
34+
**Use tokens**
35+
- When a page shows a CAPTCHA from one of the **providers**, and if the extension has tokens, the browser uses a token to pass the provider's challenge without any interaction.
36+
- Otherwise, the user must solve the CAPTCHA, which grants some tokens for future use.
37+
38+
See [FAQs](#faqs) and [Known Issues](#known-issues) section: if something is not working as expected.
39+
40+
---
41+
42+
## Installing from Sources
43+
44+
We recommend to install the extension using the official browser stores listed in [Installation](#Installation) section above. If you want to compile the sources or your browser is not supported, you can install the extension as follows.
45+
46+
### Building
3547

3648
```sh
37-
$ npm ci
38-
$ npm run build
49+
git clone https://github.com/privacypass/challenge-bypass-extension
50+
nvm use 16
51+
npm ci
52+
npm run build
3953
```
4054

41-
After that, the `dist` folder will contain all files required by the extension.
42-
43-
## Development Installation
44-
45-
### Firefox
46-
47-
- Build by following the [Build Instruction](#build-instruction).
48-
- Open Firefox and go to `about:debugging#/runtime/this-firefox`.
49-
- Click on 'Load Temporary Add-on' button.
50-
- Select `manifest.json` from `dist` folder.
51-
- Check extension logo appears in the top-right corner and 0 passes
52-
are stored (by clicking on it).
53-
- Go to a web page supporting Privacy Pass where internet challenges
54-
are displayed (e.g. <https://captcha.website>)
55-
- Solve CAPTCHA and check that some passes are stored in the extension
56-
now.
57-
- captcha.website cannot be bypassed (this is only for gaining
58-
passes)
59-
- Go to a new website supporting Privacy Pass that ordinarily displays
60-
a challenge.
61-
- Check that the website is displayed correctly without human
62-
interaction (more than one pass may be spent).
63-
- No interaction with a CAPTCHA page should occur, for instance.
64-
65-
### Chrome
66-
67-
- Build by following the [Build Instruction](#build-instruction).
68-
- Open Chrome and go to `chrome://extensions`.
69-
- Turn on the Developer mode on the top-right corner.
70-
- Click on 'Load unpacked' button.
71-
- Select the `dist` folder.
72-
- Check extension logo appears in the top-right corner and follow
73-
the same instruction as in Firefox. (If you cannot see the extension logo,
74-
it's probably just not pinned to the toolbar yest)
55+
Once these steps complete, the `dist` folder will contain all files required to load the extension.
56+
57+
### Running Tests
7558

76-
## Test Instruction
7759
```sh
78-
$ npm ci
79-
$ npm test
60+
nvm use 16
61+
npm ci
62+
npm test
8063
```
8164

82-
## Directory Structure
83-
84-
- `public`: Contains all the assets which are neither the business logic files nor the style sheets
85-
- `src`: Contains all the business logic files and the style sheets
86-
- `background`: The business logic for the extension background process
87-
- `listeners`: Contains all the listeners which listen on all the events happened in the browser
88-
- `tabListener.ts`: The listeners which listen on all the tab related events [API](https://developer.chrome.com/docs/extensions/reference/tabs/)
89-
- `webRequestListener.ts`: The listeners which listen on all the web request related events [API](https://developer.chrome.com/docs/extensions/reference/webRequest/)
90-
- `providers`: Contains the provider-specific code of all the Privacy Pass providers in the extension. Currently we have only Cloudflare and hCaptcha
91-
- `voprf.js`: Legacy crypto code which is still in Vanilla JavaScript
92-
- `voprf.d.ts`: TypeScript declaration file for the legacy crypto code
93-
- `tab.ts`: Tab class to represent a tab and encapsulate everything which is Tab specific
94-
- `token.ts`: Token class to represent a token and contain all the code related to tokens
95-
- `popup`: The web app for the popup in the browser toolbar
96-
- `components`: Contains all the React components
97-
- `styles`: Contains all the style sheets which are shared among the React components
98-
- `types.d.ts`: Global Typescript declaration
99-
100-
## Cryptography
101-
102-
Cryptography is implemented using the elliptic-curve library
103-
[SJCL](https://github.com/bitwiseshiftleft/sjcl) and compression of
104-
points is done in accordance with the standard SEC1. This work uses the
105-
NIST standard P256 elliptic curve for performing operations. Third-party
106-
implementers should note that the outputs of the hash-to-curve, key
107-
derivation, and point encoding functions must match their Go equivalents
108-
exactly for interaction with our server implementation. More information
109-
about this will be provided when the edge implementation is
110-
open-sourced.
111-
112-
## Acknowledgements
113-
114-
The creation of the Privacy Pass protocol was a joint effort by the team
115-
made up of George Tankersley, Ian Goldberg, Nick Sullivan, Filippo
116-
Valsorda and Alex Davidson.
117-
118-
We would also like to thank Eric Tsai for creating the logo and
119-
extension design, Dan Boneh for helping us develop key parts of the
120-
protocol, as well as Peter Wu and Blake Loring for their helpful code
121-
reviews. We would also like to acknowledge Sharon Goldberg, Christopher
122-
Wood, Peter Eckersley, Brian Warner, Zaki Manian, Tony Arcieri, Prateek
123-
Mittal, Zhuotao Liu, Isis Lovecruft, Henry de Valence, Mike Perry,
124-
Trevor Perrin, Zi Lin, Justin Paine, Marek Majkowski, Eoin Brady, Aaran
125-
McGuire, and many others who were involved in one way or another and
126-
whose efforts are appreciated.
65+
### Manually Loading Extension
66+
67+
#### Firefox
68+
69+
1. Open Firefox and navigate to [about:debugging#/runtime/this-firefox/](about:debugging#/runtime/this-firefox/)
70+
1. Click on 'Load Temporary Add-on' button.
71+
1. Select `manifest.json` from the `dist` folder.
72+
1. Check extension logo appears in the top-right corner of the browser.
73+
74+
#### Chrome
75+
76+
1. Open Chrome and navigate to [chrome://extensions/](chrome://extensions/)
77+
1. Turn on the 'Developer mode' on the top-right corner.
78+
1. Click on 'Load unpacked' button.
79+
1. Select the `dist` folder.
80+
1. Check extension logo appears in the top-right corner of the browser.
81+
1. If you cannot see the extension logo, it's likely not pinned to the toolbar.
82+
83+
#### Edge
84+
85+
- Open Edge and navigate to [edge://extensions/](edge://extensions/)
86+
- Turn on the 'Developer mode' on the left bar.
87+
- Click on 'Load unpacked' button in the main panel.
88+
- Select the `dist` folder.
89+
- The extension will appear listed in the main panel.
90+
- To see the extension in the bar, click in the puzzle icon and enable it, so it gets pinned to the toolbar.
91+
---
92+
93+
### Highlights
94+
95+
**2018** -- The Privacy Pass protocol is based on a _Verifiable, Oblivious Pseudorandom Function_ (VOPRF) first established by [Jarecki et al. 2014](https://eprint.iacr.org/2014/650.pdf). The details of the protocol were published at [PoPETS 2018](https://doi.org/10.1515/popets-2018-0026) paper authored by Alex Davidson, Ian Goldberg, Nick Sullivan, George Tankersley, and Filippo Valsorda.
96+
97+
**2019** -- The captcha provider [hCaptcha](https://www.hcaptcha.com/privacy-pass) announced support for Privacy Pass, and the [v2](https://github.com/privacypass/challenge-bypass-extension/tree/2.0.0) version was released.
98+
99+
**2020** -- The CFRG (part of IRTF/IETF) started a [working group](https://datatracker.ietf.org/wg/privacypass/about/) seeking for the standardization of the Privacy Pass protocol.
100+
101+
**2021** -- In this [blog post](https://blog.cloudflare.com/privacy-pass-v3), we announced the [v3](https://github.com/privacypass/challenge-bypass-extension/tree/v3.0.0) version of this extension, which makes the code base more resilient, extensible, and maintainable.
102+
103+
**2022** -- The Privacy Pass protocol can also use RSA blind signatures.
104+
105+
#### Acknowledgements
106+
107+
The creation of the Privacy Pass protocol was a joint effort by the team made up of George Tankersley, Ian Goldberg, Nick Sullivan, Filippo Valsorda, and Alex Davidson.
108+
109+
The Privacy Pass team would like to thank Eric Tsai for creating the logo and extension design, Dan Boneh for helping us develop key parts of the protocol, as well as Peter Wu and Blake Loring for their helpful code reviews. We would also like to acknowledge Sharon Goldberg, Christopher Wood, Peter Eckersley, Brian Warner, Zaki Manian, Tony Arcieri, Prateek Mittal, Zhuotao Liu, Isis Lovecruft, Henry de Valence, Mike Perry, Trevor Perrin, Zi Lin, Justin Paine, Marek Majkowski, Eoin Brady, Aaran McGuire, Suphanat Chunhapanya, Armando Faz Hernández, Benedikt Wolters, Maxime Guerreiro, and many others who were involved in one way or another and whose efforts are appreciated.
110+
111+
---
127112

128113
## FAQs
129114

130-
### What do I have to do to acquire new passes?
115+
#### What do I have to do to acquire new passes?
116+
117+
1. Click "Get More Passes" in the extension pop-up.
118+
1. Solve the CAPTCHA that is presented on the webpage.
119+
1. Your extension should be populated with new passes.
131120

132-
* Click "Get More Passes" in the extension pop-up (or navigate to
133-
<https://captcha.website>).
134-
* Solve the CAPTCHA that is presented on the webpage
135-
* Your extension should be populated with new passes.
121+
#### Are passes stored after a browser restart?
136122

137-
### Are passes stored after a browser restart?
123+
Depending on your browser settings, the local storage of your browser may be cleared when it is restarted. Privacy Pass stores passes in local storage and so these will also be cleared. This behavior may also be observed if you clear out the cache of your browser.
138124

139-
Depending on your browser settings, the local storage of your browser
140-
may be cleared when it is restarted. Privacy Pass stores passes in local
141-
storage and so these will also be cleared. This behavior may also be
142-
observed if you clear out the cache of your browser.
125+
---
143126

144127
## Known Issues
145128

146-
### Extensions that modify user-agent or headers.
129+
#### Extensions that modify user-agent or headers
147130

148-
There is a [conflict resolution|https://developer.chrome.com/docs/extensions/reference/webRequest/#conflict-resolution] happening when more than one extension tries
149-
to modify the headers of a request. According to documentation,
150-
the more recent installed extension is the one that can update
151-
headers, while others will fail.
131+
There is a [conflict resolution](https://developer.chrome.com/docs/extensions/reference/webRequest/#conflict-resolution) happening when more than one extension tries to modify the headers of a request. According to documentation, the more recent installed extension is the one that can update headers, while others will fail.
152132

153-
Compounded to that, Cloudflare will ignore clearance cookies when the
154-
user-agent request does not match the one used when obtaining the
155-
cookie.
133+
Compounded to that, Cloudflare will ignore clearance cookies when the user-agent request does not match the one used when obtaining the cookie.
156134

157-
### hCaptcha support.
135+
#### hCaptcha support
158136

159-
As of version 3.x.x, support for hCaptcha tokens is paused. Only
160-
Cloudflare CAPTCHAs are supported by this extension.
137+
As of version 3.0.4, support for hCaptcha tokens has been re-enabled. Note: even though an hCaptcha captcha consumes one token from the extension, it is still possible that the user must solve an interactive captcha. This behaviour depends on the logic used by the captcha provider, and does not indicate a malfunctioning of the PrivacyPass extension.

public/icons/browser/chrome.png

9.28 KB
Loading

public/icons/browser/firefox.png

4.94 KB
Loading

0 commit comments

Comments
 (0)