crypt: functions for ask-for-password and reading key