Generalized Algorithm for DLP with Auxiliary Inputs