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

Encryption manager #1127

Closed
wants to merge 29 commits into from
Closed

Encryption manager #1127

wants to merge 29 commits into from

Conversation

molnard
Copy link
Collaborator

@molnard molnard commented Jan 28, 2019

antecedent: #1122
fixes: #1121

Prerequisites

@lontivero
Copy link
Collaborator

@molnard the interface for Encrypt/Decript is the following:

class Pubkey
public string Encrypt(string message)
class Key
public string Decrypt(string message)

You could create two extension methods that do nothing and move forward with them because the interface will not change.

1 similar comment
@lontivero
Copy link
Collaborator

@molnard the interface for Encrypt/Decript is the following:

class Pubkey
public string Encrypt(string message)
class Key
public string Decrypt(string message)

You could create two extension methods that do nothing and move forward with them because the interface will not change.

@NicolasDorier
Copy link
Collaborator

Encrypt has been released in the last version of NBitcoin

@molnard
Copy link
Collaborator Author

molnard commented Feb 1, 2019

Specification

  1. Can only open Encryption manager if a wallet is loaded (check point 4). Multi wallet operation is problematic because of the password and UI over complexity
  2. UI structure is similar to WalletManager
  3. Sign, Verify, Encrypt, Decrypt on separate tabs
  4. The Tabs can be separated in the following way: Sign and Encrypt wallet dependent Verify and Decrypt wallet independent

@lontivero
Copy link
Collaborator

Btw, I verified the compatibility with Electrum both in NBitcoin unit test and performing a real end-to-end manual test by encrypting with Electrum and decrypting with Wasabi and in the other way too (Encrypting with Wasabi and decrypting with Electrum). It is 100% compatible. You can check the "Electrum compatibility check" checkbox.

@molnard
Copy link
Collaborator Author

molnard commented Feb 7, 2019

Should add #1145 after merged avoiding conflict in receive tab

@molnard
Copy link
Collaborator Author

molnard commented Feb 8, 2019

Message authenticity verified

As far as I can see. Warning messages always on the bottom. Success messages always nearby the function. I will leave this as it is now.

@lontivero
Copy link
Collaborator

@molnard @danwalmsley I tried to make the multiline textboxes to fill all the available space with no luck. Is it possible? Did you already try?

@molnard
Copy link
Collaborator Author

molnard commented Feb 8, 2019

@molnard @danwalmsley I tried to make the multiline textboxes to fill all the available space with no luck. Is it possible? Did you already try?

no it is not possible. It will only grow if the text is big enough.

@molnard
Copy link
Collaborator Author

molnard commented Feb 8, 2019

The same functionality should be added to the Receive table address list IMO. This is because users could create new addresses with labels such as "for encrypting, David, Adam" specially created by signing/encryption.

Agree, but it must not be prominent, because I suspect nobody will use it and it'll definitely add to the complexity and confuse people. In fact I just met with a OG Bitcoiner, who's was confused by how to use Wasabi, so we may want to pay even more attention to UX than we did previously.

We can simplify the right click menu by rearranging the items like this:

  • Copy address
  • Dequeue coin
  • Encrypt manager
    • Sign message
    • Verify message
    • Encrypt message
    • Decrypt message

Do this?

@molnard molnard changed the title [WIP] Encryption manager Encryption manager Feb 9, 2019
@nopara73
Copy link
Contributor

nopara73 commented Feb 9, 2019

@molnard Let's go through this whole PR together when I'm back in Hungary.

@nopara73
Copy link
Contributor

There was a new BIP proposal today by @cgilliard on the mailing list in the topic: https://github.com/cgilliard/BIP/blob/master/README.md

It'd be wise to review it for this PR.

@lontivero
Copy link
Collaborator

lontivero commented Feb 17, 2019

That bip describes what is already known as compact signatures (the ones used by bitcoin and by wasabi to proof inputs ownership) but with additional bits in the recId to let us know what keyhash to use in the verification. I will review it when i have my laptop in front.

Sent from my Moto G(4) using FastHub

@cgilliard
Copy link

cgilliard commented Feb 17, 2019 via email

@luke-jr
Copy link

luke-jr commented Feb 18, 2019

It's not a good idea to use/extend the old message signing scheme.

Read more here bitcoin/bitcoin#10542

@molnard
Copy link
Collaborator Author

molnard commented Feb 18, 2019

By the way we have Electrum compatibility currently. I will take a look at BIP but any change can harm this.

@lontivero
Copy link
Collaborator

lontivero commented Feb 18, 2019

@molnard this new BIP will break a lot of compatibility, right. Electrum explicitly checks the recId is in the range [0, 3) so, any signature following this BIP using an address other than p2pkh will be invalid for Electrum. Moreover, signatures following this BIP will break NBitcoin key extraction because of how it is implemented.

The PR seems to be for compatibility with Ledger but we really don't know if we are going to see an standard or, for the contrary, we are going to see even more incompatibility.

My recommendation is moving forward with what we have and watch how the BIP is received and how much traction/adoption it has in the coming year.

@nopara73
Copy link
Contributor

I agree with @luke-jr and I've been screaming from the start that it'll go much deeper than it seemed at the start. However I also agree with @lontivero, we put way too much work into it, so we should finish it now. I also agree with @lontivero that our primary concern should be compatibility with Electrum and other wallets.

@molnard
Copy link
Collaborator Author

molnard commented Mar 18, 2019

This can be closed, continued: #1241

@molnard molnard closed this Mar 27, 2019
@nopara73 nopara73 mentioned this pull request Jul 28, 2019
@molnard molnard deleted the encmanager branch October 21, 2019 15:39
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

Successfully merging this pull request may close these issues.

Add Encryption Manager
6 participants