Ok, just to make things clear, and to make sure I understand, an attack could look like this;
1. I trick you into using my GitEvil Repository Service (GERS™).
2. After you upload your data, I swap target site information (in this case name) with the name for GERS™.
3. Next time you log in to GERS™, you accidentally send the login information for target site instead.
4. Profit
In that case, keeping with the wish to keep the manager searchable without the master password, would it be possible to mitigate this by HMAC'ing the encrypted password with, for instance, the site name?
As should be obvious from the above, I'm no crypto expert.
Yes, if you don't care about GERS™ knowing which sites you use, when you add accounts to them, when you chance passwords, and all the other sensitive information that can be extracted from metadata.
> would it be possible to mitigate this by HMAC'ing the encrypted password with, for instance, the site name?
In that case you duplicate the metadata: You keep one datum in plain text for search purposes, and a second for MAC/verification purposes. That's a somewhat awkward construction, and you can accidentally create new security holes in your application (by using the MAC'd metadata at point A and the plain metadata at point B – there's a bunch of high-profile CVEs created this way).
Alternatively, you can MAC the metadata separately from the password. However, (H)MAC involves a secret key that must not be shared in plain text. So you'd need encryption anyway to be able to verify the MAC key.
In either case you still allow a few attacks: Attackers can delete entries (DoS), attackers can selectively replace entries with older versions (DoS or information leakage if the password still works), and probably a few others.
Using the password AEAD to encrypt the whole database, not just passwords, not just individual entries, is not just safer, but also reduces complexity.
Hm, seems my solution ticks all checkboxes except multi-platform availability (python in e.g. Windows is… not fun). I'll keep that in mind for the inevitable rewrite, thanks for the feedback.
This one is about $8 https://www.banggood.com/600TVL-8_0MP-14-2_8mm-CMOS-FPV-170-...
How about this one for $22 with a 5.8GHz transmitter https://www.banggood.com/Eachine-TX01S-NTSC-Mini-5_8G-40CH-2...