Explanation of how exactly the pederson commitments in monero work?











up vote
2
down vote

favorite












so lets say for the first commitment (after a mined transaction)



let a = miner_reward



this is a known number.



to generate the first commitment, one does;



input = x.G + a.H; output = x.G + a.H


Then using diffie-hellman the sender lets the receiver know the values of both x an a. The problem is, if the receiver now wants to spend the outputted commitment, he must add a further layer of masking/encryption. Because if he doesn't and some malicious actor down the road receives a payment, all the bad actor has to do is reveal x, and everyone in the chain that used x as a blinding key, will have their amounts compromised.



So my question is, how exactly does the receiver add the further encryption to the commitment? Proofs of why its valid would be nice as well.










share|improve this question


























    up vote
    2
    down vote

    favorite












    so lets say for the first commitment (after a mined transaction)



    let a = miner_reward



    this is a known number.



    to generate the first commitment, one does;



    input = x.G + a.H; output = x.G + a.H


    Then using diffie-hellman the sender lets the receiver know the values of both x an a. The problem is, if the receiver now wants to spend the outputted commitment, he must add a further layer of masking/encryption. Because if he doesn't and some malicious actor down the road receives a payment, all the bad actor has to do is reveal x, and everyone in the chain that used x as a blinding key, will have their amounts compromised.



    So my question is, how exactly does the receiver add the further encryption to the commitment? Proofs of why its valid would be nice as well.










    share|improve this question
























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      so lets say for the first commitment (after a mined transaction)



      let a = miner_reward



      this is a known number.



      to generate the first commitment, one does;



      input = x.G + a.H; output = x.G + a.H


      Then using diffie-hellman the sender lets the receiver know the values of both x an a. The problem is, if the receiver now wants to spend the outputted commitment, he must add a further layer of masking/encryption. Because if he doesn't and some malicious actor down the road receives a payment, all the bad actor has to do is reveal x, and everyone in the chain that used x as a blinding key, will have their amounts compromised.



      So my question is, how exactly does the receiver add the further encryption to the commitment? Proofs of why its valid would be nice as well.










      share|improve this question













      so lets say for the first commitment (after a mined transaction)



      let a = miner_reward



      this is a known number.



      to generate the first commitment, one does;



      input = x.G + a.H; output = x.G + a.H


      Then using diffie-hellman the sender lets the receiver know the values of both x an a. The problem is, if the receiver now wants to spend the outputted commitment, he must add a further layer of masking/encryption. Because if he doesn't and some malicious actor down the road receives a payment, all the bad actor has to do is reveal x, and everyone in the chain that used x as a blinding key, will have their amounts compromised.



      So my question is, how exactly does the receiver add the further encryption to the commitment? Proofs of why its valid would be nice as well.







      cryptography encryption






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 9 at 10:18









      cookiekid

      1563




      1563






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          Blinding factors are random numbers that are only used once per commitment. No two commitments should ever share the same blinding factor, even if they're for the same amount. The blinding factor is generated by the sender and communicated to the receiver in encrypted form using the DH shared secret (as you've pointed out).



          If the existing commitments for inputs were used in transactions spending multiple inputs (known as RCTTypeSimple transactions), if one real input ring position was revealed, this would reveal all real input ring positions in the transaction.



          Therefore for transactions spending multiple inputs, you avoid this problem by creating new commitments for the inputs you're spending, and these are called "PseudoOuts" in the transaction structure. See Is the 'pseudoOuts' of 'rctSig' the commitment on input amounts for simple RCT






          share|improve this answer























          • Ok so it would look like this; original = xG + aH. new = yG + aH. Then to prove the value sums to zero you do (xG + aH) - (yG + aH). which is the same as xG-yG or (x-y)G. and x-y is the private key used to generate a signature that proves the value of a was not changed. Is this correct?
            – cookiekid
            Nov 9 at 12:47








          • 1




            @cookiekid Yes, exactly. Commitments are effectively public keys, so knowing the private key allows you to create a signature to prove you know the private key, in exactly the same way that signatures work for ordinary public/private keypairs.
            – knaccc
            Nov 9 at 13:04











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "656"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmonero.stackexchange.com%2fquestions%2f10517%2fexplanation-of-how-exactly-the-pederson-commitments-in-monero-work%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote



          accepted










          Blinding factors are random numbers that are only used once per commitment. No two commitments should ever share the same blinding factor, even if they're for the same amount. The blinding factor is generated by the sender and communicated to the receiver in encrypted form using the DH shared secret (as you've pointed out).



          If the existing commitments for inputs were used in transactions spending multiple inputs (known as RCTTypeSimple transactions), if one real input ring position was revealed, this would reveal all real input ring positions in the transaction.



          Therefore for transactions spending multiple inputs, you avoid this problem by creating new commitments for the inputs you're spending, and these are called "PseudoOuts" in the transaction structure. See Is the 'pseudoOuts' of 'rctSig' the commitment on input amounts for simple RCT






          share|improve this answer























          • Ok so it would look like this; original = xG + aH. new = yG + aH. Then to prove the value sums to zero you do (xG + aH) - (yG + aH). which is the same as xG-yG or (x-y)G. and x-y is the private key used to generate a signature that proves the value of a was not changed. Is this correct?
            – cookiekid
            Nov 9 at 12:47








          • 1




            @cookiekid Yes, exactly. Commitments are effectively public keys, so knowing the private key allows you to create a signature to prove you know the private key, in exactly the same way that signatures work for ordinary public/private keypairs.
            – knaccc
            Nov 9 at 13:04















          up vote
          3
          down vote



          accepted










          Blinding factors are random numbers that are only used once per commitment. No two commitments should ever share the same blinding factor, even if they're for the same amount. The blinding factor is generated by the sender and communicated to the receiver in encrypted form using the DH shared secret (as you've pointed out).



          If the existing commitments for inputs were used in transactions spending multiple inputs (known as RCTTypeSimple transactions), if one real input ring position was revealed, this would reveal all real input ring positions in the transaction.



          Therefore for transactions spending multiple inputs, you avoid this problem by creating new commitments for the inputs you're spending, and these are called "PseudoOuts" in the transaction structure. See Is the 'pseudoOuts' of 'rctSig' the commitment on input amounts for simple RCT






          share|improve this answer























          • Ok so it would look like this; original = xG + aH. new = yG + aH. Then to prove the value sums to zero you do (xG + aH) - (yG + aH). which is the same as xG-yG or (x-y)G. and x-y is the private key used to generate a signature that proves the value of a was not changed. Is this correct?
            – cookiekid
            Nov 9 at 12:47








          • 1




            @cookiekid Yes, exactly. Commitments are effectively public keys, so knowing the private key allows you to create a signature to prove you know the private key, in exactly the same way that signatures work for ordinary public/private keypairs.
            – knaccc
            Nov 9 at 13:04













          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          Blinding factors are random numbers that are only used once per commitment. No two commitments should ever share the same blinding factor, even if they're for the same amount. The blinding factor is generated by the sender and communicated to the receiver in encrypted form using the DH shared secret (as you've pointed out).



          If the existing commitments for inputs were used in transactions spending multiple inputs (known as RCTTypeSimple transactions), if one real input ring position was revealed, this would reveal all real input ring positions in the transaction.



          Therefore for transactions spending multiple inputs, you avoid this problem by creating new commitments for the inputs you're spending, and these are called "PseudoOuts" in the transaction structure. See Is the 'pseudoOuts' of 'rctSig' the commitment on input amounts for simple RCT






          share|improve this answer














          Blinding factors are random numbers that are only used once per commitment. No two commitments should ever share the same blinding factor, even if they're for the same amount. The blinding factor is generated by the sender and communicated to the receiver in encrypted form using the DH shared secret (as you've pointed out).



          If the existing commitments for inputs were used in transactions spending multiple inputs (known as RCTTypeSimple transactions), if one real input ring position was revealed, this would reveal all real input ring positions in the transaction.



          Therefore for transactions spending multiple inputs, you avoid this problem by creating new commitments for the inputs you're spending, and these are called "PseudoOuts" in the transaction structure. See Is the 'pseudoOuts' of 'rctSig' the commitment on input amounts for simple RCT







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 10 at 0:02

























          answered Nov 9 at 12:18









          knaccc

          6,137618




          6,137618












          • Ok so it would look like this; original = xG + aH. new = yG + aH. Then to prove the value sums to zero you do (xG + aH) - (yG + aH). which is the same as xG-yG or (x-y)G. and x-y is the private key used to generate a signature that proves the value of a was not changed. Is this correct?
            – cookiekid
            Nov 9 at 12:47








          • 1




            @cookiekid Yes, exactly. Commitments are effectively public keys, so knowing the private key allows you to create a signature to prove you know the private key, in exactly the same way that signatures work for ordinary public/private keypairs.
            – knaccc
            Nov 9 at 13:04


















          • Ok so it would look like this; original = xG + aH. new = yG + aH. Then to prove the value sums to zero you do (xG + aH) - (yG + aH). which is the same as xG-yG or (x-y)G. and x-y is the private key used to generate a signature that proves the value of a was not changed. Is this correct?
            – cookiekid
            Nov 9 at 12:47








          • 1




            @cookiekid Yes, exactly. Commitments are effectively public keys, so knowing the private key allows you to create a signature to prove you know the private key, in exactly the same way that signatures work for ordinary public/private keypairs.
            – knaccc
            Nov 9 at 13:04
















          Ok so it would look like this; original = xG + aH. new = yG + aH. Then to prove the value sums to zero you do (xG + aH) - (yG + aH). which is the same as xG-yG or (x-y)G. and x-y is the private key used to generate a signature that proves the value of a was not changed. Is this correct?
          – cookiekid
          Nov 9 at 12:47






          Ok so it would look like this; original = xG + aH. new = yG + aH. Then to prove the value sums to zero you do (xG + aH) - (yG + aH). which is the same as xG-yG or (x-y)G. and x-y is the private key used to generate a signature that proves the value of a was not changed. Is this correct?
          – cookiekid
          Nov 9 at 12:47






          1




          1




          @cookiekid Yes, exactly. Commitments are effectively public keys, so knowing the private key allows you to create a signature to prove you know the private key, in exactly the same way that signatures work for ordinary public/private keypairs.
          – knaccc
          Nov 9 at 13:04




          @cookiekid Yes, exactly. Commitments are effectively public keys, so knowing the private key allows you to create a signature to prove you know the private key, in exactly the same way that signatures work for ordinary public/private keypairs.
          – knaccc
          Nov 9 at 13:04


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmonero.stackexchange.com%2fquestions%2f10517%2fexplanation-of-how-exactly-the-pederson-commitments-in-monero-work%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Schultheiß

          Liste der Kulturdenkmale in Wilsdruff

          Android Play Services Check