When a client sends a transaction he must specify a list of addresses. For those addresses for which are declared as writable, the user must provide a signature. According to the Solana docs, the solana runtime verifies that each signature was signed by the private key corresponding to the public key at the same index in the message's account address array.
What I understand is this, for each account that stores data and we want to modify we must use its corresponding private key to sign the transaction. (not our solana-user-account private key but the data's account pk)
Now the part that confuses me is the signer authority. Can we use this user's private key to sign the transaction rather, allowing the data storage account to me modified ? But doesnt the runtime compares the signature corresponding public key to the public key in the message's account address ? If so then the signer authority is not equal to the writable storage account and so this check would fail.
I've seen other posts saying that signer authority is used by a program (and not the runtime) as a check, kind of like a require (msg.sender == address x) in solidity.
This is all very confusing which is the correct definition for "Authority". Is there perhaps a difference between Authority and Signer Authority ?
I know how owner works so there is no confusion there