Re: Re: SonarLint complaining about "Use a stronger padding scheme"
Jeffrey Walton <[email protected]> Tue, 16 Apr 2024 14:06:54 -0400
| Newsgroups | gmane.comp.encryption.cryptopp |
|---|---|
| Message-ID | <CAH8yC8=YDGCNLMcN8RRKO08=Z3ytZcM0xswyJtH+Ds9bfKENEA@mail.gmail.com> |
--00000000000010246306163a9bcd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 16, 2024 at 1:44=E2=80=AFPM One Sini <[email protected]> wrote: > I wasn't entirely satisfied with the security, so I've adjusted the code. > I'm not sure if that helps you, depending on what you're doing with it. > > This code uses RSA with OAEP (Optimal Asymmetric Encryption Padding) to > avoid security issues like padding oracle attacks. It generates RSA keys > with a length of 2048 bits, encrypts the message with OAEP padding, and > then decrypts it. > OAEP was a red herring. OP wants to use a RSA signature scheme, not an encryption scheme. (His mention of OAEP was the reason I originally posted a link to RSA Encryption Schemes). Jeff --=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/CAH8yC8%3DYDGCNLMcN8RRKO08%3DZ3ytZcM0xswyJtH%2BDs9bfKENEA%40= mail.gmail.com. --00000000000010246306163a9bcd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Tue, Apr 16, 2024 at 1:44=E2=80=AF= PM One Sini <<a href=3D"mailto:[email protected]">[email protected]</a>&= gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0= px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div = dir=3D"auto"><div><span style=3D"font-family:s=C3=B6hne,ui-sans-serif,syste= m-ui,-apple-system,"segoe ui",roboto,ubuntu,cantarell,"noto = sans",sans-serif,"helvetica neue",arial,"apple color em= oji","segoe ui emoji","segoe ui symbol","noto= color emoji";font-size:16px;font-style:normal;font-weight:400;letter-= spacing:normal;text-indent:0px;text-transform:none;white-space:pre-wrap;wor= d-spacing:0px;text-decoration:none;float:none;display:inline;color:rgb(13,1= 3,13)">I wasn't entirely satisfied with the security, so I've adjus= ted the code. I'm not sure if that helps you, depending on what you'= ;re doing with it.</span></div><br></div><div dir=3D"auto"><div><span style= =3D"font-family:s=C3=B6hne,ui-sans-serif,system-ui,-apple-system,"sego= e ui",roboto,ubuntu,cantarell,"noto sans",sans-serif,"h= elvetica neue",arial,"apple color emoji","segoe ui emoj= i","segoe ui symbol","noto color emoji";font-size:= 16px;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0p= x;text-transform:none;white-space:pre-wrap;word-spacing:0px;text-decoration= :none;float:none;display:inline;color:rgb(13,13,13)">This code uses RSA wit= h OAEP (Optimal Asymmetric Encryption Padding) to avoid security issues lik= e padding oracle attacks. It generates RSA keys with a length of 2048 bits,= encrypts the message with OAEP padding, and then decrypts it.</span></div>= </div></blockquote><div><br></div><div>OAEP was a red herring. OP wants to = use a RSA signature scheme, not an encryption scheme. (His mention of OAEP = was the reason I originally posted a link to RSA Encryption Schemes).<br></= div><div><br></div><div>Jeff=C2=A0 <br></div></div></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/CAH8yC8%3DYDGCNLMcN8RRKO08%3DZ3ytZcM0xswyJtH%2BDs= 9bfKENEA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://g= roups.google.com/d/msgid/cryptopp-users/CAH8yC8%3DYDGCNLMcN8RRKO08%3DZ3ytZc= M0xswyJtH%2BDs9bfKENEA%40mail.gmail.com</a>.<br /> --00000000000010246306163a9bcd--