Closed mratsim closed 4 years ago
This implements keystore primitives for EIP-2333 (draft) https://github.com/ethereum/EIPs/pull/2333
This will unblock https://github.com/status-im/nim-beacon-chain/pull/1093
cc @zah
Ready:
Note that the spec requires over 16KB of stack for parent_SK_to_Lamport_PK
parent_SK_to_Lamport_PK
the lamport_0 and lamport_1 are of size 255 * 32 bytes, in the code we reorder the spec and reuse the same lamport buffer.
lamport_0
lamport_1
lamport
https://github.com/status-im/nim-blscurve/blob/96f203394d49a0031bc51450eec387b9abd9bf2c/blscurve/eth2_keygen.nim#L74-L103
We could further divide stack usage by 255 (!) if we have an alternative HKDF Expand iterator:
https://github.com/status-im/nim-blscurve/blob/96f203394d49a0031bc51450eec387b9abd9bf2c/blscurve/hkdf.nim#L139-L152
This implements keystore primitives for EIP-2333 (draft) https://github.com/ethereum/EIPs/pull/2333
This will unblock https://github.com/status-im/nim-beacon-chain/pull/1093
cc @zah
Ready:
Note that the spec requires over 16KB of stack for
parent_SK_to_Lamport_PK
the
lamport_0
andlamport_1
are of size 255 * 32 bytes, in the code we reorder the spec and reuse the samelamport
buffer.https://github.com/status-im/nim-blscurve/blob/96f203394d49a0031bc51450eec387b9abd9bf2c/blscurve/eth2_keygen.nim#L74-L103
We could further divide stack usage by 255 (!) if we have an alternative HKDF Expand iterator:
https://github.com/status-im/nim-blscurve/blob/96f203394d49a0031bc51450eec387b9abd9bf2c/blscurve/hkdf.nim#L139-L152