Skip to content
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

Implement local signing of ethereum transactions inside the KM enclave. #252

Merged
merged 1 commit into from Dec 5, 2019

Conversation

@reuvenpo
Copy link
Member

reuvenpo commented Nov 21, 2019

This PR by @Cashmaney builds on @reuvenpo's PR #247 which adds local signing of keys stored in the KM configuration JSON file, and adds an option to sign all transactions inside the KM enclave, using keys generated and stored there.

@reuvenpo reuvenpo changed the title Implement local signing of ethereum transactions. Implement local signing of ethereum transactions inside the KM enclave. Nov 21, 2019
Copy link
Member Author

reuvenpo left a comment

Please revert all changes made to files in enigma-core/app and enigma-core/enclave

.dockerignore Outdated Show resolved Hide resolved
enigma-core/app/Cargo.toml Outdated Show resolved Hide resolved
enigma-crypto/src/asymmetric.rs Show resolved Hide resolved
enigma-crypto/src/lib.rs Outdated Show resolved Hide resolved
enigma-crypto/src/lib.rs Outdated Show resolved Hide resolved
enigma-principal/app/src/esgx/equote.rs Outdated Show resolved Hide resolved
enigma-principal/app/src/cli/app.rs Outdated Show resolved Hide resolved
enigma-principal/app/src/cli/app.rs Show resolved Hide resolved
enigma-principal/app/src/cli/app.rs Show resolved Hide resolved
enigma-crypto/src/lib.rs Show resolved Hide resolved
@reuvenpo reuvenpo force-pushed the i_hate_rust branch from 96330e6 to f83299c Nov 24, 2019
Copy link
Member Author

reuvenpo left a comment

Please merge the changes in #247 as well.
Please link to the PR in docker-environment that is associated with this PR.
After doing all your changes, run cargo check --all-targets and fix all errors warnings

enigma-crypto/src/lib.rs Show resolved Hide resolved
enigma-principal/app/src/cli/app.rs Outdated Show resolved Hide resolved
enigma-principal/app/src/cli/app.rs Outdated Show resolved Hide resolved
enigma-principal/app/src/cli/app.rs Outdated Show resolved Hide resolved
enigma-principal/app/src/cli/app.rs Outdated Show resolved Hide resolved
enigma-tools-u/Cargo.toml Outdated Show resolved Hide resolved
enigma-tools-u/src/lib.rs Outdated Show resolved Hide resolved
enigma-tools-u/src/web3_utils/contract_ext.rs Outdated Show resolved Hide resolved
enigma-tools-u/src/web3_utils/contract_ext.rs Outdated Show resolved Hide resolved
enigma-tools-u/src/web3_utils/contract_ext.rs Outdated Show resolved Hide resolved
enigma-tools-u/src/web3_utils/enigma_contract.rs Outdated Show resolved Hide resolved
enigma-tools-u/src/web3_utils/raw_transaction.rs Outdated Show resolved Hide resolved
Copy link
Member

AvishaiW left a comment

Looking good!

This commit is huge, as it is a squash of several week's worth of work
done by myself (@reuvenpo) and @Cashmaney. we do this because some of
the commits done by cashmaney were not signed/verified and the branch
configuration refused merging it all.

In this work we change the way ethereum functions are made against the
Enigma smart contract from the KM node, such that we no longer rely on
an unlocked account on the ethereum node we connect to, but rather sign
each request with a private key stored in the KM, which is associated
with a new ethereu address.

There are two possible ways of generating the keys and address for the KM node:

1. We generate a new keypair and address inside the SGX enclave, and expose the
   public key
2. We read the private key and address from the configuration.

One of these is necessarily chosen.
@reuvenpo reuvenpo force-pushed the i_hate_rust branch from 55a3931 to d35236b Dec 4, 2019
@Cashmaney Cashmaney merged commit be424ab into develop Dec 5, 2019
1 check passed
1 check passed
continuous-integration/drone/push Build is passing
Details
@Cashmaney Cashmaney deleted the i_hate_rust branch Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.