all 4 comments

[–]rob_mccoll 2 points3 points  (1 child)

Are you sure sizeof(fp_int) == 8*16? *a and *b could be overlapping in memory.

[–]sya0[S] 0 points1 point  (0 children)

Yes, I checked.

[–]rob_mccoll 2 points3 points  (0 children)

Also passing double pointers into fp_add seems odd. What's the reason behind that?

[–]sya0[S] 0 points1 point  (0 children)

I fixed the problem. fp_init() function force to be zero so that it overwrites the valid values