Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Documentation] Fix SLIP Master Key and Child Key diagrams to be in the correct order #573

Merged
merged 1 commit into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions shared/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.0.0.39] - 2023-03-09

- Fix diagrams in SLIP documentation to be in the correct order

## [0.0.0.38] - 2023-03-03

- Support libp2p module in node
Expand Down
44 changes: 22 additions & 22 deletions shared/crypto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,28 @@ flowchart LR
The keys are generated using the BIP-44 path `m/44'/635'/%d'` where `%d` is the index of the child key - this allows for the deterministic generation of up to `2147483647` hardened ed25519 child keys per master key.
Master key derivation is done as follows:
```mermaid
flowchart LR
subgraph HMAC
direction TB
A["hmac = hmacNew(sha512, seedModifier)"]
B["hmac.Write(seed)"]
C["convertToBytes(hmac)"]
A-->B
B--hmac-->C
end
subgraph MASTER-KEY
direction LR
D["SecretKey: hmacBytes[:32]"]
E["ChainCode: hmacBytes[32:]"]
D --> KEY
E --> KEY
end
seed-->HMAC
HMAC--hmacBytes-->MASTER-KEY
```

Child keys are derived from their parents as follows:
```mermaid
flowchart LR
subgraph HCHILD["HMAC-CHILD"]
direction TB
Expand All @@ -135,26 +157,4 @@ flowchart LR
HCHILD--hmacBytes-->CKEY
```

Child keys are derived from their parents as follows:
```mermaid
flowchart LR
subgraph HMAC
direction TB
A["hmac = hmacNew(sha512, seedModifier)"]
B["hmac.Write(seed)"]
C["convertToBytes(hmac)"]
A-->B
B--hmac-->C
end
subgraph MASTER-KEY
direction LR
D["SecretKey: hmacBytes[:32]"]
E["ChainCode: hmacBytes[32:]"]
D --> KEY
E --> KEY
end
seed-->HMAC
HMAC--hmacBytes-->MASTER-KEY
```

<!-- GITHUB_WIKI: shared/crypto/readme -->