Decred 백서

Decred

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 12쪽 중 10쪽

with other signals could reveal your identity. Trade-offs of Reusing vs Not Reusing Addresses For privacy the best practice is to not reuse an address ever. A cryptocurrency address can be thought of as a cryptocurrency invoice instead. The term “address” does not mean, that it was designed to reuse it, like one would do with a bank account number for example. A privacy conscious user will use a newly generated address for every single transaction, and never reuse an address unless absolutely necessary. On the other hand, there may be situations where address reuse may be preferred, or even necessary. The Decred Treasury is a good example of this. Transparency and auditability are more important than privacy in the context of the treasury. Change Address If only a fraction of an Unspent Transaction Output ( UTXO ) is spent, a change output will be generated. This can potentially lead to a compromise of privacy. For example, the change UTXO could be merged with another UTXO in a future transaction, thus creating a signal that both of the UTXOs belong to the same user. Wallet software doesn’t typically expose information about individual UTXOs, for example the fact that multiple UTXOs might be spent in a single transaction. To ensure maximum privacy, you should exactly know which UTXOs are being spent in each transaction. This article is a good introduction to privacy preserving coin control. Avoid Identification when Acquiring Cryptocurrencies Try to avoid acquiring cryptocurrencies from websites that require KYC/AML, or any other means of identification. Be aware that centralized exchanges can be hacked, potentially exposing the collected information to the hacker. It’s also possible that at some point an oppressive government will seize the collected information. Cryptocurrency ATMs can be equipped with cameras, fingerprint scanners, or there could be cameras nearby the ATM which could reveal your identity. Avoid Leaving Identifiers in Public Places Many times this is something physical, for example leaving behind a printed QR code somewhere, writing your nickname or real name on a piece of paper. Your name can be inprinted on the next page of the sticky notes stack, for example. Be careful not to leave your phone or computer unlocked in a public place with important information displayed on screen. Using the Lightning Network for Privacy Privacy attacks like common-input-ownership heuristic , address reuse and change address detection fundamentally don’t work on any off-chain transaction technology such as The Lightning Network. One possible downside is that the operator of a lightning node could keep logs of the pseudonymous identifiers and the balances of the network participants. The node operator could later sell this information to governments or corporations. Hiding Cryptocurrency Usage Itself Use VPN or Tor. Don’t link your VPN or Tor usage with social networks, or with any other software or website that might identify you. Keep in mind that cookies exist. Use a browser profile that is dedicated to your crypto-related activities only. Quit all programs that you don’t need. Download some random data, so the size of your downloaded data won’t be exactly blockchain-sized. System Security The privacy techniques above may not provide any benefit at all if the security of your machine is compromised. See the General Security guide for more information on how to keep your machine and your operating system secure. More Information Coin Control Merge Avoidance Bitcoin Wiki - Privacy Bitcoin Transaction Graph Analysis (University paper) ## /privacy/cspp/overview CoinShuffle++ What is CoinShuffle++ and how does it work? CoinShuffle++ (CSPP) is a mixing protocol used to create Decred CoinJoin transactions. CSPP is a non-custodial process to obfuscate ownership of DCR coins, where the output addresses are anonymized via a mixnet. When using CSPP, the outputs are fully anonymized, none of the peers or the server can link outputs and inputs. Decred’s implementation is based on the CoinShuffle++ protocol from “P2P Mixing and Unlinkable Bitcoin Transactions” by Ruffing, Moreno-Sanchez and Kate. It uses DiceMix Light , a faster iteration by Ruffing on the DiceMix process proposed in the CoinShuffle++ paper. This process allows for the creation of untraceable transactions, but the amounts are still publicly visible. To make the outputs indistinguishable, each mix must have a fixed denomination. CoinShuffle++ does a fine job of anonymizing the output addresses, but if the change is not handled with care, it can link mixed and unmixed UTXOs. In many cases, change outputs can be linked to their inputs by doing a partial sum analysis. To deal with this threat, change from mixes flows to a separate wallet account, where it is then mixed into smaller denominations until the change is less than the smallest mixer denomination. Mixes occur episodically in epochs , with the mainnet epoch set to 15 minutes. Motivation Decred has primarily focused on governance since its launch in February 2016. While privacy is certainly a separate subdomain from governance within the space, privacy connects very directly to the core tenets of Decred: Security, Adaptability, and Sustainability. By giving users added privacy, Decred enhances both their and it’s financial security. It makes the project substantially more resilient against malicious actors, magnifying its sustainability in the longer term. Rather than take the routes established by privacy-focused projects, e.g. ring signatures, zk-SNARKs, or Mimblewimble, developers decided to take a mixnet approach, where they have integrated the mixnet with Decred’s Proof-of-Stake (“PoS”) governance system. Implementation of the mixnet began as a search for a different privacy solution that would not break pruning , the capability of discarding historical transactions from full nodes. Other implementations enable higher privacy, but break pruning, making it harder to replicate the blockchain and reducing its security. Beyond the concern about pruning, other implementations carry moderate or high complexity, making code audits costly and broadening the attack surface. TumbleBit, from “TumbleBit: An Untrusted Bitcoin-Compatible Anonymous Payment Hub” , was the first option. But the development team noticed that the mixing server would be vulnerable to Denial-of-Service (‘DoS’) attacks, with the countermeasures adding more complexity. Despite not integrating the TumbleBit code into Decred, the code has been released for public benefit. The team ended up pivoting to CoinShuffle++, a simpler and more DoS-resistant solution. Why does it use a centralized server? The original CoinShuffle++ protocol uses a P2P approach to coin mixing, while it requires a server to handle communication, it does not expect it to do any computation. CSPP’s threat model, the variety of attacks it takes into account, includes the scenario where the attacker owns the server, hosts the service and handles communication. CSPP ensures anonymity even while trying to join a session hosted by a malicious server. This enables the use of a client-server architecture. It is a common approach to networks and it has three benefits: enhanced privacy, simplicity and mixing times. Decred’s first implementation uses a centralized server as a coordination point and a optimized polynomial factorization solver (to improve mixing times). It enhances simplicity by having a single authority responsible for timeouts and advancing the protocol states. Having a single outbound connection also means peers do not rely on NAT or UDP hole-punching to communicate with each other. Depending on a P2P network would mean every peer could see other’s public IP, which would compromise privacy. Users could run their own servers, but they would have limited utility because the goal is to get as many peers as possible in each mix. Handling malicious peers The protocol handles collisions and malicious peers using a privacy-preserving redundant messaging step. In its worst case scenario, it requires 4+2f communication rounds for f malicious peers. To achieve this, each peer uses a freshly generated bitstring (verification key). After a failed protocol run, peers can reveal session secrets to expose and exclude malicious disruptors, and move on with the mix. If a dishonest peer is excluded from the mix, all secrets so far will be discarded and new ones are generated. Benefits The implementation of the CSPP mixnet did not require changing the consensus rules. It is an opt-in implementation that obfuscates ownership of DCR coins with out requiring any modifications to the consensus rules. Other privacy implementations like zk-SNARKS and Ring Signatures provide substantial privacy, but impede the network from dropping historical transactions from their full nodes, a process also known as pruning. The CSPP mixnet does not have this effect on the blockchain and pruning remains possible. Pruning the blockchain reduces its size, which makes it easier to download and replicate. At the same time, the CSPP mixnet presents a much simpler solution that is based on common cryptographic primitives and finite field arithmetic. It is simpler and more DoS resistant than TumbleBit , which was initially planned and developed,but dropped because of its vulnerability to Denial-of-Service attacks. Limitations The current implementation has several limitations. Mainly the use of a centralized server, to which the CoinJoin leaks which inputs and change addresses belong to each peer, and the lack of support for Voting Service Providers and regular transactions. The anonymity provided by CoinShuffle++ can be lost if wallet addresses are reused, or if change outputs are not handled correctly. It is imperative that addresses are never reused and that extended public keys of mixed and voting accounts are not revealed to other parties. Further Information For more technical information about CoinShuffle++, visit Decred’s cspp Github repository. You can also read about CoinShuffle++ on Decred’s blog . ## /privacy/cspp/how-to-cspp How to use CoinShuffle++ To use CSPP, several new options must be set in dcrwallet . Users must create two new accounts, mixed and unmixed . Setting up a mixed Ticket Buyer Mixed ticket buying uses CoinShuffle++ to anonymize outputs of split transactions, which are spent to create ticket purchases. Voting rights and commitment outputs must be assigned to unused and unique addresses of accounts and not single addresses to prevent address reusage. Solo stakers are recommended to use two wallets to separate ticket buying and voting, due to requirements of the voting wallet being always unlocked and highly available. An extended public key must be exported from the voting wallet (using getmasterpubkey ) and imported by the ticket buying wallet (using importxpub ). Use the following options for a mainnet mixed solo ticket buyer which continues to buy more tickets from the mixed account as outputs mature: $ dcrwallet --mixing --enableticketbuyer --purchaseaccount=mixed \ --mixedaccount=mixed/1 --changeaccount=unmixed \ --ticketbuyer.votingaccount=voting --mixchange Transitioning from an unmixed Ticket Buyer Solo stakers wishing to convert from an unmixed solo ticket buying setup to a mixed buyer can use two ticket buying wallets simultaneously, with a setup to slowly mix funds from the existing buyer (buyer1) to the new mixed buyer (buyer2). Each ticket buyer must be provisioned with a unique voting xpub: voter$ dcrctl --wallet createnewaccount voting1 voter$ dcrctl --wallet createnewaccount voting2 voter$ dcrctl --wallet getmasterpubkey voting1 voting1-xpub voter$ dcrctl --wallet getmasterpubkey voting2 voting2-xpub buyer1$ dcrctl --wallet importxpub voting voting1-xpub buyer2$ dcrctl --wallet importxpub voting voting2-xpub In addition, the mixed account xpub of the mixed ticket buyer must be imported by buyer1: buyer2$ dcrctl --wallet getmasterpubkey mixed mixed-xpub buyer1$ dcrctl --wallet importxpub mixed mixed-xpub The mixed ticket buying wallet may use the setup from the previous section. The old wallet must be configured slightly differently: buyer1$ dcrwallet --mixing \ --enableticketbuyer --purchaseaccount=default --mixedaccount=mixed/0 \ --ticketsplitaccount=default --changeaccount=unmixed \ --ticketbuyer.votingaccount=voting --mixchange Note these differences: --mixedaccount=mixed/0 - The unmixed wallet must use the external (not internal) branch of the mixed account to avoid address reuseage problems arising from two wallets simultaneously deriving from the same branch. --ticketsplitaccount=default - Unless this is set, the mixed account and branch will be used derive a fresh address for the mix. However, this would create issues when publishing a ticket, because the unmixed wallet does not have the required private key (mixed account is an imported xpub). This option must be set to a derived account with private keys, such as the purchasing source account. It may take large stakeholders up to the full ticket expiration of roughly 4.7 months to completely migrate to the new mixed wallet. Non-stakeholders can set these options, leaving out purchaseaccount , and participate in the mixing without buying tickets. To receive payments, generate new addresses from the unmixed account, then those payments will be mixed into the mixed account. Note that the mixing process requires the wallet being unlocked for longer periods of time, so that it can participate in a mix, which occurs every 15 minutes. Ticketbuyer wallets run unlocked already, but non-staking wallets will need to be left unlocked long enough to complete their mixes. Non-staking and change mixing Change outputs in the CoinJoin are not anonymous, and can easily be traced back to the set of inputs used during the mix. A dedicated unmixed account for CoinShuffle++ change is required, and it is not safe to spend change with other outputs in any transaction, including other mixes. To remedy this, dcrwallet provides a change mixing feature to create smaller mixed outputs of standard values and never submitting more than a single change output to the mixer in a request. These features are enabled with the following config: $ dcrwallet --mixing \ --mixedaccount=mixed/1 --changeaccount=unmixed --mixchange Alternatively, the mixaccount JSON-RPC may be used instead of the --mixchange option to mix single outputs from the account without leaving the wallet persistently unlocked. Non-stakers are able to use this mechanism to mix received funds by using the unmixed account to provide receiving addresses and mix them as if it was CoinShuffle++ change. The wallet will participate in CoinShuffle++ sessions by submitting only one UXTO per epoch until all unmixed funds have been mixed. Depending on the current epoch, users may have to wait for a while before seeing any mixing activity. Further Information For more technical information about CoinShuffle++, visit Decred’s cspp Github repository. You can also read about CoinShuffle++ on Decred’s blog . ## /lightning-network/overview Lightning Network (LN) What is Lightning (LN)? The Lightning Network (LN) is a “Layer 2” protocol that runs on top of the base layer (“Layer 1”) of a blockchain-based cryptocurrency (like Decred). It enables fast, low cost transactions and higher throughput than possible on Layer 1. Decred Lightning Implemetation Decred’s Lightning Network implementation ( dcrlnd ) is based on the lnd implementation for Bitcoin, and is under active development. While the Lightning Network was activated on the Decred mainnet with the activation of DCP-0004 at block 342784 (May 9th, 2019), and is operational on mainnet, it is not recommended to put any significant amounts of DCR into dcrlnd nodes until the implementation is more mature. For more on the technical details of LN, see the dcrlnd repo. ## /lightning-network/backups LN Data Backup Critical Information to Prevent Fund Loss In order to redeem funds from a channel in case of seed restores, LN users need to maintain an up to date backup of data by way of an SCB file. SCB Decryption Errors An SCB file is only valid for the exact same wallet/account that generated it. Trying to restore it on a different wallet or account will cause a generic decryption error. Watchtowers Required For complete safety from possible malicious remote nodes, users should also use third party, reputable watchtowers to ensure that if the remote nodes executes the DLP protocol with an invalid state they are correctly punished for it. Due to its nature as a second-layer network, Lightning Network related wallet data is not stored in the blockchain itself. This means that the standard wallet seed is not sufficient to restore the LN balance of a wallet in case of a restore from seed. LN users need to also regularly and safely store the Static Channel Backup (SCB) file so that a restored lightning wallet might be used to close the channels opened by the previous wallet. The backup should be updated every time a channel is opened or closed on the local LN node (including when a remote node opens a channel back to the local node). The rest of this document details what exactly the SCB-based backup method entails, how to perform backups and restores using it, and its limitations. Overview of Backup Issues for LN nodes The next sections provide a high level overview of why backups are needed for Lightning Network nodes and how they work. For the operational instructions on generating and applying backups see the section on Operating SCB Backups . What data does an LN wallet store? This can be skipped for those familiar with how LN operates. Payments over the Lightning Network happen across channels . An LN channel can be understood as an agreement between two entities (nodes) to allow payments up to some pre-defined amount. While a lightning channel is realized as an on-chain output, spendable by a multisig 2-of-2 signature script, the channel state evolves completely off-chain by having relative balances and in-flight payments (HTLCs) only known to the parties of channel. This means that while other participants of the network know that a given channel exists (due to the output being stored and confirmed on the blockchain), the data about which portion (how many coins) each of the two nodes own in the channel, as well as which payments are currently outstanding, is only known to them. Every sequential update to the channel state is summarized by a corresponding commitment transaction : a transaction that is usually kept off-chain (never broadcast) but works as a sort of insurance that either party can recover their funds if the other node stops working properly. This transaction is updated and re-signed every time a new payment changes the relative balances of the channel. It is then stored on a local database, along with some other metadata such as the current state number, the specific keys used to sign this update and information about older, revoked states. A lightning node must never publish a state older than the most recent one agreed by the two parties of a channel. Due to how the LN protocol works, publishing the commitment transaction of an old, revoked state means that party forfeits their funds to the other node, who can then send the entire channel amount to a regular key under their sole control. Notice that since the commitment data is never published to the blockchain during the regular operation of an LN node, any event that causes loss of data means the node cannot recover their funds if the counterparty disappears. It also means the node cannot even advance the state of the channel, since it doesn’t know what the current state is to
프로젝트로 돌아가기