Are we talking about bare-msig output or about p2sh address (the address which starts with "3")?
The bitcoin address that is returned when using the createmultisig RPC
If I still have two of the public keys (A and B) , shouldn't I be able to make a redeem script in
which the 3rd public key is bogus, but which would let me sign the transaction with the two
remaining matching private keys (Apriv and Bpriv), thus spending the BTC out of the multisig address?
Why on earth you are going so strange way?
You have redeemScript and its funded address.
You are able to parse the redeemScript and see all three public keys in it
You have two private keys of these three
This is enough to redeem funds from the address.
You do not need to construct any more data structures and scripts
[/quote]
Not exactly - let me illustrate
The original multi-sig address was created with keypairs A, B, and C in that order. So the redeem script looks something like
In this scenario, I have lost the C keypair, and I have only the partial redeem script, because the file saving the redeem script was corrupt.
I still have keypair A and B. Why can't I generate a redeemScript that looks likes
and still use keypair A and keypair B to redeem the transaction?
In other words - when I am trying to spend from the multisig account, and I do "signrawtransaction" RPC with a modified redeemScript, what is the mechanism that can check to know whether that redeemScript was modified or not? is the hash of the original redeem script put into the funding transaction of the multisig wallet?