[Botan-devel] RSA with EMSA3 padding

Jack Lloyd lloyd at randombit.net
Fri Nov 28 11:10:47 EST 2008


On Fri, Nov 28, 2008 at 04:41:24PM +0100, Rickard Bondesson wrote:
> No, that is not right. EME_PKCS1v15 if for encrypting with RSA, block type 2. I would like block type 1.
> 
> This page:
> http://www.frogmouth.net/qca/apidocs/html/namespaceQCA.html#c368775aaad8054778f4199999f49ca6
> have something called EMSA3 Raw. That is what I would like to use.

Interesting! I have never heard of doing this. This is especially
interesting to me considering that QCA is (partially) based on Botan.

> 
> The padding should look like this:
> 0x00 0x01 0xff ... 0xff 0x00 hash/data
> Which is what is used in the EMSA3 class in Botan.
> 
> I could do my own padding function, but is it possible to have the
> EMSA3 Raw functionality?

I'm investigating. It does not seem like it will be at all difficult
to add for 1.7.24.

I assume you are aware of the potential security problems with this
padding scheme? I would hope this is only being used for compatability
reasons.

-Jack



More information about the botan-devel mailing list