1 2016-11-28 00:25:18 <parliament> How does a miner prove that they have a solution to the network without actually sharing the solution?
2 2016-11-28 00:25:34 <parliament> I assume they don't share the real solution because then someone else could steal it and claim to have found it.
3 2016-11-28 00:26:26 <parliament> the docs I've read that describe the number of leading 0 bits in the hash etc seem to always omit this detail
4 2016-11-28 00:26:34 <achow101> parliament: no. the solution for a block includes the coinbase transaction which pays the miner
5 2016-11-28 00:26:58 <parliament> OH
6 2016-11-28 00:27:00 <parliament> thank you !
7 2016-11-28 09:11:37 <venzen> ping jonasschnelli
8 2016-11-28 09:12:54 <venzen> jonasschnelli: i have compiled a .so file from your C chacha20poly1305@openssh library
9 2016-11-28 09:14:03 <venzen> jonasschnelli: i'm using this .so file and the procedure and data in tests.c as the basis for writing a Python wrapper
10 2016-11-28 09:16:27 <venzen> jonasschnelli: I've done some research to figure out how i can see the members of struct &aead_ctx, including defining a macro to print out the contents, but i'm still not clear
11 2016-11-28 09:18:14 <venzen> jonasschnelli: as far as i can see this struct cast the keys K1 and K2 as an object that is passed to chacha20poly1305_crypt()
12 2016-11-28 09:20:21 <venzen> jonasschnelli: what are the struct member names? I assume 'input' (int 16) via main_ctx is one, anything else I need to cast in that struct before passing to chacha20poly1305_crypt() ?
13 2016-11-28 11:43:49 <jonasschnelli> venzen: 1st: be aware of that the C implementation is not really tested yet.
14 2016-11-28 11:44:32 <jonasschnelli> venzen: chacha20poly1305_init(&aead_ctx, aead_keys, 64); sets both keys (K1 and K2)
15 2016-11-28 11:44:46 <jonasschnelli> (512 bit key material)
16 2016-11-28 11:44:57 <jonasschnelli> = 2 x 32byte key (see BIP151)
17 2016-11-28 11:45:55 <jonasschnelli> First key is the key used to encrypt the payload/data, second key (upper 32 bytes) are used for the encrypting the payload-size.
18 2016-11-28 13:19:38 <venzen> jonasschnelli: thanks for the feedback.
19 2016-11-28 13:21:13 <venzen> jonasschnelli: if we call chacha20poly1305_init(&aead_ctx, aead_keys, 64) in isolation (with two concatenated 32byte keys in "aead_keys")...
20 2016-11-28 13:22:10 <venzen> it's output is aead_ctx, correct?
21 2016-11-28 13:23:50 <venzen> so, as fa as i can understand, aead_ctx is a struct chachapolyaead_ctx
22 2016-11-28 13:24:29 <venzen> and struct chachapolyaead_ctx has two similar "sub" structs: main_ctx and header_ctx
23 2016-11-28 13:26:48 <venzen> How do we access the data encapsulated in aead_ctx? With aead_ctx.input, perhaps? I would like to understand this in order to define the data structure in my Python wrapper
24 2016-11-28 13:32:26 <jonasschnelli> aead_ctx is the context... and yes. There are two chacha20 context in the aead_ctx
25 2016-11-28 13:33:11 <jonasschnelli> Not sure how you do that in python... but can't your python context just holds the chachapolyaead_ctx?
26 2016-11-28 13:33:24 <jonasschnelli> IMO there is no need to expose/fiddle with the inner elements of the chachapolyaead_ctx
27 2016-11-28 13:39:35 <venzen> jonasschnelli: that would be better :) do we need to call chacha20poly1305_init() prior to making a call to chacha20poly1305_crypt() ? or can we call the chacha20poly1305_crypt() directly?
28 2016-11-28 13:41:21 <jonasschnelli> venzen: Yes. chacha20poly1305_init needs to be called otherwise you would have no keys
29 2016-11-28 13:41:37 <jonasschnelli> chacha20poly1305_init does set up the chacha20 keys
30 2016-11-28 13:42:04 <venzen> indeed, and then we can pass that straight ointo _crypt()
31 2016-11-28 13:42:11 <venzen> *into
32 2016-11-28 13:42:34 <jonasschnelli> Once you have done the init() you can use the context with chacha20poly1305_crypt
33 2016-11-28 13:42:52 <jonasschnelli> the chacha20poly1305_crypt is for encrypt and decrypt.
34 2016-11-28 13:43:02 <jonasschnelli> (mind the last int parameter)
35 2016-11-28 13:43:34 <venzen> sure. Well, to make a wrapper, i'm going to have to look inside that returned structure (aead_ctx)... no problem, i'll do it
36 2016-11-28 13:44:18 <jonasschnelli> venzen: great. I hope you PR the work on https://github.com/jonasschnelli/chacha20poly1305
37 2016-11-28 13:45:06 <venzen> i must covert the struct internals to a Python class - only because i need to cast that struct in Python before i can pass it to the wrapped _crypt()
38 2016-11-28 13:45:29 <venzen> sure, i will PR once there is something workable to show
39 2016-11-28 15:55:27 <jonasschnelli> molz: No. The current plan is to get the first stepping stone into master (auxiliary block requests)
40 2016-11-28 15:55:30 <jonasschnelli> https://github.com/bitcoin/bitcoin/pull/9171
41 2016-11-28 16:17:56 <molz> jonasschnelli, ah ok, thank you