Hello, all!
I would like to protect my hard disk with password, which has to be on usb flash. I want hdd to read the password from that flash and it shuld be the only way to unlock when flash is inserted.
A there any programs to do that or maybe You can suggest how can I write the program myself?

The OpenBSD Journal published an article on encrypting the root file system in May of this year. While the goals of the author may be different from what you would like to do, the article describes using a key drive with softraid(4) and bioctl(8) with the Crypto discipline: