How to design a cryptographically secure file hosting service
Generate key-pair
Generate random salt, hash password with proper password hash (scrypt or PBKDF2) to derive a master key.
Use HKDF to derive one login key and one encryption key from master key
Encrypt private key with encryption key from previous step
Upload it to server, download only possible by proving possession of login key (either send over SSL, or use SRP)
Encrypt files with random AES key, encrypt AES key to public key of a user