proprietary RSA padding scheme in CryptoPP 5.x

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

proprietary RSA padding scheme in CryptoPP 5.x

simon.saado

Hi Everyone,

 

  • we are upgrading from CryptoPP 4.1 to CryptoPP 5.6.5 and face the problem that we have implemented our own RSA padding scheme via the template mechanism
  • unfortunately it seems that this templates do not exist anymore, is there another mechanism/templates/classes which can be used to implement a proprietary RSA padding?
  • basically the padding scheme just fills up the message with random data until the modulus length (unfortunately the overlying protocol does not uses a standardized padding scheme...)
  • any help is appreciated!
Best Regards,
Simon


example of typedef's used in CryptoPP 4.1
  

// RSA_MinPad_Decryptor and RSA_MinPad_Encryptor can be used with key sizes of

// up to 2056 bits. To support larger key sizes, the implementation of the

// MinimalPadding class would have to be modified.

 

typedef RSAPrivateKeyTemplate<DecryptorTemplate<MinimalPadding, InvertibleRSAFunction> > RSA_MinPad_Decryptor;

typedef RSAPublicKeyTemplate<EncryptorTemplate<MinimalPadding, RSAFunction>, RSA_MinPad_Decryptor> RSA_MinPad_Encryptor;

 

 

// RSA_MinPadNoLen_Decryptor and RSA_MinPadNoLen_Encryptor do not store the length

// of the encoded plaintext. Consequentially, when the ciphertext is decrypted, the

// recovered plaintext always has the maximum size allowed by the RSA keypair.

// The consumer application has to decide for itself where the end of the plaintext is.

 

typedef RSAPrivateKeyTemplate<DecryptorTemplate<MinimalPaddingNoLength, InvertibleRSAFunction> > RSA_MinPadNoLen_Decryptor;

typedef RSAPublicKeyTemplate<EncryptorTemplate<MinimalPaddingNoLength, RSAFunction>, RSA_MinPadNoLen_Decryptor> RSA_MinPadNoLen_Encryptor;

--
--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to [hidden email].
More information about Crypto++ and this group is available at http://www.cryptopp.com.
---
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: proprietary RSA padding scheme in CryptoPP 5.x

Jeffrey Walton-3


On Wednesday, July 5, 2017 at 9:08:12 AM UTC-4, [hidden email] wrote:

Hi Everyone,

 

  • we are upgrading from CryptoPP 4.1 to CryptoPP 5.6.5 and face the problem that we have implemented our own RSA padding scheme via the template mechanism
  • unfortunately it seems that this templates do not exist anymore, is there another mechanism/templates/classes which can be used to implement a proprietary RSA padding?
  • basically the padding scheme just fills up the message with random data until the modulus length (unfortunately the overlying protocol does not uses a standardized padding scheme...)
  • any help is appreciated!
Well, 4.1 predates my limited knowledge. I was still using proverbial training wheels back then.

It looks like the padding schemes were moved into their own class files. For example, OAEP is available in https://github.com/weidai11/cryptopp/blob/master/oaep.h. The base class, PK_EncryptionMessageEncodingMethod, is in https://github.com/weidai11/cryptopp/blob/master/pkcspad.h.

Sorry I cannot offer more.

Jeff
 

--
--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to [hidden email].
More information about Crypto++ and this group is available at http://www.cryptopp.com.
---
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...