EDIT.
IOTA Bundle.
https://iotatangle.slack.com/archives/C3V610ULS/p1506361090000178 https://iotatangle.slack.com/files/U68RG1N80/F78E6BKR8/iota_bundle.jpgMottl Wolfgang [2017.09.25 8:38 PM]
uploaded and commented on this image: IOTA Bundle.jpg
Bob wants to send Alice 1i.
What happend is the following:
Bob has a IOTA seed. On one of the 'incredible many' addresses he can creat with his seed, he has a balance of 1000i.
1)he needs to creates a bundle Hash by hashing together the following things:
1x his input address (which has 1000i on it)
1x Alic address (that gets +1i)
1x remainder address that gets (+999i)
1x the overall transaction value of 1i
1x signatur fragments
1x message ("Hi Alice, thats 1i I owe you")
1x timestamp
2)he ceates the transaction object D. To get the hash of D, he adds
2x referenc hashes (F and E) notice that this should be hashes of transactions objects like A, we are about to build!
1x his remainder address
1x value +999i
1x timestamp, tag, message
1x index= 3
1x max index= 3
1x bundle hash
1x nounce (result of PoW)
together and then hashes it.
3)he creates the tranaction object C. He now again needs the hash of C. Therefor he packs together:
2x referenc hash (D and E). Lukily he just created D hash ^^
1x value 0
1x signature
... ??
1x index= 2
1x max index= 3
1x bundle hash
1x nounce (a new PoW has to be done)
4)he creates the transaction object B.
2x reference C and E
1x his address that has 1000i on it.
1x value -1000i
1x signatur
1x index= 1
1x max index= 3
1x bundle hash
1x nounce (a new PoW has to be done)
5) he creates A.
2x reference B and E
1x Alices address
1x value +1
1x signatur fragment?
1x index= 0
1x max index= 3
1x bundle hash
1x nounce (a new PoW has to be done)
now Bob is nearly done. all he needs now is to convert all 4 transaction objects A,B,C and D into trits, and then broadcast them.
If the bundle is correct, a fullnode will provide the hash of A to others, so they can reference it.
I wrote this things together for myself once. I'd be happy if others could correct me and add explanations to the 0 value transaction C, and about signing transactions
Michael Schierl [11:35 PM]
@mottl C and D both need the address where Alice tries to spend from, and they contain half of the signature each
[11:35]
If you want to find out how messages are signed, you first have to understand how addresses are generated. :slightly_smiling_face:
Michael Schierl [11:45 PM]
First you need a key for the address. The exact way how to compute this key from the seed and key index does not matter for a high-level discussion. Anyway, the key is a huge long thing, it consists of 81 blocks of 81 trytes each (We will ignore security level of addresses for now)
To make an address of it, you need to take each blocks, hash it 27 times with KERL (so hash it, and hash the result again, etc.), and then build a new KERL Hash of all the 81 parts together (So you have 81*27 times hash of 81 trytes, and 1 times hash of 81*81 trytes). This final hash is called an address (you may want to add 9 trytes checksum before presenting it to humans, though)
[11:47]
The idea of Winternitz signatures is that you can reveal part of the key now, by hashing parts of it not 27 times but less often. To verify, the recipient can apply the remaining number of hashes to the blocks and hash the blocks together. If the address is the same, the signature is valid
[11:50]
To not leak information, you have to make sure that the bundle hash is evened out (the sum of all the trytes is exactly 0). Otherwise just replace a few trytes (deterministically) so they are. Now you split the evened out bundle hash in 81 blocks (of each 1 tryte), and encode each tryte in one of the 81 blocks. How to actually do this is something you can probably find out yourself (If not, feel free to ask). All these "half-hashed" blocks make up the signature. (edited)
Mottl Wolfgang [1:51 AM]
@mihi awesome thank you! You just raised my interest in learning about cryptography!