How to add a password to an SD card?
The SD card has password protection built into the standards.  Here you can read the standards for SD cards to learn how it works.  Below is a link to a project for locking/unlocking a SD card with an Atmel microcontroller.

SDLocker2