2

I am using OAEP in a project and I want the resulting number of bits (n) to be 288 bits. Most of the implementations online seem to be for 1024 bits and using SHA-256 and I was wondering if truncating the number of bits in the G and H functions and then xoring would result in any security issues such as an increased probability for a collision to occur.

Edit: So in my example, n = 288, k0 = 72. For r, I am using a system random generator from the python library: SystemRandom().getrandbits(k0BitsInt)

Code:

Here is my implementation, a bit messy and uses Sagemath because I want to encrypt using finite fields. But the padding should look the same.

Could you help me with this. Thanks

Toncu Vlad
  • 21
  • 2

0 Answers0