Playing with openssl BN_hex2bn and BN_bn2hex. Expecting to get the original string after hex2bn and then bn2hex, but always got a longer string, with the first past the same as the original string, but a long post fix. Followin gis the code
BIGNUM* test2 = BN_new();
BN_hex2bn(&test2, argv[1]);
char * number_str_test2 = BN_bn2hex(test2);
printf("Input hex string test2 is %s\n", number_str_test2);
Running result:
>./a.out 10000000000000000
>Input hex string test2 is 100000000000000030344079B87F000010
Please note the post fix 3034407....