@@ -2068,8 +2068,7 @@ class ConfidentialTransfer_test : public beast::unit_test::suite
20682068 Buffer const convertBlindingFactor = generateBlindingFactor ();
20692069 auto const convertHolderCiphertext = mptAlice.encryptAmount (bob, maxMPTokenAmount, convertBlindingFactor);
20702070 auto const convertIssuerCiphertext = mptAlice.encryptAmount (alice, maxMPTokenAmount, convertBlindingFactor);
2071- auto const convertContextHash =
2072- getConvertContextHash (bob.id (), env.seq (bob), mptAlice.issuanceID (), maxMPTokenAmount);
2071+ auto const convertContextHash = getConvertContextHash (bob.id (), mptAlice.issuanceID (), env.seq (bob));
20732072 auto const schnorrProof = mptAlice.getSchnorrProof (bob, convertContextHash);
20742073 BEAST_EXPECT (schnorrProof.has_value ());
20752074
@@ -2121,7 +2120,7 @@ class ConfidentialTransfer_test : public beast::unit_test::suite
21212120 // Generate the proof using known spending balance value
21222121 auto const version = mptAlice.getMPTokenVersion (bob);
21232122 uint256 const convertBackContextHash =
2124- getConvertBackContextHash (bob.id (), env. seq (bob ), mptAlice. issuanceID (), convertBackAmt , version);
2123+ getConvertBackContextHash (bob.id (), mptAlice. issuanceID ( ), env. seq (bob) , version);
21252124
21262125 Buffer const proof = mptAlice.getConvertBackProof (
21272126 bob,
@@ -3408,8 +3407,7 @@ class ConfidentialTransfer_test : public beast::unit_test::suite
34083407 // The proof uses PC(1, rho) but the transaction submits PC(balance, rho).
34093408 // Verification fails because the proof doesn't match the submitted commitment.
34103409 {
3411- uint256 const contextHash =
3412- getConvertBackContextHash (bob, env.seq (bob), mptAlice.issuanceID (), amt, version);
3410+ uint256 const contextHash = getConvertBackContextHash (bob, mptAlice.issuanceID (), env.seq (bob), version);
34133411 Buffer const badPedersenCommitment = mptAlice.getPedersenCommitment (1 , pcBlindingFactor);
34143412 Buffer const proof = mptAlice.getConvertBackProof (
34153413 bob,
@@ -3437,8 +3435,7 @@ class ConfidentialTransfer_test : public beast::unit_test::suite
34373435 // The pedersen commitment PC = balance*G + rho*H requires the same rho
34383436 // used in proof generation. Using a different rho breaks the linkage.
34393437 {
3440- uint256 const contextHash =
3441- getConvertBackContextHash (bob, env.seq (bob), mptAlice.issuanceID (), amt, version);
3438+ uint256 const contextHash = getConvertBackContextHash (bob, mptAlice.issuanceID (), env.seq (bob), version);
34423439
34433440 Buffer const proof = mptAlice.getConvertBackProof (
34443441 bob,
@@ -3466,8 +3463,7 @@ class ConfidentialTransfer_test : public beast::unit_test::suite
34663463 // The proof claims balance=1 but the encrypted spending balance contains
34673464 // the actual balance. Verification fails because the values don't match.
34683465 {
3469- uint256 const contextHash =
3470- getConvertBackContextHash (bob, env.seq (bob), mptAlice.issuanceID (), amt, version);
3466+ uint256 const contextHash = getConvertBackContextHash (bob, mptAlice.issuanceID (), env.seq (bob), version);
34713467
34723468 Buffer const proof = mptAlice.getConvertBackProof (
34733469 bob,
@@ -3496,8 +3492,7 @@ class ConfidentialTransfer_test : public beast::unit_test::suite
34963492 // different pedersen commitment. Verification fails because the
34973493 // submitted commitment doesn't match what the proof was generated for.
34983494 {
3499- uint256 const contextHash =
3500- getConvertBackContextHash (bob, env.seq (bob), mptAlice.issuanceID (), amt, version);
3495+ uint256 const contextHash = getConvertBackContextHash (bob, mptAlice.issuanceID (), env.seq (bob), version);
35013496 Buffer const badPedersenCommitment = mptAlice.getPedersenCommitment (1 , pcBlindingFactor);
35023497 Buffer const proof = mptAlice.getConvertBackProof (
35033498 bob,
@@ -3526,8 +3521,7 @@ class ConfidentialTransfer_test : public beast::unit_test::suite
35263521 // sequence, issuanceID, amount, version). Using a different context hash
35273522 // makes the proof invalid for this transaction, preventing replay attacks.
35283523 {
3529- uint256 const contextHash =
3530- getConvertBackContextHash (bob, env.seq (bob), mptAlice.issuanceID (), amt, version);
3524+ uint256 const contextHash = getConvertBackContextHash (bob, mptAlice.issuanceID (), env.seq (bob), version);
35313525 uint256 const badContextHash{1 };
35323526 Buffer const pedersenProof = mptAlice.getBalanceLinkageProof (
35333527 bob,
@@ -3560,8 +3554,7 @@ class ConfidentialTransfer_test : public beast::unit_test::suite
35603554 // Test 6: Correct proof to verify the test setup is valid.
35613555 // All parameters are correct, so the transaction should succeed.
35623556 {
3563- uint256 const contextHash =
3564- getConvertBackContextHash (bob, env.seq (bob), mptAlice.issuanceID (), amt, version);
3557+ uint256 const contextHash = getConvertBackContextHash (bob, mptAlice.issuanceID (), env.seq (bob), version);
35653558
35663559 Buffer const proof = mptAlice.getConvertBackProof (
35673560 bob,
@@ -3675,8 +3668,7 @@ class ConfidentialTransfer_test : public beast::unit_test::suite
36753668 // commitment was created with (balance - amount). The verifier computes
36763669 // PC_rem = PC - amount*G and checks if the bulletproof matches, which fails.
36773670 {
3678- uint256 const contextHash =
3679- getConvertBackContextHash (bob, env.seq (bob), mptAlice.issuanceID (), amt, version);
3671+ uint256 const contextHash = getConvertBackContextHash (bob, mptAlice.issuanceID (), env.seq (bob), version);
36803672
36813673 Buffer const bulletproof = mptAlice.getBulletproof (
36823674 {1 }, // wrong remaining balance
@@ -3701,8 +3693,7 @@ class ConfidentialTransfer_test : public beast::unit_test::suite
37013693 // commitment PC = (balance - amount)*G + rho*H. Using a different rho
37023694 // creates a commitment mismatch and verification fails.
37033695 {
3704- uint256 const contextHash =
3705- getConvertBackContextHash (bob, env.seq (bob), mptAlice.issuanceID (), amt, version);
3696+ uint256 const contextHash = getConvertBackContextHash (bob, mptAlice.issuanceID (), env.seq (bob), version);
37063697
37073698 Buffer const bulletproof = mptAlice.getBulletproof (
37083699 {*spendingBalance - amt},
@@ -3727,8 +3718,7 @@ class ConfidentialTransfer_test : public beast::unit_test::suite
37273718 // sequence, issuanceID, amount, version). Using a different context hash
37283719 // makes the proof invalid for this transaction, preventing replay attacks.
37293720 {
3730- uint256 const contextHash =
3731- getConvertBackContextHash (bob, env.seq (bob), mptAlice.issuanceID (), amt, version);
3721+ uint256 const contextHash = getConvertBackContextHash (bob, mptAlice.issuanceID (), env.seq (bob), version);
37323722
37333723 uint256 const badContextHash{1 };
37343724 Buffer const bulletproof = mptAlice.getBulletproof (
@@ -3752,8 +3742,7 @@ class ConfidentialTransfer_test : public beast::unit_test::suite
37523742 // Test 4: Correct proof to verify the test setup is valid.
37533743 // All parameters are correct, so the transaction should succeed.
37543744 {
3755- uint256 const contextHash =
3756- getConvertBackContextHash (bob, env.seq (bob), mptAlice.issuanceID (), amt, version);
3745+ uint256 const contextHash = getConvertBackContextHash (bob, mptAlice.issuanceID (), env.seq (bob), version);
37573746
37583747 Buffer const proof = mptAlice.getConvertBackProof (
37593748 bob,
0 commit comments