A certain enough person will be able to extract your key, and in fact there is not much that can be done about this. You can try to somehow confuse the keys (raise the bar on how they should be defined), but you cannot make them not get the key.
However, depending on why you need to store the secret key, you can use Asymmetric key cryptography . You can save the public key, which can be limited by encryption (not decryption) or authentication, while it can keep the secret key safe.
Adam luchjenbroers
source share