08:08:41 hello 08:46:26 any help on creating manually view_tag from spend key 08:58:19 lagoon93: They're dependent on who you're sending to. 08:58:49 creating manually i said before sending 08:59:03 ... view tags are linked to a specific output though. 08:59:12 They can only be created when you are sending to someone. 08:59:32 If you have their address, you need to generate a transaction key, `r`. The shared key is Hs(8rA || o), where A is their public view key. The view tag is keccak256(shared_key)[0], unless I'm mistaken. 09:00:07 So you need the public view key of who you're sending to AND the transaction's `r`, if you're generating a view tag for your recipient. 09:03:21 I already gave him all the required links several times, don't waste your time 09:04:19 Thanks for the warning :p I just saw the hello and wanted to help 09:04:36 There also were historical proposals with static view tags IIRC, so I wanted to try to clarify that. 09:04:46 view tag is keccak256("view_tag" || derivation || output_index as varint)[0] 09:09:02 here http://paste.debian.net/1245252/  there is no view_tag calculation function 09:09:11 so i must create a new one 09:10:56 lagoon93: keccak256(f)[0] 09:11:28 ah 09:12:33 Sorry. One second. 09:13:02 Apparently we all have different opinions on what the shared key is. I always considered it Hs, yet rA alone is the ECDH shared secret. 09:13:21 View tags may have been implemented solely using rA... that'd make sense for a few reasons. Double checking now. 09:14:23 Wow, no, I was very wrong. sech1 is correct, and I just missed their second message. 09:15:16 It's not keccak256(Hs(..)). `var D = generate_key_derivation(A, r); "7b0a76d852af2beffda86cc575622a0c4f89382cc878d8f19b71b730aa>` Then it'd be keccak256("view_tag" || D || varint(o))[0] 09:15:57 (which is what sech1 said, and I completely butchered. Basically derivation_to_scalar with "view_tag" in front. 09:16:09 *front) 09:16:34 so is keccak256(D)[0] 09:17:13 No. keccak256("view_tag" || D || varint(o))[0] 09:17:31 derivation_to_scalar does keccak256(D || varint(o)). 09:17:43 You need to prepend "view_tag" and only grab the first byte. 09:21:01 got it but is javascript so i need little different syntax like  keccak256"("view_tag" || D || varint(o))[0]" 09:22:23 My recommendation would be to copy derivation_to_scalar to derivation_to_view_tag. 09:22:34 Same function, except "view_tag" and [0] 09:25:07 var x = derivation_to_scalar(D, 0); 09:25:12 i dont understand 09:28:37 lagoon93: This isn't going anywhere, despite me thinking we had progress. derivation_to_scalar implements keccak256(D || varint(o)). You need to implement keccak256("view_tag" || D || varint(o))[0] to calculate a view tag. I'll bow out like sech recommended 09:29:50 i understand that just the implementation on javascript is the issue 09:30:00 i have function keccak256 09:30:06 on javascript 09:30:56 but how to turn your c++ function in javascript 09:31:22  keccak256"("view_tag" || D || varint(o))[0]"   gives error syntax 09:50:35 laggon93, please don't take that as an insult, but I think it's time for you to go back to whomever gave you this job, and ask to find an alternative way to a solution 09:51:18 no one gives me "this job" 09:51:32 Ok, sorry then, misunderstanding. 09:51:41 I thought you work for somebody 09:51:57 if was like this i would search to pay someone and not to bother! 09:52:45 but i want to learn all the procedure 09:53:46 Did you read that discussion on github on the PR that added view tags ? 09:53:52 yes 09:53:57 Hmmm, noble goal, but then maybe you should prepare the ground first, so to say, before you attach this view tag problem again. 09:54:04 many times 09:54:09 Learn some basics about Monero first. Did you read already https://www.getmonero.org/library/Zero-to-Monero-2-0-0.pdf? 09:54:22 yes 09:54:30 * moneromooo goes double check they talk about the crypto steps 09:54:36 i have some basics.... 09:55:34 And good knowledge about all the involved languages? I mean, frankly, a statement like this one is pretty surprising: "keccak256"("view_tag" || D || varint(o))[0]"   gives error syntax" 09:56:16 no i have no good knowdlege of languages 09:57:20 https://github.com/monero-project/research-lab/issues/73 (linked from that discussion) gives the crypto ops. 09:57:35 Do I remember correctly, you said once your C++ is not very good? So maybe acquire solid C++ programming knowledge first, say, over the next 2 weeks? 09:59:30 yes but i'm some """" from the view_Tag code now 10:01:08 I now that feeling :) 10:22:45 has anyone the good will to find the right syntax for  keccak256"("view_tag" || D || varint(o))[0]" 10:25:34 FWIW, || in this context means concatenation, not the usual or. 10:25:37 it's better that you learn javascript than ask here every time you get a compilation error 11:35:38 output of  "keccak_256("view_tag" || D || varint(o))"   is dde69f78c8a9f4ab5a2b8061b4a92a2ad3febb9996e6cbab99d3b99fccac4f98 11:35:50 but view_tag is not dd 11:39:34 Check whether "view_tag" should have terminating NUL or not. Check D and o are really the right values. Check whether your varint encoder is correct. 11:42:09 i dont know really what o represent 11:43:06 i had this function from  kayabaNerve  but i dont know what (o) represent 11:45:38 D is real value 11:47:02 lagoon93: Output index. 11:47:12 > My recommendation would be to copy derivation_to_scalar to derivation_to_view_tag. 11:47:32 how to do that on javascript 11:48:00 "keccak_256("derivation_to_scalar " || D || varint(o))" 11:48:03 didnt work 11:48:07 ... 11:48:19 We cannot help you learn C++ aand JS from scratch. 11:48:44 I'm suggesting you take the existing d_t_s function, copy it, and edit it as needed into a new function, d_t_v_t. 11:53:02 var f = derivation_to_scalar(D, 0);  so keccak_256(f); 11:53:08 i'll give a try 11:53:24 or im wrong again 12:21:48 again wrong 12:24:56 any help please 12:25:04 im some ''' away 12:37:20 keccak_256(((f) || D || varint(o)));     output is "bba95343e59e78ba4e46678dfc057f1914ec2c7f3abb5db057de02a2f64624d4"  but again is not view_tag 12:50:24 anyone with good will to help on puttig '''' in the right direction 12:51:35 You can start bu checking the varint encoder is good. At least for a 0-3 value, it should give one one byte with that value. 12:52:08 Then checking you concat properly (eg, no padding) and that you use the correct length for the varint. 12:57:37 varint(o) 12:57:44 I hope you didn't literally put "o" there 12:57:49 it must be output index 12:59:32 One thing you could do actually: in the monero code, log ALL inputs and intermediate values and results for the view tag calc, make a monero tx with that code. Then read the log, save all those new log lines, and feed the same inputs to your code. Check the first step where the intermediate values diverge. Loop. 13:00:50 varint(0) 13:01:35 keccak_256("view_tag" || D || varint(0)); 13:01:44 output dd but is not view_tag 13:02:16 dde69f78c8a9f4ab5a2b8061b4a92a2ad3febb9996e6cbab99d3b99fccac4f98   all output but i must take 1byte right 13:02:19  "dd" 13:03:35 all vars are from http://paste.debian.net/1245268/ 13:08:33 moneromoo  to log monerod or wallet-cli 13:11:45 The wallet. derive_view_tag IIRC. 13:20:09 but really is strange that anyone cant propose smth more straightforth