N * 32
byte buffer such as N >> M
, where M
is the number of the individual commitments. The rest of the slots is filled with random data deterministically generated from a single entropy source. The position n
for a commitment with the identifier id
is computed as n = id mod N
, guaranteeing that no two commitments under the same protocol with a given id
may be simultaneously present.M
messages msg1
..msgM
under protocols with corresponding unique ids id
..idM
the commitment procedure runs as follows:entropy_seed
hereinafter.N >> M
, for instance N = M * 2
and allocate 32*N
byte buffer (such that the maximum buffer length MUST not exceed 2^21, i. e 2 MB).cI
according to the per-message protocol,n = idI mod N
(if the protocol identifier is a hash, it should be converted into unsigned integer of appropriate dimensionality using little- endian notation),n
is not used, serialize a cI
hash into it using bitcoin-style hash serialization format; otherwise go to step 3 and generate a new N' >> N
.j
):seed_entropy || j
, where both values are serialized as little-endian byte strings (the total length of resulting byte string for hashing should be 272 bits). The tagged hash procedure must run according to BIP-340 [4] using UTF-8 representation of LNPBP4:entropy
string as the tag.LNPBP4
as the protocol-specific tag.msgA
under this scheme and conceal the rest of the messages and protocols participating in the commitment has to publish the following data:msgA
and information about its protocol with id idA
.msg1
..msgM
and information about their protocols with id id1
..idM
.n = idA mod N
, where idA
is the message-specific protocol id and N
is the length of the commitment buffer in bytes divided on 32.n
's 32-byte slot of the commitment buffer; fail verification otherwise.0x00
) commitment buffer of the same length as the revealed commitment buffer, and re-running steps 4-6 from the commitment procedure . If the new buffer match per-byte the revealed commitment buffer, then the verification succeeded; otherwise it has failed.1^8
different protocols in average.scriptPubkey
of a transaction output (LNPBP-2 Standard). https://github.com/LNP-BP/lnpbps/blob/master/lnpbp-0002.md​