diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..56be9c4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "core/twopc/circuits"] + path = core/twopc/circuits + url = https://github.com/tlsnotary/circuits diff --git a/README b/README index 8abad2e..ad082c9 100644 --- a/README +++ b/README @@ -1,22 +1,15 @@ ----------------------------------------------------------------- -UPDATE: Jul 2021 -A flaw in PageSigner has been brought to our attention which allows to create forged proofs under certain conditions. -We are working on a mitigation. +PageSigner - a cryptographically secure webpage screenshot tool. -Read more here: -https://github.com/tlsnotary/pagesigner/issues/46 ----------------------------------------------------------------- +PageSigner is a Chromium extension implementing a client for the TLSNotary protocol. + +You can install PageSigner from Chrome webstore: + +https://chrome.google.com/webstore/detail/pagesigner/abblaaeblmamacadkdmnejjikbdkemcj -PageSigner works with many Chromium-based browsers (e.g. Chromium, Vivaldi, Brave, Google Chrome) +Or you can install it by cloning this repo with: -You can load PageSigner from the source files of this repo this way: - -1. go to chrome://extensions and Enable "Developer mode" - -2. Click "Load unpacked" - -3. Navigate inside pagesigner's top folder and click Open. - ------ -Firefox addon creation is not supported anymore due to missing API in Firefox. +- git clone --recurse-submodules https://github.com/tlsnotary/pagesigner +- go to chrome://extensions and Enable "Developer mode" +- Click "Load unpacked" +- Navigate inside pagesigner's top folder and click Open. diff --git a/background.html b/background.html new file mode 100644 index 0000000..1a7a22f --- /dev/null +++ b/background.html @@ -0,0 +1,15 @@ + +
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/core/FirstTimeSetup.js b/core/FirstTimeSetup.js new file mode 100644 index 0000000..bff5ea3 --- /dev/null +++ b/core/FirstTimeSetup.js @@ -0,0 +1,144 @@ +import {wait} from './utils.js'; + +// class FakeFS imitates node.js's fs.readFileSync() by +// reading the files in advance and outputting their content when readFileSync() is called +class FakeFS{ + constructor(){ + this.fileList = {}; // {fileName:>>0?b+1|0:b;P=M;M=c+M|0;b=b+S|0;b=M>>>0
>>0?b+1|0:b;S=M;M=a- -64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