Re: Re: SonarLint complaining about "Use a stronger padding scheme"
One Sini <[email protected]> Thu, 25 Apr 2024 19:47:00 +0200
| Newsgroups | gmane.comp.encryption.cryptopp |
|---|---|
| Message-ID | <CAJm61-AixakJpCPKYmxLeabAF8DdY8OqGLY_KGmWNiupLog+1g@mail.gmail.com> |
--0000000000006fcaf00616ef6035 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I hope this can you help Missing Definitions: Your code snippet lacks definitions for functions such as CertIsCurrentTimeAfter, PEM_Load, SetDate, and others. Make sure these functions are defined somewhere in the code or declared in the appropriate header files. Uninitialized Variables: The variables notBeforeDate and notAfterDate are used in the LoadX509PEMCertificateFromString function, but it's not shown how they are initialized. If they don't have valid values, this could lead to unexpected behavior. Return Values in LoadX509PEMCertificateFromString: If an exception is thrown and the function LoadX509PEMCertificateFromString returns false, the code continues to execute as if the certificate had been loaded. Make sure that in case of an error, the function exits early. Potential Memory Leaks: There's no indication that the memory allocated for notBeforeDate and notAfterDate in LoadX509PEMCertificateFromString is freed. Ensure that memory is properly managed to avoid memory leaks. Unnecessary Code: In the CheckCertDate function, there's an unnecessary section at the end that reaches return false. This section is unreachable and can be removed. Unused Variables: In the VerifyCert function, variables such as signature, toBeSigned, and publicKey are declared but not used. Verify if they are actually needed and remove them if not to simplify the code. Have nice Day Frank Sapone <[email protected]> schrieb am Do. 25. Apr. 2024 um 14:59: > I based my code off the stuff in the wiki. So what am I doing wrong? I > just want the PSS to make the SCA shut up. > > bool X509CertMod::CheckCertDate(bool bNotBefore) > { > bool bRetValue; > if (bNotBefore) > { > bRetValue =3D CertIsCurrentTimeAfter(notBeforeDate); > //printf("Created: %02d %02d, %02d %02d:%02d:%02dZ\n", monthInt, dayInt, > yearInt, hoursInt, minutesInt, secondsInt); > if (bRetValue) > { > //printf("* NotBefore in past. Can use.\n"); > return true; > } > else > { > //printf("* NotBefore in future. Can't use!\n"); > return false; > } > } > else > { > bRetValue =3D CertIsCurrentTimeAfter(notAfterDate); > //printf("Expires: %02d %02d, %02d %02d:%02d:%02dZ\n", monthInt, dayInt, > yearInt, hoursInt, minutesInt, secondsInt); > if (bRetValue) > { > //printf("* NotAfter in past. Can't use!\n"); > return false; > } > else > { > //printf("* NotAfter in future. Can use.\n"); > return true; > } > } > > return false; > } > > bool X509CertMod::LoadX509PEMCertificateFromString(const std::string > &certStr) > { > try > { > StringSource ss(certStr, true); > > PEM_Load(ss, m_Cert); > m_CertStr =3D certStr; > > notBeforeDate.SetDate(m_Cert.GetNotBefore().EncodeValue().c_str()); > notAfterDate.SetDate(m_Cert.GetNotAfter().EncodeValue().c_str()); > bLoaded =3D true; > return true; > } > catch (const std::exception &ex) > { > printf("Failed to load cert string: %s\n", ex.what()); > } > > return false; > } > > bool X509CertMod::VerifyCert(void) > { > const SecByteBlock &signature =3D m_Cert.GetCertificateSignature(); > const SecByteBlock &toBeSigned =3D m_Cert.GetToBeSigned(); > const X509PublicKey &publicKey =3D m_Cert.GetSubjectPublicKey(); > > if (CheckCertDate(true)) > { > if (CheckCertDate(false)) > { > RSASS<PKCS1v15, SHA256>::Verifier verifier(publicKey); > bool result =3D verifier.VerifyMessage(toBeSigned, toBeSigned.size(), > signature, signature.size()); > if (result) > { > //std::cout << "Verified root certificate" << std::endl; > return true; > } > > //std::cout << "Failed to verify root certificate" << std::endl; > } > } > > return false; > } > > On Wednesday, April 24, 2024 at 1:59:49=E2=80=AFPM UTC-4 One Sini wrote: > >> This code demonstrates how to load an X509 certificate and private/publi= c >> keys from files. >> >> >> #include <iostream> >> >> #include <fstream> >> >> #include <string> >> >> >> #include <cryptopp/rsa.h> >> >> #include <cryptopp/files.h> >> >> #include <cryptopp/base64.h> >> >> #include <cryptopp/osrng.h> >> >> #include <cryptopp/pssr.h> >> >> >> using namespace CryptoPP; >> >> using namespace std; >> >> >> void loadX509Certificate(const string& certFile, X509Certificate& >> certificate) { >> >> ifstream file(certFile.c_str(), ios::in | ios::binary); >> >> if (!file) { >> >> cerr << "Error: Failed to open certificate file." << endl; >> >> // Handle error appropriately >> >> return; >> >> } >> >> >> try { >> >> PEM_Load(file, certificate); >> >> } catch (const Exception& ex) { >> >> cerr << "Error: Failed to load X509 certificate - " << ex.what() >> << endl; >> >> // Handle error appropriately >> >> return; >> >> } >> >> } >> >> >> void loadPrivateKey(const string& privateKeyFile, RSA::PrivateKey& >> privateKey) { >> >> ifstream file(privateKeyFile.c_str()); >> >> if (!file) { >> >> cerr << "Error: Failed to open private key file." << endl; >> >> // Handle error appropriately >> >> return; >> >> } >> >> >> try { >> >> PEM_Load(file, privateKey); >> >> } catch (const Exception& ex) { >> >> cerr << "Error: Failed to load private key - " << ex.what() << >> endl; >> >> // Handle error appropriately >> >> return; >> >> } >> >> } >> >> >> void loadPublicKey(const string& publicKeyFile, RSA::PublicKey& >> publicKey) { >> >> ifstream file(publicKeyFile.c_str()); >> >> if (!file) { >> >> cerr << "Error: Failed to open public key file." << endl; >> >> // Handle error appropriately >> >> return; >> >> } >> >> >> try { >> >> PEM_Load(file, publicKey); >> >> } catch (const Exception& ex) { >> >> cerr << "Error: Failed to load public key - " << ex.what() << >> endl; >> >> // Handle error appropriately >> >> return; >> >> } >> >> } >> >> >> int main() { >> >> string certFile =3D "certificate.pem"; >> >> string privateKeyFile =3D "private.key"; >> >> string publicKeyFile =3D "public.key"; >> >> >> X509Certificate certificate; >> >> RSA::PrivateKey privateKey; >> >> RSA::PublicKey publicKey; >> >> >> loadX509Certificate(certFile, certificate); >> >> loadPrivateKey(privateKeyFile, privateKey); >> >> loadPublicKey(publicKeyFile, publicKey); >> >> >> // Continue with using the certificate and keys... >> >> >> return 0; >> >> } >> >> >> >> One Sini <[email protected]> schrieb am Mi. 24. Apr. 2024 um 19:51: >> > Test this way >>> >>> a basic guide on how to generate an RSA key pair with PSS padding, sign >>> an X509 certificate with the private key, and verify the signature with= the >>> public key using the Crypto++ library: >>> >>> 1. Generating an RSA Key Pair with PSS Padding: >>> >>> cpp >>> >>> Copy code >>> >>> #include <cryptopp/rsa.h> >>> >>> #include <cryptopp/osrng.h> >>> >>> #include <cryptopp/pssr.h> >>> >>> >>> using namespace CryptoPP; >>> >>> >>> void generateRSAKeyPair(RSA::PrivateKey& privateKey, RSA::PublicKey& >>> publicKey) { >>> >>> AutoSeededRandomPool rng; >>> >>> >>> InvertibleRSAFunction params; >>> >>> params.GenerateRandomWithKeySize(rng, 2048); >>> >>> >>> privateKey =3D RSA::PrivateKey(params); >>> >>> publicKey =3D RSA::PublicKey(params); >>> >>> } >>> >>> >>> int main() { >>> >>> RSA::PrivateKey privateKey; >>> >>> RSA::PublicKey publicKey; >>> >>> >>> generateRSAKeyPair(privateKey, publicKey); >>> >>> >>> // The RSA key pair has been generated and is now available >>> >>> return 0; >>> >>> } >>> >>> 1. Signing the X509 Certificate with the Private Key: >>> >>> cpp >>> >>> >>> Copy code >>> >>> #include <cryptopp/cryptlib.h> >>> >>> #include <cryptopp/oids.h> >>> >>> #include <cryptopp/rsa.h> >>> >>> #include <cryptopp/sha.h> >>> >>> #include <cryptopp/filters.h> >>> >>> #include <cryptopp/base64.h> >>> >>> >>> using namespace CryptoPP; >>> >>> >>> void signCertificate(const RSA::PrivateKey& privateKey, const X509& >>> certificate, byte* signature) { >>> >>> // Implement the process of signing the certificate here >>> >>> // Use privateKey and certificate to sign the certificate >>> >>> } >>> >>> >>> int main() { >>> >>> // Load or create your X509 certificate >>> >>> // Here, we assume you already have an X509 certificate >>> >>> >>> RSA::PrivateKey privateKey; >>> >>> // Load or generate your private key >>> >>> // Here, we assume you already have a private key >>> >>> >>> byte signature[256]; // Space for the signature >>> >>> >>> signCertificate(privateKey, certificate, signature); >>> >>> >>> // The certificate has been signed, and the signature is now >>> available >>> >>> return 0; >>> >>> } >>> >>> 1. Verifying the Signature with the Public Key: >>> >>> cpp >>> >>> >>> Copy code >>> >>> #include <cryptopp/rsa.h> >>> >>> #include <cryptopp/sha.h> >>> >>> #include <cryptopp/filters.h> >>> >>> #include <cryptopp/base64.h> >>> >>> >>> using namespace CryptoPP; >>> >>> >>> bool verifySignature(const RSA::PublicKey& publicKey, const X509& >>> certificate, const byte* signature) { >>> >>> // Implement the process of verifying the signature here >>> >>> // Use publicKey, certificate, and signature >>> >>> >>> // Return true if the signature is valid, otherwise false >>> >>> return false; >>> >>> } >>> >>> >>> int main() { >>> >>> // Load or create your X509 certificate >>> >>> // Here, we assume you already have an X509 certificate >>> >>> >>> RSA::PublicKey publicKey; >>> >>> // Load or generate your public key >>> >>> // Here, we assume you already have a public key >>> >>> >>> byte signature[256]; // Take the signature from the certificate >>> signature >>> >>> >>> bool isValid =3D verifySignature(publicKey, certificate, signature)= ; >>> >>> >>> // Check if the signature is valid >>> >>> return 0; >>> >>> } >>> >>> These code snippets serve as a foundation. You will need to adapt them >>> according to your specific implementation, including the loading proces= s >>> for the X509 certificate and the private/public keys. Remember to inclu= de >>> error handling and handle edge cases in your implementation >>> I hope this help you >>> ;) >>> >> >>> Manish sharma <[email protected]> schrieb am Mi. 24. Apr. 2024 um >>> 14:42: >>> >>>> Crypto Betting <https://www.brsoftech.com/blog/crypto-sports-betting/= > >>>> >>>> On Wed, Apr 24, 2024 at 6:08=E2=80=AFPM Frank Sapone <franksa...@gmail= .com> >>>> wrote: >>>> >>> Has anyone figured out how to use PSS and SHA256 *WITH *CryptoPP-PEM? >>>>> I also tried reporting this to the issuer tracker at >>>>> https://github.com/noloader/cryptopp-pem and nobody has replied. I >>>>> can't imagine I'm the only person using this library in order to achi= eve >>>>> this with X509 Certs. >>>>> >>>>> Thanks, >>>>> Frank >>>>> >>>>> On Wednesday, April 17, 2024 at 11:43:54=E2=80=AFAM UTC-4 HELA YAICH = wrote: >>>>> >>>>>> Hello, >>>>>> (I'm new user of ns3 and crypto) >>>>>> I have link errors with Crypto++. These errors indicate that the >>>>>> compiler cannot find certain functions or classes defined in Crypto+= +. This >>>>>> can happen if Crypto++ is not correctly linked to my project. Howeve= r, I >>>>>> tried to modify my project's CMakeLists.txt file as follows: >>>>>> set(target_prefix scratch_) >>>>>> >>>>>> function(create_scratch source_files) >>>>>> # Return early if no sources in the subdirectory >>>>>> list(LENGTH source_files number_sources) >>>>>> if(number_sources EQUAL 0) >>>>>> return() >>>>>> endif() >>>>>> >>>>>> # If the scratch has more than a source file, we need to find the >>>>>> source with >>>>>> # the main function >>>>>> set(scratch_src) >>>>>> foreach(source_file ${source_files}) >>>>>> file(READ ${source_file} source_file_contents) >>>>>> string(REGEX MATCHALL "main[(| (]" main_position >>>>>> "${source_file_contents}") >>>>>> if(CMAKE_MATCH_0) >>>>>> set(scratch_src ${source_file}) >>>>>> endif() >>>>>> endforeach() >>>>>> >>>>>> if(NOT scratch_src) >>>>>> return() >>>>>> endif() >>>>>> >>>>>> # Get parent directory name >>>>>> get_filename_component(scratch_dirname ${scratch_src} DIRECTORY) >>>>>> string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "" scratch_dirname >>>>>> "${scratch_dirname}" >>>>>> ) >>>>>> string(REPLACE "/" "_" scratch_dirname "${scratch_dirname}") >>>>>> >>>>>> # Get source name >>>>>> get_filename_component(scratch_name ${scratch_src} NAME_WE) >>>>>> >>>>>> set(target_prefix scratch_) >>>>>> if(scratch_dirname) >>>>>> # Join the names together if dirname is not the scratch folder >>>>>> set(target_prefix scratch${scratch_dirname}_) >>>>>> endif() >>>>>> >>>>>> # Get source absolute path and transform into relative path >>>>>> get_filename_component(scratch_src ${scratch_src} ABSOLUTE) >>>>>> get_filename_component(scratch_absolute_directory ${scratch_src} >>>>>> DIRECTORY) >>>>>> string(REPLACE "${PROJECT_SOURCE_DIR}" "${CMAKE_OUTPUT_DIRECTORY}" >>>>>> scratch_directory ${scratch_absolute_directory} >>>>>> ) >>>>>> add_executable(${target_prefix}${scratch_name} "${source_files}") >>>>>> if(${NS3_STATIC}) >>>>>> target_link_libraries( >>>>>> ${target_prefix}${scratch_name} ${LIB_AS_NEEDED_PRE_STATIC} >>>>>> ${lib-ns3-static} >>>>>> ) >>>>>> else() >>>>>> target_link_libraries( >>>>>> ${target_prefix}${scratch_name} "${ns3-libs}" >>>>>> "${ns3-contrib-libs}" >>>>>> "${ns3-external-libs}" >>>>>> ) >>>>>> endif() >>>>>> set_runtime_outputdirectory( >>>>>> ${scratch_name} ${scratch_directory}/ ${target_prefix} >>>>>> ) >>>>>> endfunction() >>>>>> >>>>>> # Scan *.cc files in ns-3-dev/scratch and build a target for each >>>>>> file(GLOB single_source_file_scratches CONFIGURE_DEPENDS >>>>>> ${CMAKE_CURRENT_SOURCE_DIR}/*.cc) >>>>>> foreach(scratch_src ${single_source_file_scratches}) >>>>>> create_scratch(${scratch_src}) >>>>>> endforeach() >>>>>> >>>>>> # Scan *.cc files in ns-3-dev/scratch subdirectories and build a >>>>>> target for each >>>>>> # subdirectory >>>>>> file( >>>>>> GLOB_RECURSE scratch_subdirectories >>>>>> CONFIGURE_DEPENDS >>>>>> LIST_DIRECTORIES true >>>>>> ${CMAKE_CURRENT_SOURCE_DIR}/** >>>>>> ) >>>>>> # Filter out files >>>>>> foreach(entry ${scratch_subdirectories}) >>>>>> if(NOT (IS_DIRECTORY ${entry})) >>>>>> list(REMOVE_ITEM scratch_subdirectories ${entry}) >>>>>> endif() >>>>>> endforeach() >>>>>> >>>>>> foreach(subdir ${scratch_subdirectories}) >>>>>> if(EXISTS ${subdir}/CMakeLists.txt) >>>>>> # If the subdirectory contains a CMakeLists.txt file >>>>>> # we let the CMake file manage the source files >>>>>> # >>>>>> # Use this if you want to link to external libraries >>>>>> # without creating a module >>>>>> add_subdirectory(${subdir}) >>>>>> else() >>>>>> # Otherwise we pick all the files in the subdirectory >>>>>> # and create a scratch for them automatically >>>>>> file(GLOB scratch_sources CONFIGURE_DEPENDS ${subdir}/*.cc) >>>>>> create_scratch("${scratch_sources}") >>>>>> endif() >>>>>> endforeach() >>>>>> find_external_library(DEPENDENCY_NAME cryptopp >>>>>> HEADER_NAME aes.h >>>>>> LIBRARY_NAME cryptopp >>>>>> SEARCH_PATHS /usr/include/cryptopp) >>>>>> >>>>>> >>>>>> if(${CRYPTOPP_FOUND}) # Notice that the contents of DEPENDENCY_NAME >>>>>> became a prefix for the _FOUND variable >>>>>> find_package(cryptopp REQUIRED) >>>>>> include_directories(${CRYPTOPP_INCLUDE_DIRS}) >>>>>> link_libraries(${CRYPTOPP_LIBRARIES}) >>>>>> endif() >>>>>> add_executable(${target_prefix}${scratch_name} "fanetex.cc") >>>>>> target_link_libraries(${target_prefix}${scratch_name} PRIVATE >>>>>> cryptopp) >>>>>> >>>>>> can you help me to solve this problem ? Thank you [image: Capture >>>>>> d=E2=80=99=C3=A9cran 2024-04-17 114345.png] >>>>>> >>>>>> Le mardi 16 avril 2024 =C3=A0 21:53:22 UTC-5, Frank Sapone a =C3=A9c= rit : >>>>>> >>>>>>> I grabbed it but it's not relevant. I need to have a certificate >>>>>>> with RSA PSS that can be read by CryptoPP with the X509Cert lib. I= s it >>>>>>> possible to do this? >>>>>>> >>>>>>> On Tuesday, April 16, 2024 at 3:19:47=E2=80=AFPM UTC-4 Jeffrey Walt= on wrote: >>>>>>> >>>>>>>> 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'r= e 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 OA= EP >>>>>>>>> padding, and then decrypts it. >>>>>>>>> >>>>>>>>> Best Regards Satoshi >>>>>>>>> >>>>>>>> >>>>>>>> I deleted the message from the group. The *.pdf and *.pages smells >>>>>>>> of malware. >>>>>>>> >>>>>>>> If you want to provide code, please inline it or provide it as a >>>>>>>> text attachment. >>>>>>>> >>>>>>>> Jeff >>>>>>>> >>>>>>>>> -- >>>>> 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 email to [email protected]. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/cryptopp-users/db9bad9f-be9e-4a25-a= 09f-d52ce28adec0n%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/cryptopp-users/db9bad9f-be9e-4a25-= a09f-d52ce28adec0n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfoote= r> >>>>> . >>>>> >>>> >>>> >>>> -- >>>> Kind Regards, >>>> Manish Kr. Sharma >>>> Digital Marketing Manager >>>> >>>> Website: www.brsoftech.com >>>> E-mail: [email protected] >>>> >>>> >>>> >>>> -- >>>> 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 email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/cryptopp-users/CABUB1NSTdFJPHBeh9b-f= qfjrQBUWVzDzjNdjYUAQpzBb9CQsZw%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/cryptopp-users/CABUB1NSTdFJPHBeh9b-= fqfjrQBUWVzDzjNdjYUAQpzBb9CQsZw%40mail.gmail.com?utm_medium=3Demail&utm_sou= rce=3Dfooter> >>>> . >>>> >>> -- > 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 > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/cryptopp-users/18b7e58b-9c58-484f-8bed-= 69a63f8be39dn%40googlegroups.com > <https://groups.google.com/d/msgid/cryptopp-users/18b7e58b-9c58-484f-8bed= -69a63f8be39dn%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter> > . > --=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/CAJm61-AixakJpCPKYmxLeabAF8DdY8OqGLY_KGmWNiupLog%2B1g%40mail= .gmail.com. --0000000000006fcaf00616ef6035 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto">I hope this can you help=C2=A0</div><div dir=3D"auto"><br= ></div><div dir=3D"auto"><div><p style=3D"border:0px solid rgb(227,227,227)= ;margin:1.25em 0px;color:rgb(13,13,13);font-family:'s\0000f6hne',&#= 39;ui-sans-serif','system-ui','-apple-system','sego= e ui','roboto','ubuntu','cantarell','noto s= ans',sans-serif,'helvetica neue','arial','apple col= or emoji','segoe ui emoji','segoe ui symbol','noto = color emoji';font-size:16px;font-style:normal;font-weight:400;letter-sp= acing:normal;text-indent:0px;text-transform:none;white-space:pre-wrap;word-= spacing:0px;text-decoration:none"></p></div></div><div><p style=3D"border:0= px solid rgb(227,227,227);margin:1.25em 0px;color:rgb(13,13,13);font-family= :'s\0000f6hne','ui-sans-serif','system-ui','-ap= ple-system','segoe ui','roboto','ubuntu','c= antarell','noto sans',sans-serif,'helvetica neue','= arial','apple color emoji','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;w= hite-space:pre-wrap;word-spacing:0px;text-decoration:none">Missing Definiti= ons: Your code snippet lacks definitions for functions such as <code style= =3D"border:0px solid rgb( 227 , 227 , 227 );font-family:, 'monaco' = , 'andale mono' , 'ubuntu mono' , monospace !important;font= -size:0.875em;font-weight:600">CertIsCurrentTimeAfter</code>, <code style= =3D"border:0px solid rgb( 227 , 227 , 227 );font-family:, 'monaco' = , 'andale mono' , 'ubuntu mono' , monospace !important;font= -size:0.875em;font-weight:600">PEM_Load</code>, <code style=3D"border:0px s= olid rgb( 227 , 227 , 227 );font-family:, 'monaco' , 'andale mo= no' , 'ubuntu mono' , monospace !important;font-size:0.875em;fo= nt-weight:600">SetDate</code>, and others. Make sure these functions are de= fined somewhere in the code or declared in the appropriate header files.</p= ><p style=3D"border:0px solid rgb(227,227,227);margin:1.25em 0px;color:rgb(= 13,13,13);font-family:'s\0000f6hne','ui-sans-serif','sy= stem-ui','-apple-system','segoe ui','roboto',&#= 39;ubuntu','cantarell','noto sans',sans-serif,'helv= etica neue','arial','apple color emoji','segoe ui e= moji','segoe ui symbol','noto color emoji';font-size:16= px;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;= text-transform:none;white-space:pre-wrap;word-spacing:0px;text-decoration:n= one">Uninitialized Variables: The variables <code style=3D"border:0px solid= rgb( 227 , 227 , 227 );font-family:, 'monaco' , 'andale mono&#= 39; , 'ubuntu mono' , monospace !important;font-size:0.875em;font-w= eight:600">notBeforeDate</code> and <code style=3D"border:0px solid rgb( 22= 7 , 227 , 227 );font-family:, 'monaco' , 'andale mono' , &#= 39;ubuntu mono' , monospace !important;font-size:0.875em;font-weight:60= 0">notAfterDate</code> are used in the <code style=3D"border:0px solid rgb(= 227 , 227 , 227 );font-family:, 'monaco' , 'andale mono' ,= 'ubuntu mono' , monospace !important;font-size:0.875em;font-weight= :600">LoadX509PEMCertificateFromString</code> function, but it's not sh= own how they are initialized. If they don't have valid values, this cou= ld lead to unexpected behavior.</p><p style=3D"border:0px solid rgb(227,227= ,227);margin:1.25em 0px;color:rgb(13,13,13);font-family:'s\0000f6hne= 9;,'ui-sans-serif','system-ui','-apple-system','= ;segoe ui','roboto','ubuntu','cantarell','n= oto sans',sans-serif,'helvetica neue','arial','appl= e color emoji','segoe ui emoji','segoe ui symbol','= noto color emoji';font-size:16px;font-style:normal;font-weight:400;lett= er-spacing:normal;text-indent:0px;text-transform:none;white-space:pre-wrap;= word-spacing:0px;text-decoration:none">Return Values in LoadX509PEMCertific= ateFromString: If an exception is thrown and the function <code style=3D"bo= rder:0px solid rgb( 227 , 227 , 227 );font-family:, 'monaco' , '= ;andale mono' , 'ubuntu mono' , monospace !important;font-size:= 0.875em;font-weight:600">LoadX509PEMCertificateFromString</code> returns fa= lse, the code continues to execute as if the certificate had been loaded. M= ake sure that in case of an error, the function exits early.</p><p style=3D= "border:0px solid rgb(227,227,227);margin:1.25em 0px;color:rgb(13,13,13);fo= nt-family:'s\0000f6hne','ui-sans-serif','system-ui'= ,'-apple-system','segoe ui','roboto','ubuntu= 9;,'cantarell','noto sans',sans-serif,'helvetica neue&#= 39;,'arial','apple color emoji','segoe ui emoji',&#= 39;segoe ui symbol','noto color emoji';font-size:16px;font-styl= e:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transfo= rm:none;white-space:pre-wrap;word-spacing:0px;text-decoration:none">Potenti= al Memory Leaks: There's no indication that the memory allocated for <c= ode style=3D"border:0px solid rgb( 227 , 227 , 227 );font-family:, 'mon= aco' , 'andale mono' , 'ubuntu mono' , monospace !impor= tant;font-size:0.875em;font-weight:600">notBeforeDate</code> and <code styl= e=3D"border:0px solid rgb( 227 , 227 , 227 );font-family:, 'monaco'= , 'andale mono' , 'ubuntu mono' , monospace !important;fon= t-size:0.875em;font-weight:600">notAfterDate</code> in <code style=3D"borde= r:0px solid rgb( 227 , 227 , 227 );font-family:, 'monaco' , 'an= dale mono' , 'ubuntu mono' , monospace !important;font-size:0.8= 75em;font-weight:600">LoadX509PEMCertificateFromString</code> is freed. Ens= ure that memory is properly managed to avoid memory leaks.</p><p style=3D"b= order:0px solid rgb(227,227,227);margin:1.25em 0px;color:rgb(13,13,13);font= -family:'s\0000f6hne','ui-sans-serif','system-ui',&= #39;-apple-system','segoe ui','roboto','ubuntu'= ,'cantarell','noto sans',sans-serif,'helvetica neue'= ;,'arial','apple color emoji','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;word-spacing:0px;text-decoration:none">Unnecessa= ry Code: In the <code style=3D"border:0px solid rgb( 227 , 227 , 227 );font= -family:, 'monaco' , 'andale mono' , 'ubuntu mono' = , monospace !important;font-size:0.875em;font-weight:600">CheckCertDate</co= de> function, there's an unnecessary section at the end that reaches <c= ode style=3D"border:0px solid rgb( 227 , 227 , 227 );font-family:, 'mon= aco' , 'andale mono' , 'ubuntu mono' , monospace !impor= tant;font-size:0.875em;font-weight:600">return false</code>. This section i= s unreachable and can be removed.</p><p style=3D"border:0px solid rgb(227,2= 27,227);margin:1.25em 0px 0px;color:rgb(13,13,13);font-family:'s\0000f6= hne','ui-sans-serif','system-ui','-apple-system'= ;,'segoe ui','roboto','ubuntu','cantarell',= 'noto sans',sans-serif,'helvetica neue','arial',= 9;apple color emoji','segoe ui emoji','segoe ui symbol'= ,'noto color emoji';font-size:16px;font-style:normal;font-weight:40= 0;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:pre= -wrap;word-spacing:0px;text-decoration:none">Unused Variables: In the <code= style=3D"border:0px solid rgb( 227 , 227 , 227 );font-family:, 'monaco= ' , 'andale mono' , 'ubuntu mono' , monospace !importan= t;font-size:0.875em;font-weight:600">VerifyCert</code> function, variables = such as <code style=3D"border:0px solid rgb( 227 , 227 , 227 );font-family:= , 'monaco' , 'andale mono' , 'ubuntu mono' , monosp= ace !important;font-size:0.875em;font-weight:600">signature</code>, <code s= tyle=3D"border:0px solid rgb( 227 , 227 , 227 );font-family:, 'monaco&#= 39; , 'andale mono' , 'ubuntu mono' , monospace !important;= font-size:0.875em;font-weight:600">toBeSigned</code>, and <code style=3D"bo= rder:0px solid rgb( 227 , 227 , 227 );font-family:, 'monaco' , '= ;andale mono' , 'ubuntu mono' , monospace !important;font-size:= 0.875em;font-weight:600">publicKey</code> are declared but not used. Verify= if they are actually needed and remove them if not to simplify the code.</= p></div><div dir=3D"auto"></div><div dir=3D"auto"><br></div><div dir=3D"aut= o">Have nice Day=C2=A0</div><div dir=3D"auto"><br><div class=3D"gmail_quote= " dir=3D"auto"><div dir=3D"ltr" class=3D"gmail_attr">Frank Sapone <<a hr= ef=3D"mailto:[email protected]">[email protected]</a>> sch= rieb am Do. 25. Apr. 2024 um 14:59:<br></div><blockquote class=3D"gmail_quo= te" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"= >I based my code off the stuff in the wiki.=C2=A0 So what am I doing wrong?= =C2=A0 I just want the PSS to make the SCA shut up.<br><br>bool X509CertMod= ::CheckCertDate(bool bNotBefore)<br>{<br><span style=3D"white-space:pre-wra= p"> </span>bool bRetValue;<br><span style=3D"white-space:pre-wrap"> </span>= if (bNotBefore)<br><span style=3D"white-space:pre-wrap"> </span>{<br><span = style=3D"white-space:pre-wrap"> </span>bRetValue =3D CertIsCurrentTimeAfte= r(notBeforeDate);<br><span style=3D"white-space:pre-wrap"> </span>//printf= ("Created: %02d %02d, %02d %02d:%02d:%02dZ\n", monthInt, dayInt, = yearInt, hoursInt, minutesInt, secondsInt);<br><span style=3D"white-space:p= re-wrap"> </span>if (bRetValue)<br><span style=3D"white-space:pre-wrap"> = </span>{<br><span style=3D"white-space:pre-wrap"> </span>//printf("*= NotBefore in past.=C2=A0 Can use.\n");<br><span style=3D"white-space:= pre-wrap"> </span>return true;<br><span style=3D"white-space:pre-wrap"> = </span>}<br><span style=3D"white-space:pre-wrap"> </span>else<br><span sty= le=3D"white-space:pre-wrap"> </span>{<br><span style=3D"white-space:pre-wr= ap"> </span>//printf("* NotBefore in future.=C2=A0 Can't use!\n&= quot;);<br><span style=3D"white-space:pre-wrap"> </span>return false;<br>= <span style=3D"white-space:pre-wrap"> </span>}<br><span style=3D"white-spa= ce:pre-wrap"> </span>}<br><span style=3D"white-space:pre-wrap"> </span>else= <br><span style=3D"white-space:pre-wrap"> </span>{<br><span style=3D"white-= space:pre-wrap"> </span>bRetValue =3D CertIsCurrentTimeAfter(notAfterDate)= ;<br><span style=3D"white-space:pre-wrap"> </span>//printf("Expires: = %02d %02d, %02d %02d:%02d:%02dZ\n", monthInt, dayInt, yearInt, hoursIn= t, minutesInt, secondsInt);<br><span style=3D"white-space:pre-wrap"> </spa= n>if (bRetValue)<br><span style=3D"white-space:pre-wrap"> </span>{<br><spa= n style=3D"white-space:pre-wrap"> </span>//printf("* NotAfter in pas= t.=C2=A0 Can't use!\n");<br><span style=3D"white-space:pre-wrap"> = </span>return false;<br><span style=3D"white-space:pre-wrap"> </span>}<b= r><span style=3D"white-space:pre-wrap"> </span>else<br><span style=3D"whit= e-space:pre-wrap"> </span>{<br><span style=3D"white-space:pre-wrap"> </s= pan>//printf("* NotAfter in future.=C2=A0 Can use.\n");<br><span = style=3D"white-space:pre-wrap"> </span>return true;<br><span style=3D"whi= te-space:pre-wrap"> </span>}<br><span style=3D"white-space:pre-wrap"> </sp= an>}<br><br><span style=3D"white-space:pre-wrap"> </span>return false;<br>}= <br><br>bool X509CertMod::LoadX509PEMCertificateFromString(const std::strin= g &certStr)<br>{<br><span style=3D"white-space:pre-wrap"> </span>try<br= ><span style=3D"white-space:pre-wrap"> </span>{<br><span style=3D"white-spa= ce:pre-wrap"> </span>StringSource ss(certStr, true);<br><br><span style=3D= "white-space:pre-wrap"> </span>PEM_Load(ss, m_Cert);<br><span style=3D"whi= te-space:pre-wrap"> </span>m_CertStr =3D certStr;<br><br><span style=3D"wh= ite-space:pre-wrap"> </span>notBeforeDate.SetDate(m_Cert.GetNotBefore().En= codeValue().c_str());<br><span style=3D"white-space:pre-wrap"> </span>notA= fterDate.SetDate(m_Cert.GetNotAfter().EncodeValue().c_str());<br><span styl= e=3D"white-space:pre-wrap"> </span>bLoaded =3D true;<br><span style=3D"whi= te-space:pre-wrap"> </span>return true;<br><span style=3D"white-space:pre-= wrap"> </span>}<br><span style=3D"white-space:pre-wrap"> </span>catch (cons= t std::exception &ex)<br><span style=3D"white-space:pre-wrap"> </span>{= <br><span style=3D"white-space:pre-wrap"> </span>printf("Failed to lo= ad cert string: %s\n", ex.what());<br><span style=3D"white-space:pre-w= rap"> </span>}<br><br><span style=3D"white-space:pre-wrap"> </span>return f= alse;<br>}<br><br><div>bool X509CertMod::VerifyCert(void)<br>{<br><span sty= le=3D"white-space:pre-wrap"> </span>const SecByteBlock &signature =3D m= _Cert.GetCertificateSignature();<br><span style=3D"white-space:pre-wrap"> <= /span>const SecByteBlock &toBeSigned =3D m_Cert.GetToBeSigned();<br><sp= an style=3D"white-space:pre-wrap"> </span>const X509PublicKey &publicKe= y =3D m_Cert.GetSubjectPublicKey();<br><br><span style=3D"white-space:pre-w= rap"> </span>if (CheckCertDate(true))<br><span style=3D"white-space:pre-wra= p"> </span>{<br><span style=3D"white-space:pre-wrap"> </span>if (CheckCert= Date(false))<br><span style=3D"white-space:pre-wrap"> </span>{<br><span st= yle=3D"white-space:pre-wrap"> </span>RSASS<PKCS1v15, SHA256>::Verif= ier verifier(publicKey);<br><span style=3D"white-space:pre-wrap"> </span>= bool result =3D verifier.VerifyMessage(toBeSigned, toBeSigned.size(), signa= ture, signature.size());<br><span style=3D"white-space:pre-wrap"> </span>= if (result)<br><span style=3D"white-space:pre-wrap"> </span>{<br><span st= yle=3D"white-space:pre-wrap"> </span>//std::cout << "Verified= root certificate" << std::endl;<br><span style=3D"white-space:p= re-wrap"> </span>return true;<br><span style=3D"white-space:pre-wrap"> = </span>}<br><br><span style=3D"white-space:pre-wrap"> </span>//std::cout= << "Failed to verify root certificate" << std::endl;= <br><span style=3D"white-space:pre-wrap"> </span>}<br><span style=3D"white= -space:pre-wrap"> </span>}<br><br><span style=3D"white-space:pre-wrap"> </s= pan>return false;<br>}<br><br></div><div class=3D"gmail_quote"></div><div c= lass=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">On Wednesday, A= pril 24, 2024 at 1:59:49=E2=80=AFPM UTC-4 One Sini wrote:<br></div></div><d= iv class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:= 0 0 0 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"></bloc= kquote></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" s= tyle=3D"margin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,204);padding-l= eft:1ex"><div> <div> <p></p><div><span style=3D"color:rgb(0,0,0);font-family:'-apple-system&= #39;,'helveticaneue';font-size:16px;font-style:normal;font-weight:4= 00;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:no= rmal;word-spacing:0px;text-decoration:none;display:inline!important;float:n= one">This code demonstrates how to load an X509 certificate and private/pub= lic keys from files.=C2=A0</span></div><p><br></p>#include <iostream>= <p></p> <p>#include <fstream></p> <p>#include <string></p> <p><br></p> <p>#include <cryptopp/rsa.h></p> <p>#include <cryptopp/files.h></p> <p>#include <cryptopp/base64.h></p></div></div><div><div> <p>#include <cryptopp/osrng.h></p> <p>#include <cryptopp/pssr.h></p> <p><br></p> <p>using namespace CryptoPP;</p> </div></div><div><div><p>using namespace std;</p> <p><br></p> <p>void loadX509Certificate(const string& certFile, X509Certificate&= ; certificate) {</p> <p>=C2=A0 =C2=A0 ifstream file(certFile.c_str(), ios::in | ios::binary);</p= > <p>=C2=A0 =C2=A0 if (!file) {</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 cerr << "Error: Failed to open ce= rtificate file." << endl;</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 // Handle error appropriately</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 return;</p> <p>=C2=A0 =C2=A0 }</p> <p><br></p> <p>=C2=A0 =C2=A0 try {</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 PEM_Load(file, certificate);</p> <p>=C2=A0 =C2=A0 } catch (const Exception& ex) {</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 cerr << "Error: Failed to load X5= 09 certificate - " << ex.what() << endl;</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 // Handle error appropriately</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 return;</p> <p>=C2=A0 =C2=A0 }</p> <p>}</p> <p><br></p> <p>void loadPrivateKey(const string& privateKeyFile, RSA::PrivateKey&am= p; privateKey) {</p> <p>=C2=A0 =C2=A0 ifstream file(privateKeyFile.c_str());</p> <p>=C2=A0 =C2=A0 if (!file) {</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 cerr << "Error: Failed to open pr= ivate key file." << endl;</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 // Handle error appropriately</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 return;</p> <p>=C2=A0 =C2=A0 }</p> <p><br></p> <p>=C2=A0 =C2=A0 try {</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 PEM_Load(file, privateKey);</p> <p>=C2=A0 =C2=A0 } catch (const Exception& ex) {</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 cerr << "Error: Failed to load pr= ivate key - " << ex.what() << endl;</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 // Handle error appropriately</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 return;</p> <p>=C2=A0 =C2=A0 }</p> <p>}</p> <p><br></p> <p>void loadPublicKey(const string& publicKeyFile, RSA::PublicKey& = publicKey) {</p> <p>=C2=A0 =C2=A0 ifstream file(publicKeyFile.c_str());</p> <p>=C2=A0 =C2=A0 if (!file) {</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 cerr << "Error: Failed to open pu= blic key file." << endl;</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 // Handle error appropriately</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 return;</p> <p>=C2=A0 =C2=A0 }</p> <p><br></p> <p>=C2=A0 =C2=A0 try {</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 PEM_Load(file, publicKey);</p> <p>=C2=A0 =C2=A0 } catch (const Exception& ex) {</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 cerr << "Error: Failed to load pu= blic key - " << ex.what() << endl;</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 // Handle error appropriately</p> <p>=C2=A0 =C2=A0 =C2=A0 =C2=A0 return;</p> <p>=C2=A0 =C2=A0 }</p> <p>}</p> <p><br></p> <p>int main() {</p> <p>=C2=A0 =C2=A0 string certFile =3D "certificate.pem";</p> <p>=C2=A0 =C2=A0 string privateKeyFile =3D "private.key";</p> <p>=C2=A0 =C2=A0 string publicKeyFile =3D "public.key";</p> <p><br></p> <p>=C2=A0 =C2=A0 X509Certificate certificate;</p></div></div><div><div> <p>=C2=A0 =C2=A0 RSA::PrivateKey privateKey;</p> <p>=C2=A0 =C2=A0 RSA::PublicKey publicKey;</p> <p><br></p> </div></div><div><div><p>=C2=A0 =C2=A0 loadX509Certificate(certFile, certif= icate);</p> <p>=C2=A0 =C2=A0 loadPrivateKey(privateKeyFile, privateKey);</p> <p>=C2=A0 =C2=A0 loadPublicKey(publicKeyFile, publicKey);</p> <p><br></p> <p>=C2=A0 =C2=A0 // Continue with using the certificate and keys...</p> <p><br></p> <p>=C2=A0 =C2=A0 return 0;</p> <p>}</p> <p><br></p> <p><br></p></div></div></blockquote></div><div class=3D"gmail_quote"><block= quote class=3D"gmail_quote" style=3D"margin:0 0 0 0.8ex;border-left:1px sol= id rgb(204,204,204);padding-left:1ex"><div><div class=3D"gmail_quote"></div= ></div></blockquote></div><div class=3D"gmail_quote"><blockquote class=3D"g= mail_quote" style=3D"margin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,2= 04);padding-left:1ex"><div><div class=3D"gmail_quote"><div dir=3D"ltr" clas= s=3D"gmail_attr">One Sini <<a rel=3D"nofollow">[email protected]</a>> = schrieb am Mi. 24. Apr. 2024 um 19:51:<br></div></div></div></blockquote></= div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"m= argin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">= <div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"= margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote= ></div></div></blockquote></div><div class=3D"gmail_quote"><blockquote clas= s=3D"gmail_quote" style=3D"margin:0 0 0 0.8ex;border-left:1px solid rgb(204= ,204,204);padding-left:1ex"><div><div class=3D"gmail_quote"><blockquote cla= ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa= dding-left:1ex"><div dir=3D"auto">Test this way</div><div dir=3D"auto"><br>= </div><div dir=3D"auto"><div> <div> <p>a basic guide on how to generate an RSA key pair with PSS padding, sign = an X509 certificate with the private key, and verify the signature with the= public key using the Crypto++ library:</p> <ol><li>Generating an RSA Key Pair with PSS Padding:</li></ol> <p>cpp</p> <p>Copy code<br></p> <p>#include <cryptopp/rsa.h></p> <p>#include <cryptopp/osrng.h></p> <p>#include <cryptopp/pssr.h></p> <p><br></p> <p>using namespace CryptoPP;</p> <p><br></p> <p>void generateRSAKeyPair(RSA::PrivateKey& privateKey, RSA::PublicKey&= amp; publicKey) {</p> <p>=C2=A0 =C2=A0 AutoSeededRandomPool rng;</p> <p><br></p> <p>=C2=A0 =C2=A0 InvertibleRSAFunction params;</p> <p>=C2=A0 =C2=A0 params.GenerateRandomWithKeySize(rng, 2048);</p> <p><br></p> <p>=C2=A0 =C2=A0 privateKey =3D RSA::PrivateKey(params);</p> <p>=C2=A0 =C2=A0 publicKey =3D RSA::PublicKey(params);</p> <p>}</p> <p><br></p> <p>int main() {</p> <p>=C2=A0 =C2=A0 RSA::PrivateKey privateKey;</p> <p>=C2=A0 =C2=A0 RSA::PublicKey publicKey;</p> <p><br></p> <p>=C2=A0 =C2=A0 generateRSAKeyPair(privateKey, publicKey);</p> <p><br></p> <p>=C2=A0 =C2=A0 // The RSA key pair has been generated and is now availabl= e</p> <p>=C2=A0 =C2=A0 return 0;</p> <p>}</p> <ol><li>Signing the X509 Certificate with the Private Key:</li></ol> <p>cpp</p> <p><br></p> <p>Copy code</p> <p>#include <cryptopp/cryptlib.h></p> <p>#include <cryptopp/oids.h></p> <p>#include <cryptopp/rsa.h></p> <p>#include <cryptopp/sha.h></p> <p>#include <cryptopp/filters.h></p> <p>#include <cryptopp/base64.h></p> <p><br></p> <p>using namespace CryptoPP;</p> <p><br></p> <p>void signCertificate(const RSA::PrivateKey& privateKey, const X509&a= mp; certificate, byte* signature) {</p> <p>=C2=A0 =C2=A0 // Implement the process of signing the certificate here</= p> <p>=C2=A0 =C2=A0 // Use privateKey and certificate to sign the certificate<= /p> <p>}</p> <p><br></p> <p>int main() {</p> <p>=C2=A0 =C2=A0 // Load or create your X509 certificate</p> <p>=C2=A0 =C2=A0 // Here, we assume you already have an X509 certificate</p= > <p><br></p> <p>=C2=A0 =C2=A0 RSA::PrivateKey privateKey;</p> <p>=C2=A0 =C2=A0 // Load or generate your private key</p> <p>=C2=A0 =C2=A0 // Here, we assume you already have a private key</p> <p><br></p> <p>=C2=A0 =C2=A0 byte signature[256]; // Space for the signature</p> <p><br></p> <p>=C2=A0 =C2=A0 signCertificate(privateKey, certificate, signature);</p> <p><br></p> <p>=C2=A0 =C2=A0 // The certificate has been signed, and the signature is n= ow available</p> <p>=C2=A0 =C2=A0 return 0;</p> <p>}</p> <ol><li>Verifying the Signature with the Public Key:</li></ol> <p>cpp</p> <p><br></p> <p>Copy code</p> <p>#include <cryptopp/rsa.h></p> <p>#include <cryptopp/sha.h></p> <p>#include <cryptopp/filters.h></p> <p>#include <cryptopp/base64.h></p> <p><br></p> <p>using namespace CryptoPP;</p> <p><br></p> <p>bool verifySignature(const RSA::PublicKey& publicKey, const X509&= ; certificate, const byte* signature) {</p> <p>=C2=A0 =C2=A0 // Implement the process of verifying the signature here</= p> <p>=C2=A0 =C2=A0 // Use publicKey, certificate, and signature</p> <p><br></p> <p>=C2=A0 =C2=A0 // Return true if the signature is valid, otherwise false<= /p> <p>=C2=A0 =C2=A0 return false;</p> <p>}</p> <p><br></p> <p>int main() {</p> <p>=C2=A0 =C2=A0 // Load or create your X509 certificate</p> <p>=C2=A0 =C2=A0 // Here, we assume you already have an X509 certificate</p= > <p><br></p> <p>=C2=A0 =C2=A0 RSA::PublicKey publicKey;</p> <p>=C2=A0 =C2=A0 // Load or generate your public key</p> <p>=C2=A0 =C2=A0 // Here, we assume you already have a public key</p> <p><br></p> <p>=C2=A0 =C2=A0 byte signature[256]; // Take the signature from the certif= icate signature</p> <p><br></p> <p>=C2=A0 =C2=A0 bool isValid =3D verifySignature(publicKey, certificate, s= ignature);</p> <p><br></p> <p>=C2=A0 =C2=A0 // Check if the signature is valid</p> <p>=C2=A0 =C2=A0 return 0;</p> <p>}</p> <p>These code snippets serve as a foundation. You will need to adapt them a= ccording to your specific implementation, including the loading process for= the X509 certificate and the private/public keys. Remember to include erro= r handling and handle edge cases in your implementation</p> </div> </div>I hope this help you</div><div dir=3D"auto">;)</div></blockquote></di= v></div></blockquote></div><div class=3D"gmail_quote"><blockquote class=3D"= gmail_quote" style=3D"margin:0 0 0 0.8ex;border-left:1px solid rgb(204,204,= 204);padding-left:1ex"><div><div class=3D"gmail_quote"><blockquote class=3D= "gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding= -left:1ex"><div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gm= ail_attr">Manish sharma <<a rel=3D"nofollow">[email protected]</a>= > schrieb am Mi. 24. Apr. 2024 um 14:42:<br></div><blockquote class=3D"g= mail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-l= eft:1ex"><div dir=3D"ltr"><a href=3D"https://www.brsoftech.com/blog/crypto-= sports-betting/" rel=3D"nofollow" target=3D"_blank">Crypto Betting=C2=A0</a= ></div><br><div class=3D"gmail_quote"></div></blockquote></div></div></bloc= kquote></div></div></blockquote></div><div class=3D"gmail_quote"><blockquot= e class=3D"gmail_quote" style=3D"margin:0 0 0 0.8ex;border-left:1px solid r= gb(204,204,204);padding-left:1ex"><div><div class=3D"gmail_quote"><blockquo= te class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc so= lid;padding-left:1ex"><div><div class=3D"gmail_quote"><blockquote class=3D"= gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-= left:1ex"><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">= On Wed, Apr 24, 2024 at 6:08=E2=80=AFPM Frank Sapone <<a rel=3D"nofollow= ">[email protected]</a>> wrote:<br></div></div></blockquote></div></d= iv></blockquote></div></div></blockquote></div><div class=3D"gmail_quote"><= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 0.8ex;border-left:1p= x solid rgb(204,204,204);padding-left:1ex"><div><div class=3D"gmail_quote">= <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"><div><div class=3D"gmail_quote"><blockquote = class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid= ;padding-left:1ex"><div class=3D"gmail_quote"><blockquote class=3D"gmail_qu= ote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,20= 4);padding-left:1ex"></blockquote></div></blockquote></div></div></blockquo= te></div></div></blockquote></div><div class=3D"gmail_quote"><blockquote cl= ass=3D"gmail_quote" style=3D"margin:0 0 0 0.8ex;border-left:1px solid rgb(2= 04,204,204);padding-left:1ex"><div><div class=3D"gmail_quote"><blockquote c= lass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;= padding-left:1ex"><div><div class=3D"gmail_quote"><blockquote class=3D"gmai= l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left= :1ex"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D= "margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le= ft:1ex">Has anyone figured out how to use PSS and SHA256 <b><i>WITH</i>=C2= =A0</b>CryptoPP-PEM?=C2=A0 I also tried reporting this to the issuer tracke= r at=C2=A0<a href=3D"https://github.com/noloader/cryptopp-pem" rel=3D"nofol= low" target=3D"_blank">https://github.com/noloader/cryptopp-pem</a> and nob= ody has replied.=C2=A0 I can't imagine I'm the only person using th= is library in order to achieve this with X509 Certs.<div><br></div><div>Tha= nks,<br>Frank<br><div><br></div></div><div class=3D"gmail_quote"><div dir= =3D"auto" class=3D"gmail_attr">On Wednesday, April 17, 2024 at 11:43:54=E2= =80=AFAM UTC-4 HELA YAICH wrote:<br></div><blockquote class=3D"gmail_quote"= style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);p= adding-left:1ex">Hello,=C2=A0<br>(I'm new user of ns3 and crypto)=C2=A0= <br>I have link errors with Crypto++. These errors indicate that the compil= er cannot find certain functions or classes defined in Crypto++. This can h= appen if Crypto++ is not correctly linked to my project. However, I tried t= o modify my project's CMakeLists.txt file as follows: <br>set(target_pr= efix scratch_)<br><br>function(create_scratch source_files)<br>=C2=A0 # Ret= urn early if no sources in the subdirectory<br>=C2=A0 list(LENGTH source_fi= les number_sources)<br>=C2=A0 if(number_sources EQUAL 0)<br>=C2=A0 =C2=A0 r= eturn()<br>=C2=A0 endif()<br><br>=C2=A0 # If the scratch has more than a so= urce file, we need to find the source with<br>=C2=A0 # the main function<br= >=C2=A0 set(scratch_src)<br>=C2=A0 foreach(source_file ${source_files})<br>= =C2=A0 =C2=A0 file(READ ${source_file} source_file_contents)<br>=C2=A0 =C2= =A0 string(REGEX MATCHALL "main[(| (]" main_position "${sour= ce_file_contents}")<br>=C2=A0 =C2=A0 if(CMAKE_MATCH_0)<br>=C2=A0 =C2= =A0 =C2=A0 set(scratch_src ${source_file})<br>=C2=A0 =C2=A0 endif()<br>=C2= =A0 endforeach()<br><br>=C2=A0 if(NOT scratch_src)<br>=C2=A0 =C2=A0 return(= )<br>=C2=A0 endif()<br><br>=C2=A0 # Get parent directory name<br>=C2=A0 get= _filename_component(scratch_dirname ${scratch_src} DIRECTORY)<br>=C2=A0 str= ing(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "" scratch_di= rname<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quo= t;${scratch_dirname}"<br>=C2=A0 )<br>=C2=A0 string(REPLACE "/&quo= t; "_" scratch_dirname "${scratch_dirname}")<br><br>=C2= =A0 # Get source name<br>=C2=A0 get_filename_component(scratch_name ${scrat= ch_src} NAME_WE)<br><br>=C2=A0 set(target_prefix scratch_)<br>=C2=A0 if(scr= atch_dirname)<br>=C2=A0 =C2=A0 # Join the names together if dirname is not = the scratch folder<br>=C2=A0 =C2=A0 set(target_prefix scratch${scratch_dirn= ame}_)<br>=C2=A0 endif()<br><br>=C2=A0 # Get source absolute path and trans= form into relative path<br>=C2=A0 get_filename_component(scratch_src ${scra= tch_src} ABSOLUTE)<br>=C2=A0 get_filename_component(scratch_absolute_direct= ory ${scratch_src} DIRECTORY)<br>=C2=A0 string(REPLACE "${PROJECT_SOUR= CE_DIR}" "${CMAKE_OUTPUT_DIRECTORY}"<br>=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0scratch_directory ${scratch_absol= ute_directory}<br>=C2=A0 )<br>=C2=A0 add_executable(${target_prefix}${scrat= ch_name} "${source_files}")<br>=C2=A0 if(${NS3_STATIC})<br>=C2=A0= =C2=A0 target_link_libraries(<br>=C2=A0 =C2=A0 =C2=A0 ${target_prefix}${sc= ratch_name} ${LIB_AS_NEEDED_PRE_STATIC}<br>=C2=A0 =C2=A0 =C2=A0 ${lib-ns3-s= tatic}<br>=C2=A0 =C2=A0 )<br>=C2=A0 else()<br>=C2=A0 =C2=A0 target_link_lib= raries(<br>=C2=A0 =C2=A0 =C2=A0 ${target_prefix}${scratch_name} "${ns3= -libs}" "${ns3-contrib-libs}"<br>=C2=A0 =C2=A0 =C2=A0 "= ${ns3-external-libs}"<br>=C2=A0 =C2=A0 )<br>=C2=A0 endif()<br>=C2=A0 s= et_runtime_outputdirectory(<br>=C2=A0 =C2=A0 ${scratch_name} ${scratch_dire= ctory}/ ${target_prefix}<br>=C2=A0 )<br>endfunction()<br><br># Scan *.cc fi= les in ns-3-dev/scratch and build a target for each<br>file(GLOB single_sou= rce_file_scratches CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.cc)<br>f= oreach(scratch_src ${single_source_file_scratches})<br>=C2=A0 create_scratc= h(${scratch_src})<br>endforeach()<br><br># Scan *.cc files in ns-3-dev/scra= tch subdirectories and build a target for each<br># subdirectory<br>file(<b= r>=C2=A0 GLOB_RECURSE scratch_subdirectories<br>=C2=A0 CONFIGURE_DEPENDS<br= >=C2=A0 LIST_DIRECTORIES true<br>=C2=A0 ${CMAKE_CURRENT_SOURCE_DIR}/**<br>)= <br># Filter out files<br>foreach(entry ${scratch_subdirectories})<br>=C2= =A0 if(NOT (IS_DIRECTORY ${entry}))<br>=C2=A0 =C2=A0 list(REMOVE_ITEM scrat= ch_subdirectories ${entry})<br>=C2=A0 endif()<br>endforeach()<br><br>foreac= h(subdir ${scratch_subdirectories})<br>=C2=A0 if(EXISTS ${subdir}/CMakeList= s.txt)<br>=C2=A0 =C2=A0 # If the subdirectory contains a CMakeLists.txt fil= e<br>=C2=A0 =C2=A0 # we let the CMake file manage the source files<br>=C2= =A0 =C2=A0 #<br>=C2=A0 =C2=A0 # Use this if you want to link to external li= braries<br>=C2=A0 =C2=A0 # without creating a module<br>=C2=A0 =C2=A0 add_s= ubdirectory(${subdir})<br>=C2=A0 else()<br>=C2=A0 =C2=A0 # Otherwise we pic= k all the files in the subdirectory<br>=C2=A0 =C2=A0 # and create a scratch= for them automatically<br>=C2=A0 =C2=A0 file(GLOB scratch_sources CONFIGUR= E_DEPENDS ${subdir}/*.cc)<br>=C2=A0 =C2=A0 create_scratch("${scratch_s= ources}")<br>=C2=A0 endif()<br>endforeach()<br>find_external_library(D= EPENDENCY_NAME cryptopp<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 HEADER_NAME aes.h<br>=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 LIBRARY_NAME cryptopp<= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 SEARCH_PATHS /usr/include/cryptopp)<br><br><br>if(${CRYPTOPP_FOUND})= # Notice that the contents of DEPENDENCY_NAME became a prefix for the _FOU= ND variable<br>=C2=A0 =C2=A0 find_package(cryptopp REQUIRED)<br>=C2=A0 =C2= =A0 include_directories(${CRYPTOPP_INCLUDE_DIRS})<br>=C2=A0 =C2=A0 link_lib= raries(${CRYPTOPP_LIBRARIES})<br>endif()<br>add_executable(${target_prefix}= ${scratch_name} "fanetex.cc")<br>target_link_libraries(${target_p= refix}${scratch_name} PRIVATE cryptopp)<br><br>can you help me to solve thi= s problem ? Thank you=C2=A0<img alt=3D"Capture d=E2=80=99=C3=A9cran 2024-04= -17 114345.png" width=3D"631px" height=3D"398px" src=3D"https://groups.goog= le.com/group/cryptopp-users/attach/1f8b7a2cdb789/Capture%20d%E2%80%99%C3%A9= cran%202024-04-17%20114345.png?part=3D0.1&view=3D1"><br><br><div class= =3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">Le mardi 16 avril 2= 024 =C3=A0 21:53:22 UTC-5, Frank Sapone a =C3=A9crit=C2=A0:<br></div><block= quote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1= px solid rgb(204,204,204);padding-left:1ex">I grabbed it but it's not r= elevant.=C2=A0 I need to have a certificate with RSA PSS that can be read b= y CryptoPP with the X509Cert lib.=C2=A0 Is it possible to do this?<br><br><= div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">On Tuesday= , April 16, 2024 at 3:19:47=E2=80=AFPM UTC-4 Jeffrey Walton wrote:<br></div= ><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border= -left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div cl= ass=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Apr 16, 2= 024 at 1:44=E2=80=AFPM One Sini <<a rel=3D"nofollow">[email protected]</a= >> wrote:<br></div></div></div><div dir=3D"ltr"><div class=3D"gmail_quot= e"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bord= er-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,system-ui,-apple-syste= m,"segoe ui",roboto,ubuntu,cantarell,"noto sans",sans-s= erif,"helvetica neue",arial,"apple color emoji","s= egoe ui emoji","segoe ui symbol","noto color emoji"= ;;font-size:16px;font-style:normal;font-weight:400;letter-spacing:normal;te= xt-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px;tex= t-decoration:none;float:none;display:inline;color:rgb(13,13,13)">I wasn'= ;t entirely satisfied with the security, so I've adjusted the code. I&#= 39;m not sure if that helps you, depending on what you're doing with it= .</span></div><br></div></blockquote></div></div><div dir=3D"ltr"><div clas= s=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px= 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div di= r=3D"auto"><div><span style=3D"font-family:s=C3=B6hne,ui-sans-serif,system-= ui,-apple-system,"segoe ui",roboto,ubuntu,cantarell,"noto sa= ns",sans-serif,"helvetica neue",arial,"apple color emoj= i","segoe ui emoji","segoe ui symbol","noto c= olor emoji";font-size:16px;font-style:normal;font-weight:400;letter-sp= acing:normal;text-indent:0px;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 with OAEP (Optimal Asymmetric Encryption Padding) t= o avoid security issues like padding oracle attacks. It generates RSA keys = with a length of 2048 bits, encrypts the message with OAEP padding, and the= n decrypts it.</span></div><div dir=3D"auto"><span style=3D"font-family:s= =C3=B6hne,ui-sans-serif,system-ui,-apple-system,"segoe ui",roboto= ,ubuntu,cantarell,"noto sans",sans-serif,"helvetica neue&quo= t;,arial,"apple color emoji","segoe ui emoji","seg= oe ui symbol","noto color emoji";font-size:16px;font-style:n= ormal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:= none;white-space:pre-wrap;word-spacing:0px;text-decoration:none;float:none;= display:inline;color:rgb(13,13,13)"><br></span></div></div></blockquote></d= iv></div><div dir=3D"ltr"><div class=3D"gmail_quote"><blockquote class=3D"g= mail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204= ,204,204);padding-left:1ex"><div dir=3D"auto"><div dir=3D"auto"><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)">Best Regards Satoshi <= /span></div></div></blockquote><div><br></div><div>I deleted the message fr= om the group. The *.pdf and *.pages smells of malware.</div><div><br></div>= <div>If you want to provide code, please inline it or provide it as a text = attachment.<br></div><div><br></div><div>Jeff</div><blockquote class=3D"gma= il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2= 04,204);padding-left:1ex"><div><div class=3D"gmail_quote"><blockquote class= =3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg= b(204,204,204);padding-left:1ex"> </blockquote></div></div></blockquote></div></div> </blockquote></div></blockquote></div></blockquote></div> <p></p> -- <br> You received this message because you are subscribed to the Google Groups &= quot;Crypto++ Users" group.<br></blockquote></div></blockquote></div><= /div></blockquote></div></div></blockquote></div><div class=3D"gmail_quote"= ><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 0.8ex;border-left:= 1px solid rgb(204,204,204);padding-left:1ex"><div><div class=3D"gmail_quote= "><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:= 1px #ccc solid;padding-left:1ex"><div><div class=3D"gmail_quote"><blockquot= e class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc sol= id;padding-left:1ex"><div class=3D"gmail_quote"><blockquote class=3D"gmail_= quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,= 204);padding-left:1ex"> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a rel=3D"nofollow">[email protected]</a>.<br> To view this discussion on the web visit <a href=3D"https://groups.google.c= om/d/msgid/cryptopp-users/db9bad9f-be9e-4a25-a09f-d52ce28adec0n%40googlegro= ups.com?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofollow" target= =3D"_blank">https://groups.google.com/d/msgid/cryptopp-users/db9bad9f-be9e-= 4a25-a09f-d52ce28adec0n%40googlegroups.com</a>.<br> </blockquote></div><br clear=3D"all"><div><br></div><span class=3D"gmail_si= gnature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature"><d= iv dir=3D"ltr"><div style=3D"text-align:left"><span style=3D"font-family:ar= ial,sans-serif"><font color=3D"#9900ff">Kind Regards,=C2=A0</font></span></= div><div style=3D"text-align:left"><font color=3D"#9900ff">Manish Kr. Sharm= a=C2=A0</font></div><div style=3D"text-align:left"><font color=3D"#9900ff">= Digital Marketing Manager<br></font></div><div style=3D"text-align:left"><f= ont color=3D"#9900ff"><br></font></div><div style=3D"text-align:left"><span= style=3D"color:rgb(153,0,255)">Website:=C2=A0</span><a href=3D"http://www.= brsoftech.com" rel=3D"nofollow" target=3D"_blank">www.brsoftech.com</a><br>= </div><div style=3D"text-align:left"><font color=3D"#9900ff">E-mail: <a rel= =3D"nofollow">[email protected]</a></font></div><div style=3D"text-al= ign:left"><img src=3D"https://i.imgur.com/ilarMcr.png" width=3D"96" height= =3D"96"><br></div><div><br></div><div><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 rel=3D"nofollow">[email protected]</a>.<br> To view this discussion on the web visit <a href=3D"https://groups.google.c= om/d/msgid/cryptopp-users/CABUB1NSTdFJPHBeh9b-fqfjrQBUWVzDzjNdjYUAQpzBb9CQs= Zw%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter" rel=3D"nofo= llow" target=3D"_blank">https://groups.google.com/d/msgid/cryptopp-users/CA= BUB1NSTdFJPHBeh9b-fqfjrQBUWVzDzjNdjYUAQpzBb9CQsZw%40mail.gmail.com</a>.<br> </blockquote></div></div> </blockquote></div></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]" targ= et=3D"_blank">[email protected]</a>.<br> To view this discussion on the web visit <a href=3D"https://groups.google.c= om/d/msgid/cryptopp-users/18b7e58b-9c58-484f-8bed-69a63f8be39dn%40googlegro= ups.com?utm_medium=3Demail&utm_source=3Dfooter" target=3D"_blank">https= ://groups.google.com/d/msgid/cryptopp-users/18b7e58b-9c58-484f-8bed-69a63f8= be39dn%40googlegroups.com</a>.<br> </blockquote></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/CAJm61-AixakJpCPKYmxLeabAF8DdY8OqGLY_KGmWNiupLog%= 2B1g%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://group= s.google.com/d/msgid/cryptopp-users/CAJm61-AixakJpCPKYmxLeabAF8DdY8OqGLY_KG= mWNiupLog%2B1g%40mail.gmail.com</a>.<br /> --0000000000006fcaf00616ef6035--