are you sure that the code your phone is asking is the security code? if it really security code and default code 12345 is not working, you need to bring your phone to the nearest nokia carepoint so re-flash will be done on your phone and the default code will be back to 12345 again.