I'm developing a cross-platform Java desktop application which uses a password to derive a cryptographic key. I'd like to add a "Remember me" feature that stores this cryptographic key on the hard drive securely so that my program can get it after a reboot.
If I store it directly, anyone who manages to get access to a typical user's hard drive (no encryption) will be able to get the key. If I encrypt it, the key used to encrypt it must still be stored somewhere on the drive, and hence defeats the purpose.
I've seen gnome-keyring, Windows Credential Manager, and Mac OSX keychain, but they each seem to have their own non-Java APIs (or unofficial ports to Java). Furthermore, it seems like any program running as the user will be able to read or write to or from these two services.
Is there a more portable (and preferably isolated) way to securely store passwords (or cryptographic keys) on the hard drive?