Add to this number a previously-agreed values of s and c, or, if c was not defined, use 0 for c value
by default. This will give a commitment-factor x = a + s + c. Since s and c is a 8-bit numbers and a is a
32-bit number, the result MUST BE a 64-bit number, which will prevent any possible number overflows.
to ->
Add to this number a previously-agreed values of s and c, (if c was not defined, use 0 or the default value). This will give a commitment-factor x = a + s + c. Since s and care 8-bit number and a is a
32-bit number, as a result max(x) wil be a 48-bit number which can be represented in a 64 bit integer without causing integer overflow.
Possible deviation from Impl.
Compute d as d = x mod n. The d will represent a number of transaction output which MUST contain a cryptographic commitment. All other transaction outputs under this protocol MUST NOT contain cryptographic commitments.
Compute d as d = x mod n. The d will represent the index of the output which MUST contain a cryptographic commitment. All other transaction outputs under this protocol MUST NOT contain any cryptographic commitments.
Suggested Nits:
Possible deviation from Impl.
Let me know if I am missing something, but as per the implementation here,
d
is the transaction index, not the number of outputs. https://github.com/LNP-BP/rust-lnpbp/blob/2f6fee732417aad5c71fcd0120ed0db4b1e61061/src/bp/dbc/tx.rs#L35-L38 possible restructure of the statement