In every contract of guarantee there is an implied promise by the principal debtor to indemnify the surety, and the surety is entitled to recover from the principal debtor whatever, sum he has rightfully paid under the guarantee, but no sums which he has paid wrongfully. Illustrations (a) B is indebted to C and A is surety for the debt. C de...