So this is more of a general practice question:
A music application I'm working on requires the use of a user token for verification with a third-party service. Obviously it's best to encrypt this in local storage, but I'm struggling to think of implementations with shared key storage in the context of symmetric encryption.
In Android, Keystore functions allow you to store the shared key (more) securely. Outside of that, the only way to access them in an application's data folder is via a process with root privileges, which can't commonly be created on a user's end.
In Linux, I believe you can use the Secret Service API via D-Bus' libsecret if you're compiling to Kotlin/JS? That supports KDE and GNOME, I don't know if it supports other environments, like XFCE/LXQT/etc.
I'm not experienced with Apple products at all, so I can't give any thoughts on that front.
In Windows, I'm sure there's some old implementation that corrupts itself every 30 minutes, but I can't think of one.
Regardless of all that, KeePass seems to be the only cross-platform example available for storing keys, and I'm finding it hard to visualise a universal approach to storing a key.
I guess I could use a key derivation function, and ask the user for a password on each login, but that seems excessive for what the application is.
Does anyone have any thoughts?