Make an empty file, encrypt it, then decrypt it back to plaintext:
# echo -n "" > bc
# bcrypt bc
# bcrypt bc.bfe
This decodes bc.bfe successfully but gives a bogus error message "No valid files found"
This false error is especially confusing if you decrypt multiple files e.g. with bcrypt foo* and the last one happens to be an empty file, then you get an error message "No valid files found" which leads you to believe no files were found or decrypted when in fact they were all found and decrypted as expected.
=====
Glancing at the source code in main(), it seems a variable sz is used ambiguously to indicate the size of the resulting decrypted file and then (after the argument processing loop) there is a false assumption that 0 means no file was found:
if(!sz)
fprintf(stderr, "No valid files found\n");
=====
Furthermore, if you bcrypt files with the -c option (to disable compression), then BFDecrypt returns 0 inside the loop after decrypting an encrypted empty file, and the program aborts with "Invalid encryption key for file":
# echo -n "" > bc
# bcrypt -c bc
# bcrypt bc.bfe
Invalid encryption key for file: bc.bfe
The code in main():
if (options.type == ENCRYPT)
sz = BFEncrypt(&input, key, sz, &options);
else if (options.type == DECRYPT)
if ((sz = BFDecrypt(&input, key, key2, sz, &options)) == 0) {
fprintf(stderr, "Invalid encryption key for file: %s\n", infile);
exit(1);
}
if ((options.compression == 1) && (options.type == DECRYPT))
sz = douncompress(&input, sz, options);
This is of course more serious since the program aborts instead of continuing processing of all files.