nl_tokens: / ** ECIES TODO unit test @arg { string|Object } pubkey wif PublicKey object @return { Buffer } 64 byte shared secret function getSharedSecret ( public_key ) { public_key = PublicKey ( public_key ) . toUncompressed () var P = public_key . Q . multiply ( d ) ; var S = P . affineX . toBuffer ( { size : 32 } ) ; // ECIES adds an extra sha512 return hash . sha512 ( S ) ; } @arg { string } name - child key name . @return { PrivateKey }
pl_tokens: function getChildKey ( name ) { // console.error('WARNING: getChildKey untested against evtd'); // no evtd impl yet const index = createHash ( "sha256" ) . update ( toBuffer ( ) ) . update ( <mask> ) . digest ( ) ; return PrivateKey ( index ) ; }