1. from the blockchain, a transactions public key is mashed together with a random number
2. a specific output is used
3. bobs private key is used
4. the above three things are mashed together into a private key
5. another random number mashes with a public key
6. number 5 gets mashed with the following
and I got lost and im at work and peeps gettin coffee.
let me give it a try
Bob wants to spend XMR he received in his account and send it to Carol.
How does he compase the transaction?
A: Bob gets acces to his "real input" that was send to his "stealth address"
1. Bob needs the public key from the transaction that contains the output he received and wants to send
2. Bob also selects the exact number of the output from the transaction that contains the output he wants to send. The other output(s) in this transaction is/are change (Bob doesn't have the private key for those other outputs)
3. Bob needs the "master" private key of his account
4. 1,2 and 3 are used to calculate the private key for the specific output he wants to send. (the public key for the transaction can be calculated from this private key)
B: to protects Carol's identity, Bob will do the folowing to generate a "one time" public key for this transaction, making it impossible for others to link all transactions send to Carol to the same "stealth address"
5. Bob generates a random number
6. this random number is hashed into the transaction public key
7. he selects the number associated with the output that Carol will receive, the other output(s) is/are change that goes back to Bob.
8. he needs the "master" public key from Carol to be able to send it to her stealth address
9. 6,7 and 8 are used to calulate the public key for the specific output he wants to send
C: to "mix" the inputs, Bob creates a ring signature
10. He selects the actual public key from the output he wants to send, but he also adds other public keys into the mix.
11. to prevent double spending, Bob needs to send a valid "key image" together with the public keys of the outputs.
12. he signs the combination of inputs and the key image with his private key, prooving the key image is valid (Bob owns the private key associated with the key image) and that (somehow? I don't know how this works) one of the public keys is used to generate this key image, but as a spectator of the blockchain, we can't know which of the used outputs is "the real one that is being transferred".
13. This is the collection of outputs that is signed. He grabbed the "fake ones" from the blockchain. He doesn't need permission from the owners for that.
14. This is the key image he signed. If Bob ever tries to send the same output again, the exact same key image will be generated and thus the double spend will be detected.
15. this "ring signature" is added to the transaction containing the publi keys that are used in the transaction and proving Bob's ownership of one of those inputs.
tell me if I was terribly wrong
edit: damn it, luigiiii is faster than me
This voiced over an animation of the transaction would be a great guide to how a Monero transaction happens.