-
Notifications
You must be signed in to change notification settings - Fork 78
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
Seraphis Address Schemes #92
Comments
Unifying to just one type of address should be a design goal. The UX and DX gets exponentially worse with each additional address type. |
Regarding Janus, do I read this correctly: The question is whether we judge the Janus attack to be serious enough to merit even longer addresses than today, as a sensible choice? |
Yes, but part of the question is also if we want one of the Janus address schemes, due to their basic utility compared to plain schemes (I think Janus B and C are big improvements, since they allow third party scanning without leaking amounts). |
Thanks, I indeed overlooked the "amounts visible or hidden" dimension until now. Interesting. |
For Janus C Tier 1, "view received (no amounts), view spent" does that mean spent amounts are visible? |
No... view spent just means 'view what outputs have been spent' (i.e. compute key images for received outputs to check if they exist in the ledger). |
As you said, Janus B and C allow for third party scanning without leaking amounts, which I think makes services like MyMonero way more useful. What would the UX differences be between B and C? As in, in what situation would it be useful for services like MyMonero to know which outputs are spent and presumably when they are spent? |
If a scanning service can identify spent outputs, then your personal wallet doesn't have to do any scanning. However, this has privacy costs, since the service will learn more information about your transaction flows (i.e. if the service became large enough, then it could basically eliminate the utility of ring signatures). |
On the other hand (I forgot...), a scanning service that can see all your received outputs can also infer most/all of your spent outputs. The reason is, most/all of the transactions you make will A) have 1+ of your owned outputs in each input's ring members, B) send a change output to you. Since a scanning service can identify most spent outputs, Janus C might be simply better than Janus B. With Janus B, identifying spent outputs with Tier 1 is not reliable enough to be provided as a feature of a scanning service, but it is reliable enough to degrade privacy. With Janus C, the UX of scanning improves, while the privacy costs stay the same. Caveat: If membership proofs referenced the entire ledger, instead of a small ring, then inferring spent outputs would not work as well (if at all). Since achieving membership proofs on that level is a big goal of privacy-coin research, a 'forward-looking' designer might favor Janus B over Janus C. This way, if ideal membership proofs are ever implemented, the privacy dynamic around scanning is optimized. |
I haven't studied Seraphis in detail, but I'm wondering if there could also be another option:
A Tier 1 wallet would only be able to identify a I put a question mark next to Janus because I'm not sure if this scheme can also mitigate Janus without some additional TX data. |
@tevador yes I think it is possible. I will add this to the table. It would cost +1 in the address size compared to other schemes. |
Is it possible to devise an addresses scheme that won't have to be changed for a long time, e.g. not even with further ring size increases like Arcturus? Requiring everyone who wants to receive to generate a new address is a big pain point, breaking numerous use cases, both known and unknown. |
Why would any of the above schemes need to be changed, once implemented? |
@UkoeHB I don't know in advance. I'm following the logic that van Saberhagen didn't expect it either that it will need to be changed. |
Likewise, there is no way for any of us to know in advance what the future will bring. That being said, Seraphis is designed so membership proofs (e.g. ring signatures) are almost entirely independent of addressing. You can easily change the membership proof type without risking changes to the address scheme. In that sense, Seraphis is far more robust against address changes than CryptoNote. |
I think Janus detection should be a priority. I am leery of enabling 3rd party scanning, as with Janus B & C. 99% of people will allow 3rd party services to scan their entire wallets. The rest of us will not have much anon set, and no way to know if our anon set is any good. I lean towards Janus A. |
@xxmeta I think it is unlikely we can prevent people from offering scanning services without completely unifying all three wallet tiers. Why do you favor Janus A over Janus B/C? Janus B's Tier 1 is significantly weaker than Janus A's Tier 1, and I think Tier 1 is what scanning services would use. |
I agree with you now about the 3rd party service risk. In light of that, Janus A & B are similar to me. I think the Janus attack can still be practically applied if users use a Tier1 key for fast sync times, so maybe I prefer Janus A for that reason, but the choice is not obvious. Janus C is less useful I think. I can see many uses for a Tier 1 key that can't view spends, but Janus C doesn't allow that. |
@UkoeHB continuing the offline-tx discussion from gitlab: so Serpahis view-only wallets would eliminate the need to import key images and cut the process down to 3 steps?
|
@r4v3r23 yes that sounds right to me. 1 -> 2 and 2 -> 3 require communication passes to and then from the offline device. |
yes Seraphis simplifies the process so that it can be done easily between mobile devices via QR codes |
There is no doubt that Seraphis will bring quite large user-facing changes regardless of which exact addressing scheme is used. It may be worthwhile to take this opportunity to rethink the paradigm and move away from addresses completely. I understand that this might be too radical and it's unlikely to be implemented in Monero, but I'm going to discribe it anyways in case someone cares. I will preface this with an explaination why addresses are bad, then I will present an alternative and describe how it works from the user's point of view. The cryptographic details are at the end. The original visionSatoshi Nakamoto originally thought of addresses as "account numbers" and they were meant to be handled and compared by humans directly (see this comment in Bitcoin 0.1). This was also the reason why Bitcoin addresses were 160-bit hashes - to be as short as possible. A typical v1 Bitcoin address is 34 characters long, which is coincidentally the maximum length an IBAN can have. Problems of addressesNowadays cryptocurrencies are not used just by enthusiasts and the inherited paradigm of base58-encoded account numbers is, in my opinion, a UX nightmare. Especially for Monero, the original vision clearly fails. 100+ character strings encoding 2-3 public keys can hardly be considered as identifiers anymore. I'd wager that the vast majority of crypto transfers involve copy pasting meaningless strings without any feedback to the user. The main issues of this are:
OpenAlias is not the answerSomeone might argue that OpenAlias is a working alternative to addresses. However, I don't think it can solve the problem for several reasons:
Possible solutionEverytime a Monero address is shared, there is an implicit expectation of a payment. It may either be a donation without a specific amount and specific sender, or an exact amount as a payment for goods or services. The payee is clearly defined in both cases. Therefore we can replace addresses with payment requests. A payment request encapsulates all the information the payer's software needs to complete the payment:
The main difference from the existing Monero payment url scheme is that each payment request is authenticated with a signature. The way a payment request is transferred to the wallet software can be entirely opaque to the user. There is no need to examine or compare any cryptographic information (with a single exception described in the next section). Here are some ways how the actual data transfer can happen:
All of these can easily support transferring a few hundred bytes needed for a payment request. Authenticating the recipientOnce the payment request reaches the payer's wallet software, there are 4 options:
If the signature of the payment request matches, the user interface should display a prominent symbol, like a check mark: ✔. This is the same paradigm as the padlock symbol for HTTPS and is familiar to users. (As a side note, the signature also helps with dispute resolution. The current payment proofs cannot resolve the case when Bob claims the address Alice made a payment to is not his.) User storiesOnline shopping
Donation
Paying a friend
Paying an anonymous user
Under the hoodThis "address-less" scheme is compatible with Seraphis and behaves similar to the "Janus D" option with an extra Tier 1 capability:
WalletA wallet is defined by two private keys There is an associated public spend key AccountsEach wallet can support up to 264 different identities, here called "accounts". Each account index The associated public authentication key Each account has one public view key Payment requestsEach account can generate up to 264 different payments requests. Each payment request is defined by two indices The payment request contains the following two public keys:
Note that the second key doesn't depend on the index Additionally, each payment request contains a Schnorr signature
Sending fundsThe sender, when presented with a payment request, first needs to recover the public authentication key
In the last case, the key should be validated manually. The validation code is simply The output is constructed as follows:
Receiving funds
Wallet tiersTier 1 wallet for account Tier 2 wallet knows the public key Tier 3 knows both private keys Payment IDsPayment IDs are not needed in this protocol and can be removed entirely. This protocol can simulate both of the currently used payment schemes in Monero:
A combination of these two approaches is also possible. Edits:
|
@tevador I like payment requests, but if LN has taught us anything its that people want both payment requests AND a short, offline string they can pass around (lnurl). Is there anything fundamental in Seraphis that prevents both? |
@fluffypony it is possible to do both afaict. It is just a hassle from the implementation side, the more bulky the address scheme gets. |
@UkoeHB can't be much more cumbersome than 95-character long Monero addresses, or 100+ character long integrated addresses;) |
@tevador The main issue I see with passing around URLs is the increase risks of phishing attacks. The crypto space has spent a lot of resources and a lot of money lost to learn lessons in that URLs are not the best way to authorize funds moving from wallet to wallet. There has to be some way for a user to ensure that 1) they are sending the funds to the correct recipient and 2) that the recipient can check that they are indeed receiving the right funds from the correct sender. |
@tevador a few questions for you:
|
I realized that there is not much practical difference between Janus B and Janus E, so the additional key pair just for view tags is pointless. However, by redefining the private key functions a bit, another scheme can be created with just 3 public keys needed for sending and Tier 1 lower than Janus B (but still useful). I have integrated it with my proposal for authenticated addresses and made it backwards compatible with the existing division into accounts and subaddresses. For merchant wallets, it supports 5 access tiers. Available as a gist here (work in progress!). |
Seems like this conversation got a little derailed into specific pros/cons with some of the implementations. From my perspective, @fluffypony's point that people want both requests and strings is the most important. So long as we aren't breaking the string option, I don't see an issue with supporting another route at least in theory. So long as the option is remotely sensible, people will make their own choices to build on that method or not. |
Plain C or Janus A/D are good by me because view wallet won't require additional work to view spends. Receiving Monero should be easy and shouldn't require gotchas like "you need to specify a memo" especially if it's uncertain whether wallet's will create default and possibly random memos for each address generated. So go with Plain C if the official wallet, cake wallet, and monerju will implement default memos (should be a setting on by default). I'm just one person saying this so I doubt default memos would be a feature actually included. So then it's subjectively better to go with Janus A/D over Plain C. Pick Janus A if it's important to have a wallet that can view received payments but not spends. Considering Janus A is similar to the current model, Janus A should be the favoured schema over Janus D. As for this anti-address sentiment, there are issues with the official wallet GUI that prevent me from sending monero by simply clicking a monero: link. This is kind of irrelevant so I won't elaborate. |
A misleading claim about Janus B (Jamtis) has been going around. ClaimIf a malicious third party obtains a user's seraphis view-balance key, then they will have greater insight into that user's transaction history than if they had a cryptonote view key. Technically misleadingJamtis view-balance keys are only superficially more powerful than cryptonote view keys with any existing or proposed protocol implementation (see caveat). A cryptonote view key can identify the full balance for most users (with 95%+ accuracy) because there is a powerful heuristic to identify spent funds. Whenever you make a transaction, each of your tx inputs will have at least one ring member from your storage of owned funds. Moreover, at least one of the tx outputs will be owned by you (the change output). Most of the txs with outputs sent to you by other people won't satisfy both of those conditions. Therefore, the tx inputs that match with your owned output storage in those kinds of txs were very likely spent by you. Caveat: This heuristic would no longer work if membership proofs had extremely large reference sets (e.g. ring sizes). This means that an upgrade from small to massive reference sets would have a different privacy impact when comparing jamtis/cryptonote view-only wallets. This DOES NOT mean the privacy impact would be in any way a regression compared to our current situation. Advantages of Jamtis
|
In order to make things maybe a little clearer for every one (if I judge by some of the drama in Reddit about Seraphis annihilating all of Monero's privacy), maybe a table with the information made accessible to each of the various types of keys would be good. The table could list things like received outputs, received amounts, spent outputs, spent amounts, sending address, recipient address, etc with status such as Yes, No, Optional, N/A. |
As the new address schemes are presented, it seems that the notions of "account" and "subaddresses" will be gone altogether. The current Wallet RPC interface has many methods which allow to act only on a specific account (via the specification of an account_index), and this possibility is used extensively to segregate funds within a single wallet. Given an instance of the rpc wallet can only open a single wallet, this makes it a useful way to manage funds for various users. I don't have the details of how various exchanges handle deposit addresses but I am pretty sure this is how they do it for example. And I have other use cases in mind too where funds can be sent to multiple sub-addresses of a single account, with several accounts being managed to segregate users all within a single wallet. How should one go with reproducing something similar with Seraphis/Jamtis? Should the RPC interface be modified to allow the specification of a range of subaddresses instead of an account, or maybe a list of ranges? |
The functionality of accounts will be preserved. There are currently 4 options being discussed how to implement the feature. |
Seraphis Address Schemes
Seraphis is not compatible with CryptoNote addressing, due to a different key image design compared to CryptoNote. However, it is compatible with a variety of interesting addressing schemes. In this issue I'd like to present those schemes, so discussion can have a point of reference.
To implement Seraphis in Monero, or another existing CryptoNote-derived cryptocurrency, it would be necessary for all users to generate new public addresses from their private keys (old public addresses would become unusable). They would not need new wallets, just addresses.
The Schemes
Here are the adddress scheme variants. The 'tiers' are levels of wallet permissions. A Tier 3 wallet can always do everything, while a Tier 2 wallet can never spend funds. A 3-key address would be ~50% longer than existing addresses. Note that 'Janus' refers to the ability to detect a Janus attack.
2^-T
blockchain subset that contains all of the wallet's actual outputs (here T is the size of the view tag). This would preserve more privacy when using an external scanning service at the cost of more computation for the client to filter out the false positive outputs. The size of the view tag T should be selected as a compromise between anonymity and the amount of data to be downloaded.Finally, I want to point out that Tier 2 always (except for Plain A) has 'full-view' authority. The main difference between schemes lies in Tier 1 capabilities.
P.S.
Moving to a new address scheme means it is possible to deprecate normal addresses entirely (i.e. only use subaddresses). This would allow a uniform address format, which would improve UX. Users could use their 'index 0' subaddress in place of their current normal address (or some similar convention).
Deprecating normal addresses is not required, it is just an option to consider.
The text was updated successfully, but these errors were encountered: