I'm going to create a client-server application that stores a user's sensitive financial information on the server. I would like to encrypt this data so that even if a hacker gets access to the server he/she cannot read the user's financial information. The data would be decrypted by the client with the user's password.
For extra difficulty, one user can be granted access to another user's data.
Is this feasible? If so, is there an online guide which provides an example of the types of cryptography to use?
For example, I'm thinking that each user should have a private key derived from his/her password, and a corresponding public key which is used to encrypt his/her data on the server. This public key is also stored on the server, so that if Alice wanted to give Bob access to her data, she would unencrypt her data using her private key, then encrypt it again using both her and Bob's public key. One problem with this approach is that if a hacker gets access to the encrypted data he/she could use 'brute force' by trying every combination of, say, 8 characters as passwords to see if that combination unencrypts the data. I therefore want to make the unencryption process so slow that it is not practical to use brute force. Is there such a public-private key algorithm?
Edit: Ok, after a bit of research have found that there are plenty of hash algorithms (such as PBKDF2) that are designed to be slow because they take an iteration parameter that can be as large as you like.