The Acks field of a group chat message #
Acknowledged members are named by roster index, as a list of index bytes or a bitmap, whichever
is shorter, followed by one v-byte value each in ascending index order. See "Rosters" in the
group chat spec. Bytes are natural numbers here, each < 256.
Roster indexes are one byte.
Instances For
The longest naming: a bitmap reaching roster index 255.
Instances For
Bytes a bitmap needs to reach roster index i.
Equations
Instances For
The bits of byte j of the bitmap for idx, counted from the least significant: index i
is bit 7 - i % 8 of byte i / 8.
Equations
Instances For
Equations
Instances For
Equations
Instances For
The roster indexes a bitmap marks, in ascending order.
Equations
Instances For
Whether a list naming is no longer than the bitmap for the same members.
Equations
- One or more equations did not get rendered due to their size.
Instances For
What precedes count values. strict also refuses a list where the bitmap is shorter,
which the spec does not ask for.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The n values of v bytes that follow the naming.
Equations
Instances For
The acknowledgements a field carries, or none when it is malformed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Lemmas #
The members of a strictly ascending list below n, read off 0..n-1 in order, are the list.
Decoding undoes encoding #
Only then: a value of 32 bytes or fewer is misread #
Without a count, decoding undoes encoding for every acknowledgement set exactly when values exceed 32 bytes.
Under the strict parser, a well-formed bitmap is the bitmap of the members it marks.
Under the strict parser, a field that decodes is the encoding of its well-formed result.
The spec's parser is malleable; a strict one is not #
The members 0, 1 and 2, named by a list where the bitmap 0xe0 is shorter, with three
33-byte values: the spec's parser accepts it, but encodeUncounted would write the bitmap.
Counted field #
Values shorter than the longest naming need an explicit count, so the field begins with the count less one; an empty field acknowledges no one.
The acknowledgements a field carries, or none when it is malformed.
Equations
Instances For
Ascending roster indexes, named by nameMembers, read back as themselves.
What the strict parser reads before count values: count ascending roster indexes, named
exactly as nameMembers names them.
The members 0, 1 and 2, named by a list where the bitmap 0xe0 is shorter, with three 8-byte
values: the spec's parser accepts it, but encode would write the bitmap.
Values: Idx64, little-endian #
The k bytes of n, least significant first.
Equations
Instances For
The number little-endian bytes spell.
Equations
- Cryptlib.Protocols.GroupComm.GroupChatKatzenqt1.AckCodec.fromLE l = List.foldr (fun (b n : ℕ) => b + 256 * n) 0 l
Instances For
Bytes in a value: an Idx64.
Instances For
What a sender may encode: ascending roster indexes, each one byte, each value an Idx64.
- sorted : List.Pairwise (fun (x1 x2 : ℕ) => x1 < x2) (List.map Prod.fst acks)
Instances For
For Idx64 values, under the strict parser, a field that decodes is the encoding of its
well-formed result.