fatal("kexdh_client: BN_new failed");if(BN_bin2bn(kbuf, kout, shared_secret) ==NULL) fatal("kexdh_client:BN_bin2bnfailed");memset(kbuf,0, klen);free(kbuf);/* calc and verify H */kex_dh_hash( kex->client_version_string, kex->server_version_string, buffer_ptr(&kex->my), ...
BN_bn2bin不会创建可打印的字符串 - 相反,它会创建一个真正的二进制表示(即一个位序列)。更具体...
message = BN_bin2bn((constunsignedchar*) msg, RSA512_BYTE_LENGTH ,NULL);printf("%s\n", BN_bn2hex(message)); rsaEXP(message , &server512Rsa);//Decrypt with private keyExchangeBN_bn2bin(message , msg); BN_free(message);returnlength; }if(encType == Cipher_ALL5){ BIGNUM *tm = ...