1
0
mirror of https://github.com/bitcoin/bips.git synced 2026-10-19 19:29:18 +00:00

bip-138 recommend sorting and deduplicating individual secrets

This commit is contained in:
pythcoiner
2026-07-08 00:55:16 -04:00
parent 1e776e7a72
commit 9f1be26e2f

View File

@@ -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