Good job! :-)
On Tue, Dec 29, 2015 at 12:59 PM, Julian Steinwachs < [email protected]> wrote: > Finally got it! new Buffer(16) does not create an all zero buffer instead > i use new Buffer("00000000000000000000000000000000","hex") now. Will push > the working poc to https://github.com/Tschaul/twister-crypto-js-poc/ > > Greetings > > > On 29.12.2015 12:12, Julian Steinwachs wrote: > > When i insert decrypter.setAutoPadding() the testvector at least gets > decrypted correctly. For the DM i sent to my testaccount it get something > strange however: "`3:mqg6:secret2:to9:pampalulue" without the double > quotes. "pampalulu" is the name of the testaccount and "secret" is the > message. It probably should be a bencoded string but it is malformed. The > correct decrypted content is probably "d3:msg6:secret2:to9:pampalulue". So > the first byte gets corrupted from 64 to 60 and 5th one gets corrupted from > 73 to 70. Any idea whats going on? > > > On 28.12.2015 11:16, Julian Steinwachs wrote: > > I pushed a version with the testvector. The hmac signatures match. The > aes_key entry matches the aes_key concatenated with the hmac_key. What is the > "ecies_key_derivation" entry? Greetings! > > > On 27.12.2015 18:32, Miguel Freitas wrote: > > On Sun, Dec 27, 2015 at 2:16 PM, Julian Steinwachs < > <[email protected]>[email protected]> wrote: > >> no it does not work with the testvector. The problem is the new version >> of bitcoinjs-lib . The code from the twister-html repo is incompatible with >> the new version. They changed some method signatures. >> >> > hmmm, got it. > > we may compare intermediate steps to pinpoint where it starts to fail (eg. > the "secret" derived from EC multiplication before computing the sha512 > etc). > > >> Also i find it strange to use an empty buffer als iv. Thoughts thats just >> for the testvector. >> >> > That's correct: the IV is actually initialized to all zeros (16 bytes), > see here > > https://github.com/miguelfreitas/twister-core/blob/master/src/key.cpp#L379 > > Which is fine, btw, since we don't reuse the key between DMs. > > (You may try if "empty IV" is the same as "all zeros IV" for this new > bitcoinjs-lib) > > regards, > > Miguel > > -- > You received this message because you are subscribed to the Google Groups > "twister-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to <[email protected]> > [email protected]. > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "twister-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "twister-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "twister-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "twister-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
