Skip to content

Commit b892d05

Browse files
committed
Actually switch to salt to uint32
1 parent ffbb8c9 commit b892d05

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

EIPS/eip-2333.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Keys are defined in terms of a tree structure where a key is determined by the t
4343

4444
### The Tree Structure
4545

46-
The key tree is defined purely through the relationship between a child-node and its ancestors. Starting with the root of the tree, the *master key*, a child node can be derived by knowing the parent's private key and the index of the child. The tree is broken up into depths which are indicated by `/` and the master node is described as `m`. The first child of the master node is therefore described as `m / 0` and `m / 0`'s siblings are `m / i` for all `0 < i < 2**64`.
46+
The key tree is defined purely through the relationship between a child-node and its ancestors. Starting with the root of the tree, the *master key*, a child node can be derived by knowing the parent's private key and the index of the child. The tree is broken up into depths which are indicated by `/` and the master node is described as `m`. The first child of the master node is therefore described as `m / 0` and `m / 0`'s siblings are `m / i` for all `0 <= i < 2**32`.
4747

4848
```text
4949
[m / 0] - [m / 0 / 0]
@@ -93,7 +93,7 @@ Every key generated via the key derivation process derives a child key via a set
9393
##### Inputs
9494

9595
* `parent_SK`, the BLS Secret Key of the parent node
96-
* `index`, the index of the desired child node, an integer `0 <= index < 2^64`
96+
* `index`, the index of the desired child node, an integer `0 <= index < 2^32`
9797

9898
##### Outputs
9999

@@ -109,7 +109,7 @@ Every key generated via the key derivation process derives a child key via a set
109109
##### Procedure
110110

111111
```text
112-
0. salt = I2OSP(index, 8)
112+
0. salt = I2OSP(index, 4)
113113
1. IKM = I2OSP(parent_SK, 32)
114114
2. lamport_0 = IKM_to_lamport_SK(IKM, salt)
115115
3. not_IKM = flip_bits(IKM)
@@ -161,7 +161,7 @@ The child key derivation function takes in the parent's private key and the inde
161161
##### Inputs
162162

163163
* `parent_SK`, the secret key of the parent node, a big endian encoded integer
164-
* `index`, the index of the desired child node, an integer `0 <= index < 2^64`
164+
* `index`, the index of the desired child node, an integer `0 <= index < 2^32`
165165

166166
##### Outputs
167167

@@ -237,7 +237,7 @@ child_SK = 741954310531627918393743084244935870132797316553040716629495647309530
237237
seed = 0x3141592653589793238462643383279502884197169399375105820974944592
238238
master_SK = 46029459550803682895343812821003080589696405386150182061394330539196052371668
239239
child_index = 3141592653
240-
child_SK = 30667786033276881210367384538096772483440183970836047419095979671118554914117
240+
child_SK = 43469287647733616183478983885105537266268532274998688773496918571876759327260
241241
```
242242

243243
### Test Case 2
@@ -246,7 +246,7 @@ child_SK = 306677860332768812103673845380967724834401839708360474190959796711185
246246
seed = 0x0099FF991111002299DD7744EE3355BBDD8844115566CC55663355668888CC00
247247
master_SK = 45379166311535261329029945990467475187325618028073620882733843918126031931161
248248
child_index = 4294967295
249-
child_SK = 36044605362649761791396268191192607877285952793465624067722603125750379903239
249+
child_SK = 46475244006136701976831062271444482037125148379128114617927607151318277762946
250250
```
251251

252252
### Test Case 3
@@ -255,7 +255,7 @@ child_SK = 360446053626497617913962681911926078772859527934656240677226031257503
255255
seed = 0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3
256256
master_SK = 31740500954810567003972734830331791822878290325762596213711963944729383643688
257257
child_index = 42
258-
child_SK = 51484659165124373969863225260480386033754289575388594267256301580213728801629
258+
child_SK = 51041472511529980987749393477251359993058329222191894694692317000136653813011
259259
```
260260

261261
### Test Vector with Intermediate values

0 commit comments

Comments
 (0)