digraph extended {

size=6.25;
rankdir=LR;
penwidth=1.75;
node [ fontname="Sans", penwidth = 1.75, shape = "box" ];
edge [ fontname="Sans", penwidth = 1.75 ];
graph [ fontname="Sans" ];
nodesep=0.05;
//splines = ortho;
ranksep = 1.0;
subgraph cluster_hard {
    style = "invis";

    subgraph cluster_h_parent_extended_key {
        h_parent_private_key [ label = "Parent Private Key" ];
        h_parent_chain_code [ label = "Parent Chain Code" ];
    }

    subgraph cluster_child_extended_key_else {
        child_private_key_hard [ label = "Child Private Key" ];
        child_chain_code_hard [ label = "Child Chain Code" ];
    }

    hmac_hard [ style = "diagonals", label = "One-Way\nHash" ];
    i_hard [ label = "Index ≥0x80000000" ];

    h_parent_chain_code -> hmac_hard;
    h_parent_private_key -> hmac_hard;

    i_hard -> hmac_hard;

    hmac_hard -> child_private_key_hard;
    hmac_hard -> child_chain_code_hard;
    h_parent_private_key -> child_private_key_hard;
}


subgraph cluster_norm {
    style = "invis"

    subgraph cluster_n_parent_extended_key {
        n_parent_private_key [ label = "Parent Private Key" ];
        n_parent_chain_code [ label = "Parent Chain Code" ];
        n_parent_public_key [ label = "Parent Public Key" ];
    }

    subgraph cluster_child_extended_key_norm {
        child_private_key_norm [ label = "Child Private Key" ];
        child_chain_code_norm [ label = "Child Chain Code" ];
    }
    hmac_norm [ style = "diagonals", label = "One-Way\nHash" ];
    i_norm [ label = "Index <0x80000000" ];

    n_parent_chain_code -> hmac_norm;
    n_parent_public_key -> hmac_norm;
    i_norm -> hmac_norm;
    hmac_norm -> child_private_key_norm;
    hmac_norm -> child_chain_code_norm;
    n_parent_private_key -> child_private_key_norm [weight = 5];
}

label = "Normal (Top) And Hardened (Bottom) Child Private Key Derivation";

}
