Re: XChaCha20 decryption issue.
Lucas Marchetti <[email protected]> Sun, 5 Nov 2023 01:38:45 -0800 (PST)
| Newsgroups | gmane.comp.encryption.cryptopp |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_8246_1553094292.1699177125327 Content-Type: multipart/alternative; boundary="----=_Part_8247_620367606.1699177125327" ------=_Part_8247_620367606.1699177125327 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sorry, seeing now that I've linked the wrong Golang library, here it=20 is: https://pkg.go.dev/golang.org/x/crypto/chacha20poly1305 On Sunday, November 5, 2023 at 10:10:44=E2=80=AFAM UTC+1 Lucas Marchetti wr= ote: > I've just made a test encrypting the string "Hello World!" with both=20 > client and server functions and these are the results. > > [image: Screenshot 2023-11-05 100312.png] > > Both green-highlighted bytes corresponds to the input string but, as you= =20 > can see, there is a different padding that I'm 100% sure is the source of= =20 > the problem. > > On Saturday, November 4, 2023 at 7:39:31=E2=80=AFPM UTC+1 Lucas Marchetti= wrote: > >> Good evening. >> >> I'm building a client-server application and I want to implement a=20 >> XChaCha20 communication over TCP after performing key exchange. >> >> What I'm issuing is a bad decryption output like the one shown in the pi= c. >> >> [image: Screenshot 2023-11-04 193625.png] >> >> I'm currently using crypto++ 8.9 in the client-side and=20 >> https://pkg.go.dev/golang.org/x/crypto/chacha20 in the server-side. >> >> Is that something related to sealing or authentication implemented in th= e=20 >> Golang library? >> >> Functions that I'm using: >> >> [image: Screenshot 2023-11-04 193751.png] >> >> [image: Screenshot 2023-11-04 193832.png] >> >> Thanks in advance. >> > --=20 You received this message because you are subscribed to the Google Groups "= Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/= cryptopp-users/65021204-cb99-492b-beb4-9c25cefaf7ben%40googlegroups.com. ------=_Part_8247_620367606.1699177125327 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sorry, seeing now that I've linked the wrong Golang library, here it is:=C2= =A0https://pkg.go.dev/golang.org/x/crypto/chacha20poly1305<br /><br /><div = class=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">On Sunday, Nov= ember 5, 2023 at 10:10:44=E2=80=AFAM UTC+1 Lucas Marchetti wrote:<br/></div= ><blockquote class=3D"gmail_quote" style=3D"margin: 0 0 0 0.8ex; border-lef= t: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I've just made a t= est encrypting the string "Hello World!" with both client and ser= ver functions and these are the results.<div><br></div><div><img alt=3D"Scr= eenshot 2023-11-05 100312.png" width=3D"726px" height=3D"111px" src=3D"http= s://groups.google.com/group/cryptopp-users/attach/5b1bbc5faec59/Screenshot%= 202023-11-05%20100312.png?part=3D0.1&view=3D1"></div><div><br></div><di= v>Both green-highlighted bytes corresponds to the input string but, as you = can see, there is a different padding that I'm 100% sure is the source = of the problem.<br><br></div><div class=3D"gmail_quote"><div dir=3D"auto" c= lass=3D"gmail_attr">On Saturday, November 4, 2023 at 7:39:31=E2=80=AFPM UTC= +1 Lucas Marchetti wrote:<br></div><blockquote class=3D"gmail_quote" style= =3D"margin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:= 1ex">Good evening.<br><br>I'm building a client-server application and = I want to implement a XChaCha20 communication over TCP after performing key= exchange.<br><br>What I'm issuing is a bad decryption output like the = one shown in the pic.<br><br><img alt=3D"Screenshot 2023-11-04 193625.png" = width=3D"266px" height=3D"19px" src=3D"https://groups.google.com/group/cryp= topp-users/attach/58230e8ec9c5a/Screenshot%202023-11-04%20193625.png?part= =3D0.1&view=3D1"><br><div><br></div><div>I'm currently using crypto= ++ 8.9 in the client-side and=C2=A0<a href=3D"https://pkg.go.dev/golang.org= /x/crypto/chacha20" rel=3D"nofollow" target=3D"_blank" data-saferedirecturl= =3D"https://www.google.com/url?hl=3Den&q=3Dhttps://pkg.go.dev/golang.or= g/x/crypto/chacha20&source=3Dgmail&ust=3D1699263468573000&usg= =3DAOvVaw1LtEIKQkoi-KLp5XhynhQO">https://pkg.go.dev/golang.org/x/crypto/cha= cha20</a> in the server-side.<div><br></div><div>Is that something related = to sealing or authentication implemented in the Golang library?</div></div>= <div><br></div><div>Functions that I'm using:</div><div><br></div><div>= <img alt=3D"Screenshot 2023-11-04 193751.png" width=3D"534px" height=3D"197= px" src=3D"https://groups.google.com/group/cryptopp-users/attach/58230e8ec9= c5a/Screenshot%202023-11-04%20193751.png?part=3D0.3&view=3D1"><br></div= ><div><br></div><div><img alt=3D"Screenshot 2023-11-04 193832.png" width=3D= "534px" height=3D"197px" src=3D"https://groups.google.com/group/cryptopp-us= ers/attach/58230e8ec9c5a/Screenshot%202023-11-04%20193832.png?part=3D0.2&am= p;view=3D1"><br></div><div><br></div><div>Thanks in advance.</div></blockqu= ote></div></blockquote></div> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;Crypto++ Users" group.<br /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">cryp= [email protected]</a>.<br /> To view this discussion on the web visit <a href=3D"https://groups.google.c= om/d/msgid/cryptopp-users/65021204-cb99-492b-beb4-9c25cefaf7ben%40googlegro= ups.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d= /msgid/cryptopp-users/65021204-cb99-492b-beb4-9c25cefaf7ben%40googlegroups.= com</a>.<br /> ------=_Part_8247_620367606.1699177125327-- ------=_Part_8246_1553094292.1699177125327--