I've got an application which generates SecretKeys, one per client. These need to be persisted in our database. I'm REALLY unfamiliar with common security patterns or implementations, and I'm looking for advice.
The KeyStore class seems to be widely used, especially to protect SecretKeys. However, I've seen little mentioning using KeyStore with databases, and I'm trying to figure out if it's because it's elementary usage (and thus not mentioned), or if it's because this is a bad or redundant approach, and I should really be using a different technique.
The basic design is that each user would have their own keystore, which would be saved/loaded to and from the database by conversion to bytes (using load() and store(), I think).
Anything wrong with this design so far? I'm also wondering how I should handle the password to the KeyStore. We're thinking of only using a single password for all KeyStores, but how do we store THIS securely without a keystore?
This is meant to be used in a back-end app, and the client will never transfer a password to us, nor is there a human operator on the server-side to supply a password.