From 5229f36dc023904bb5c71eea3cc56b4fd5fbbe13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kr=C3=BCger?= Date: Thu, 11 Apr 2024 12:09:27 +0200 Subject: [PATCH] Use big-endian in all of the nameaccumulator spec. (#76) --- spec/nameaccumulator.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/nameaccumulator.md b/spec/nameaccumulator.md index f267942..0ee60d0 100644 --- a/spec/nameaccumulator.md +++ b/spec/nameaccumulator.md @@ -33,8 +33,8 @@ Proofs and witnesses of relationships between name accumulators come in various | Proof component | Representation | |----------------------------------------|----------------| | Element in the quadratic residue group | 256 byte big-endian byte array | -| Prime hash $l$ | 16 byte little-endian byte array and [unsigned varint] counter | -| Residue $r$ | 16 byte little-endian byte array | +| Prime hash $l$ | 16 byte big-endian byte array and [unsigned varint] counter | +| Residue $r$ | 16 byte big-endian byte array | Collecting these proof components into their own structures is up to implementations. Future versions of this specification may describe an encoding. @@ -92,7 +92,7 @@ This algorithm updates an accumulator state by adding an arbitrary number of pri The algorithm for this proof is the "proof of knowledge of exponent" (PoKE*) from [this paper][IOP Batching Boneh], made non-interactive via the Fiat-Shamir heuristic. The number $l$ from the protocol is derived via SHA-3-hashing the big-endian bytes of the modulus, base, commitment and a counter. The base is the accumulator state before the elements were added and the commitment is the state after. -The counter is the lowest 32-bit number that makes the first 128-bit truncated hash prime, if interpreted as a little-endian unsigned 128-bit integer. +The counter is the lowest 32-bit number that makes the first 128-bit truncated hash prime, if interpreted as a big-endian unsigned 128-bit integer. ```ts function deriveLHash(