From 9f1be26e2f8f5ddd40f80e0b41cc1896e8ba098e Mon Sep 17 00:00:00 2001 From: pythcoiner Date: Wed, 8 Jul 2026 00:55:16 -0400 Subject: [PATCH] bip-138 recommend sorting and deduplicating individual secrets --- bip-0138.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bip-0138.md b/bip-0138.md index 0c036146..a999f92e 100644 --- a/bip-0138.md +++ b/bip-0138.md @@ -273,8 +273,10 @@ The `INDIVIDUAL_SECRETS` section follows this format: `COUNT`: 1-byte unsigned integer (1–255) indicating how many secrets are included. `INDIVIDUAL_SECRET`: 32-byte serialization of the derived individual secret. -Note: the individual secrets vector should not contain duplicates. Implementations -MAY deduplicate secrets during encoding or parsing. +The individual secrets vector SHOULD be encoded in lexicographic order. This avoids +leaking information through implementation-specific ordering. The vector SHOULD NOT +contain duplicates. Implementations SHOULD deduplicate secrets during encoding or +parsing. Encoders SHOULD append random decoy `INDIVIDUAL_SECRET` entries to hide the exact number of real decryption keys. The total count SHOULD be rounded up to the