File-based encrypt-and-sync solution for Windows
Some products that seem worth trying :
SecretSync (Dropbox oriented, free and commercial versions)
Toucan (free)
AASync ($29)
BestSync (starting at $19.95 plus 30-day trial)
(Disclaimer: I have no experience with any of them.)
I was looking for exactly the same solution and came across Allway Sync which does exactly what you described - it sync'es two folders, both ways with encryption/decryption feature. It's not free, as far as I remember it costs ~$20 - definitely worth the money though, I've been using it for 2+ years now.
What is also important and what you are missing in your model, is the fact that all files are encrypted using ZIP compression & encryption so you can download any file from Dropbox (web) and open it using jzip, winzip etc. provided you know the password. This is especially useful when you want to do it quickly as a guest on any machine, without installing any additional software.
Cons are that folder structure and file names are not obscured.
Personally, I think you'd be better off with an encrypted filesystem rather then a per file basis. You can use a combination of truecrypt and synchtoy on Windows, or rsync or any other number of synchronization programs on a Linux based system. That way, the synchronization program sees the files on both sides simply as files, but anyone not mounting the truecrypt partition will only see the encrypted files. Otherwise, you might look into Microsofts EFS, I'm not that familiar with it but I understand it does do per file encryption.
Since A and B are on the same machine, I'm going to assume that B is an external hard drive (and therefore easier to steal and more vulnerable to accidental loss when you transport it, hence the need for encrypting B without encrypting A).
So all you'd need to do is encrypt the external drive B with something like TrueCrypt or FreeOTFE, and use any of the various file sync software to sync A with B. Once you provide the password or keyfile to mount B, the sync software won't know or care that B is encrypted.
Try this as well.
cryptsync https://code.google.com/p/cryptsync/
I've been using it for a few days and am ok with it so far.
Features
- it encrypts and compresses to 7zip.
- it also encrypts filenames
- "Hot file" monitor changes
- Filename exclude filters