yaca_key_export() implementation of password handling