I just completed writing my first program using libcrypto to handle RSA encryption sing a public key extracted from a X509 certificate. This program communicates with a service created by our parent company.
The first attempts that I made to run my program against the service, resulted in an error back from it stating that an encrypted field was required. After much brow beating, I spoke to a colleague of mine that works on another system and had to interface that system in to parent company service as well. He said that he had to pre-pend 16 byte sof data to the raw field prior to encrypting through RSA. Sure enough, having pre-pended 16 bytes to my raw field before encrypting through RSA_public_encrypt() and sent the result to service, I got success! So my question is, is it required to pre-pend 16 bytes to the raw field or is this something my parent company are doing for their own reasons? TIA.