This is tangentially related to this question:
Can I Make A Contract A Keyholder to a Multisig Wallet?
Is it possible to setup a multisignature wallet from directly within a contract? My intuition says no, because any generated private keys to be assigned to the key holders would be visible on the public chain.
If it were possible, the basic idea seems like it could be extremely useful for contracts facilitating crowdfunding or situations where large amounts of ether need to be managed decentrally but with enough flexibility that it would be infeasible to attempt to enforce every possible future use of the funds via explicit contracts.
As far as I know, nothing like this currently exists in Solidity. But does anyone have an idea of how this could be implemented? I was thinking something along the lines of a function that could generate a keypair without saving the private key in the state of the contract.