Openssl 学习—2.BIGNUM结构
BIGNUM数据结构是openssl中带的专门处理大数的一种结构
一、结构简介
先看什么是BIGNUM:
typedef struct bignum_st BIGNUM;
而
struct bignum_st
{
BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */
int top; /* Index of last used d +1. */
/* The next are internal book keeping for bn_expand. */
int dmax; /* Size of the d array. */
int neg; /* one if the number is negative */
int flags;
};
top: 使用的d结构的数目
dmax:d数组的容量
neg:是否为负数
flags:/
d:d是什么、占多少字节从下方获得:
/* assuming long is 64bit */
#ifdef SIXTY_FOUR_BIT_LONG