How to implement 2-step verification

how to do this by modifying the core files?