Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add private user invitation system. This system works like so:
Alice already has an account on Bloom
Alice generates a secret value and computes
add publishes this to the smart contract via
createInvite
Alice shares the secret value with Bob out-of-band (not via the
blockchain).
Bob computes
sha3(secret + "/" + bobAddress)
and calls the functionbeginAcceptInvite
After 4 confirmations, Bob calls
at which point he should have an account
This system is designed to allow Alice to invite Bob without knowing his
Ethereum address. The secret makes sure that only he is able to claim
the invite. The separate
beginAcceptInvite
andfinishAcceptInvite
functions are to avoid an attacker replaying accepting an invite but
with their own account. They can't replay the
beginAcceptInvite
function because the hashed value does not contain an address they
control. They could observe the
finishAcceptInvite
call and replayboth the begin and finish functions, but the contract requires that they
happen at least 5 blocks apart. This delay gives the person accepting
the invite a secure window of time where no one else can replay and
steal their invite.
There are still small risks that could come from user error that we should be able to avoid via the UI. For example, if I reveal the secret in a transaction that fails or is submitted with a really low gas price, then an attacker could possibly get their transaction in 5 blocks later if I don't get a successful transaction processed before that.