I'm a beginner to security, and trying to understand how best to secure a private key. I understand keys should never be stored in plaintext - however, surely encrypting them with another key provides the same problem (but for this new encryption key)...?
The same with key vaults - if you store your key seperately and ping somewhere else which does all your encrypt/decrypt functions, surely an attacker, having gained access to your encrypted data, could simply call the decrypt function and have access to all your decrypted data?
Edit: this is a symmetric key being used to encrypt some data being stored in a database (not passwords, these are being hashed)