add mechanisms to receive the door key through a pgp encrypted message.
the client script checkes if it is nessesary to decrypt through pgp and does so elsewise.
He detects this by comparing the first 4 bytes of the key, so there is a chance for a false hit, but the next run of the script will then ask for the pwd most likely. using hashes would be more secure but requires more client tools.