There is a corporate web mail site (PHP + MySQL) for limited numbers of users who are employees of a company working remotely with the corporate web portal. Each user has a login and password. 

I'm thinking about replacing usual text passwords with a key file, i.e. user choose any file to be the key at his first logon, it can be a text file or even a picture, the checksum of that file gets stored in the database and at next time such a user needs to loging he uploads his key file instead of typing a password. Would such authentication be more secure than a password typing? I guess it is much harder to figure out a key file than a password.

The main problem with a key file is that it is a file. As such, it is stored somewhere, on some physical medium. It will be copied with backups. The file will still be there on discard hard disks. Users will copy their files to several devices in order to be able to log from all these devices. To sum up, files leak.

Conversely, a password fits in a brain and needs not be written anywhere; the user naturally moves it around with him; passwords don't leak to backup tapes and old disks. Last but not least, password entry works well on mobile phones, whereas file upload can be more technologically challenging.

So while a secret file can contain a lot more secrecy than a mind-powered password, it also tends to be a lot less "secret" and to imply usability issues. Overall, the "secret file" method does not seem to be more secure, in a generic way, than passwords.



Another way to see it: a "secret file" is equivalent, from a security point of view, to a text file that contains a big fat and random password, that the user reads when he wants to log in (and possibly "types" the password with a copy&paste). Every argument against writing down a password in a text file equally applies to your "secret file" idea.
