Re: [cryptopp-users] Crypto++ Convert Integer to Unsigned Char

2023-04-24 Thread Dwight Kulkarni
Hi Jeffery, I tried out your code and it works to generate the exact same encrypted message as Python if I use the Integer approach then change it to bytes. To make messages comparable, I used the _pad_for_signing code (see below) to generate exactly the same header. For Pcks1 v 1.5 it is

Re: [cryptopp-users] Crypto++ Convert Integer to Unsigned Char

2023-04-24 Thread Dwight Kulkarni
Hi, Thank you for this, I just figured it out also with slightly different code. Here is my version. The issue was that I was converting it to vector and there was a bug in the conversion which was hard to debug because every time the message is changing. std::string

Re: [cryptopp-users] Crypto++ Convert Integer to Unsigned Char

2023-04-24 Thread Jeffrey Walton
On Mon, Apr 24, 2023 at 11:55 AM Dwight Kulkarni wrote: > > Thank you for this, I just figured it out also with slightly different code. > > Here is my version. The issue was that I was converting it to vector char> and there was a bug in the conversion which was hard to debug because > every

Re: [cryptopp-users] Crypto++ Convert Integer to Unsigned Char

2023-04-24 Thread One Sini
Hello my friend! I think that maybe my code can help. in cpp and python. Sincerely, Satoshi Nakamoto Cpp Code #include #include #include #include #include #include #include #include using namespace CryptoPP; std::string rsa_encrypt(const std::string& message, const RSA::PublicKey&