A surety is entitled to the benefit of every security which the creditor has against the principal debtor at the time when the contract of surety ship is entered into, whether the surety knows of the existence of such security or not; and, if the creditor loses, or without the consent of the surety, parts with such security, the surety isdischar...