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

consider removing salt from name preordering and registration #37

Closed
shea256 opened this issue Jan 28, 2015 · 5 comments
Closed

consider removing salt from name preordering and registration #37

shea256 opened this issue Jan 28, 2015 · 5 comments

Comments

@shea256
Copy link
Contributor

shea256 commented Jan 28, 2015

Currently the preorder hash is calculated as follows: hash(name + salt + scriptPubKey)

Matt Corallo points out that hash(name + scriptPubKey) is equivalent if the scriptPubKey has never been used before.

This would simplify things AND would save us a bunch of space in the name registration transaction (about 16 bytes, I believe).

The only thing we'd have to do is make it clear that people shouldn't reuse pubkeys (they shouldn't be doing so anyway) unless they want to risk that someone will try to dictionary attack them.

@shea256
Copy link
Contributor Author

shea256 commented Jan 28, 2015

Realized that if we remove the salt, we could simplify the transactions by combining the register operation and the update operation.

The operation would be interpreted as a registration + update (in Namecoin this is called a NAME_FIRSTUPDATE) if the name was unregistered and there was a valid preorder operation. It would be interpreted as a regular update if it was registered AND owned by the scriptPubKey of the sender.

If we made this change, the new transaction formats of the operation types would be as follows:

Preorder

Outputs:

  1. nulldata = hash(name, scriptPubKey)
  2. name cost
  3. change

B. Register + Update

Outputs:

  1. nulldata = name, profile data hash
  2. change

C. Transfer

Outputs:

  1. nulldata = name
  2. TO: new name owner
  3. TO: new name admin
  4. change

D. Renewal

Outputs:

  1. nulldata = name
  2. name cost
  3. change

@muneeb-ali
Copy link
Member

The only thing we'd have to do is make it clear that people shouldn't reuse pubkeys (they shouldn't be doing so anyway) unless they want to risk that someone will try to dictionary attack them.

Meaning that they can't send transactions from the same BTC address? What if I want to own multiple names with one private key? Also, it's recommended, but I feel a lot of people would just ignore the recommendation and re-user public keys.

@shea256
Copy link
Contributor Author

shea256 commented Jan 28, 2015

  1. Why would they want to own multiple names with a single address? If they want to record a single private key, they can use an hierarchical deterministic private/public key set (the preferred method with wallets today).
  2. If they really insist on owning multiple names with the same address, they can register from separate addresses and then transfer the names to the same BTC address. OR they can take the risk of someone scanning them for hashes and trying to front-run them on name registrations. The system doesn't break down here, it just increases risk to determined attackers.
  3. Some people might ignore the guidelines if they are manually constructing the name operation transactions, but if they use our command line client or any other reference implementation software it would work like a normal bitcoin wallet, where it'd just generate new private keys each time.

@jcnelson
Copy link
Member

This has been addressed by requiring a preorder operation to use the address of an as-of-yet-unused key pair as the salt. The address will be revealed in the register operation, and used as the name's owning address. Any subsequent operations on the name must be sent from this address.

@shea256
Copy link
Contributor Author

shea256 commented Sep 16, 2015

👍

muneeb-ali added a commit that referenced this issue Jan 4, 2017
muneeb-ali added a commit that referenced this issue Jan 4, 2017
muneeb-ali added a commit that referenced this issue Jan 16, 2017
muneeb-ali added a commit that referenced this issue Jan 16, 2017
destenson pushed a commit to destenson/blockstack--blockstack-core that referenced this issue Aug 11, 2017
destenson pushed a commit to destenson/blockstack--blockstack-core that referenced this issue Aug 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants