I know you can create a multisignature address with the command:
bitcoind createmultisig 2 ["pubkey1", "pubkey2", "pubkey3"]
As described here: https://gist.github.com/gavinandresen/3966071
This command returns the address (starting with character '3') and the redeem script.
My question: how to create multi-signature address and redeem script without using bitcoind? What algorithm is used?
Could you point me to some sources?