In this paper a new credit risk model for credit derivatives is presented. The model is based upon the Libor market modelling framework for default-free interest rates. We model effective default-free forward rates and effective forward credit spreads as lognormal diffusion processes, and recovery is modelled as a fraction of the par value of the defaulted claim. The newly introduced survival-based pricing measures are a valuable tool in the pricing of defaultable payoffs and allow a straightforward derivation of the no-arbitrage dynamics of forward rates and forward credit spreads. The model can be calibrated to the prices of defaultable coupon bonds, asset swap rates and default swap rates for which closed-form solutions are given. For options on default swaps and caps on credit spreads, approximate solutions of high accuracy exist. This pricing formula for options on default swaps is made exact in a modified modelling framework using an analogy to the swap measure, the default swap measure.