using less bitcore code in shared secret calc