I am reading sync.com's white paper, and two questions arise.
Use of the asymmetric key.
The white paper states the following. However, I am confused why the asymmetric key is necessary and how it is really used. In my mind, since file encryption/decryption all happen on the client side, you would only need a symmetric key that is locked by the password.
The only reason that I can think of for using an asymmetric key is to enable file sharing. With an asymmetric key, everyone can keep the public key and use it to encrypt contents. When we share a file with another user, this comes in handy, as I (my client software) can encrypt the shared content for another user using their public key, without knowledge of their private key.
Private key A randomly generated 2048 bit RSA private encryption key serves as the basis for all encryption at Sync. During account creation, a unique private key is generated and encrypted with 256 bit AES GCM, locked with the user’s password. This takes place client-side, within the web browser or app. PBKDF2 key stretching with a high iteration count is used to help make weak passwords more cryptographically secure. Encrypted private keys are stored on Sync’s servers, and downloaded and decrypted locally by the desktop app, web panel or mobile apps after successful authentication. At no time does Sync have access to a user’s private key.
Authentication
The white paper states the following. In the last sentence, it says, "the server authenticates against the hash, but at no time is the hash itself stored." I wonder how is this possible. To authenticate, the server will have to compare the salted, hashed password with something in its database. This says the hash is stored on the server.
A username and password is required to authenticate and log into the Sync desktop app, the Sync web panel, and Sync’s mobile apps. During authentication, a BCRYPT hash of the user inputted password is generated locally on the computer or device, using a unique salt that is stored on the server. Bcrypt is a one-way hashing mechanism, meaning the hash cannot be unhashed or deciphered. The benefit of bcrypt is that it is slow by-design, which prevents brute force or rainbow table attacks. At no time is the user’s actual password transmitted or stored. The server authenticates against the hash, but at no time is the hash itself stored. Successful authentication allows the app to download the user’s encrypted private key, which is then decrypted locally with the user’s actual password.