> In the first call you need to return a value at least big enough to hold the > decrypted data. 128 bytes (size of encrypted data) is big enough for RSA. > This isn't ideal, however. You keep saying the data is 24 bytes, but that's > not a given, it's only true in the case you were talking. If you receive a > different type of key it could be a different size. Even if I know the key > type is RC5, for instance, I still don't know the key length. That is > encoded in the PKCS #1. In order to get that you need to decrypt the block. > That is why I was saying using the first call/second call method could lead > to needing to double decrypt (once to find the length and once to return the > data).
This is what im doing, dont worry. > err, are you hard coding the size at 24. That is not what I said to do. You > function that use used to decrypt your PKCS #1 data returns a data length > somewhere. It has to or the function is incomplete (it's not really > processing the PKCS #1 data). That data length is what you need to return. Not hardcoding. That would be a nightmare. I do it as you said some mails ago: twice. -- dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto