-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor/seed protection #1500
Refactor/seed protection #1500
Conversation
main-process/packages/blockchain-wallet-v4-frontend/package.json
Outdated
Show resolved
Hide resolved
@tony-blockchain asked to see some examples of the inter-realm encoding. Here's the handshake of the two realms exchanging their exports with each other: [
"object",
[
["axios", ["function", { "key": "1sz07pq", "length": 1 }]],
["dispatch", ["function", { "key": "y3qkt9", "length": 1 }]]
]
]
["object", [["dispatch", ["function", { "key": "1tzy5g1", "length": 1 }]]]] Notice the keys are randomly generated so that a compromised realm couldn't guess the keys in the other. Here's an example of a function call. This is calling the Redux [
"functionApply",
{
"args": ["array", [["object", [["type", ["string", "AUTHENTICATE"]]]]]],
"functionKey": "oqxn13",
"returnValueKey": "rszz94"
}
] Here's the result of the function application being returned: ["functionReturn", { "returnValueKey": "rszz94", "value": ["number", 0] }] |
6b16eaf
to
c55bf21
Compare
c55bf21
to
3afbec6
Compare
3afbec6
to
4dba6cb
Compare
4dba6cb
to
0412030
Compare
0412030
to
f22a528
Compare
f22a528
to
1d9443d
Compare
1d9443d
to
b1558d4
Compare
08131fe
to
c5145af
Compare
c5145af
to
c9e21b7
Compare
c9e21b7
to
93cc869
Compare
93cc869
to
ac4df07
Compare
ac4df07
to
ea56c9e
Compare
ea56c9e
to
7837a77
Compare
7837a77
to
a270fe9
Compare
221cab9
to
016f72a
Compare
af82321
to
def8476
Compare
21e8d56
to
6401225
Compare
1ea4147
to
aa7ba79
Compare
d9c1ee5
to
1205342
Compare
aa678b4
to
5a3524f
Compare
e9228e1
to
0ba6537
Compare
3e9852c
to
0d1c098
Compare
Introduction
This PR is both a proof of concept and first step toward protecting the backup phrase. It is presented here for review but is not intended to be merged (see below for why).
To protect the backup phrase I divided the Web Wallet into two separate applications: one trusted more (the "Root Document") and the other trusted less (the "Main Process"). The Main Process is an
<iframe>
within the Root Document that takes up the whole viewport and is served locally via port 8082. The two applications communicate with each other viapostMessage
.To save development time I created each application from a complete copy of the current Web Wallet and then made modifications to them. The two applications are mostly the same but over time will become more differentiated as I remove code that's no longer relevant to each application.
Notes
main-process
directory is not withinpackages
because Yarn doesn't support nested workspaces.web-microkernel
) because it will be moved into its own repository in the future.Use
Install new dependencies:
Start the Main Process on port 8082:
Once the Main Process has started, open a second terminal in the top level of the repository and start the Root Document application on port 8080:
Questions and feedback are highly encouraged.