I'm currently building a filesystem written in Go that sends files from a client to server, in encrypted format. I am very new to information transfer protocols.
I want to send information about the user (username, password hashed with bcrypt) to a server, which would then open a secure session of some type with the client where the server and client could send and receive file data and metadata. This should keep a backup of the client's files on the server, and encrypted with a symmetric key unique that is unique to that user (with AES256 or similar). I want all of this to happen as a background task, without input from the user aside from the user/pass at startup.
- What would be the best protocol to transfer (encrypted) files? TCP, SSH, SFTP, or something else?
- What about transferring metadata about files?
- What is the best way to authenticate a user before opening a session (for this case)? Using certificates or password hashes created from bcrypt?