On 2009.05.22 at 20:31:44 +0800, sofian sindhi wrote: > > By your suggestion, if I have BN a,1024bits, and b, 2048 bits, the > only way I can do OR is using char *BN_bn2hex(const BIGNUM *a) to > transform each one as 2 char*. > Then do the OR byte by byte?
No, you completely misunderstood me. I've rather have in mind that you have to access internal representation of bignum (which is defined in the public header bn.h) and than OR per BN_ULONG (which is typically 32-bit). Of course, if your BNs can be different in size, you should study internal representation a bit more, to find out how to find bits with same significance inside these representation. Or, if you want to be absolutely sure that future changes in the internal representation (however unlikely) wouldn't affect your code, use BN_bn2bin, not BN_bn2hex. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org