Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
19391879
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
大约 1 年 前同步成功
通知
9
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
19391879
编写于
10月 28, 2014
作者:
M
Matt Caswell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make bn opaque
Reviewed-by:
N
Tim Hudson
<
tjh@openssl.org
>
上级
348d0d14
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
58 addition
and
59 deletion
+58
-59
crypto/bn/bn.h
crypto/bn/bn.h
+0
-55
crypto/bn/bn_lcl.h
crypto/bn/bn_lcl.h
+54
-0
util/libeay.num
util/libeay.num
+4
-4
未找到文件。
crypto/bn/bn.h
浏览文件 @
19391879
...
@@ -292,55 +292,6 @@ typedef struct bn_recp_ctx_st BN_RECP_CTX;
...
@@ -292,55 +292,6 @@ typedef struct bn_recp_ctx_st BN_RECP_CTX;
typedef struct bn_gencb_st BN_GENCB;
typedef struct bn_gencb_st BN_GENCB;
#endif
#endif
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
;
};
/* Used for montgomery multiplication */
struct
bn_mont_ctx_st
{
int
ri
;
/* number of bits in R */
BIGNUM
RR
;
/* used to convert to montgomery form */
BIGNUM
N
;
/* The modulus */
BIGNUM
Ni
;
/* R*(1/R mod N) - N*Ni = 1
* (Ni is only stored for bignum algorithm) */
BN_ULONG
n0
[
2
];
/* least significant word(s) of Ni;
(type changed with 0.9.9, was "BN_ULONG n0;" before) */
int
flags
;
};
/* Used for reciprocal division/mod functions
* It cannot be shared between threads
*/
struct
bn_recp_ctx_st
{
BIGNUM
N
;
/* the divisor */
BIGNUM
Nr
;
/* the reciprocal */
int
num_bits
;
int
shift
;
int
flags
;
};
/* Used for slow "generation" functions. */
struct
bn_gencb_st
{
unsigned
int
ver
;
/* To handle binary (in)compatibility */
void
*
arg
;
/* callback-specific data */
union
{
/* if(ver==1) - handles old style callbacks */
void
(
*
cb_1
)(
int
,
int
,
void
*
);
/* if(ver==2) - new callback style */
int
(
*
cb_2
)(
int
,
int
,
BN_GENCB
*
);
}
cb
;
};
/* Wrapper function to make using BN_GENCB easier, */
/* Wrapper function to make using BN_GENCB easier, */
int
BN_GENCB_call
(
BN_GENCB
*
cb
,
int
a
,
int
b
);
int
BN_GENCB_call
(
BN_GENCB
*
cb
,
int
a
,
int
b
);
...
@@ -400,9 +351,6 @@ void BN_zero_ex(BIGNUM *a);
...
@@ -400,9 +351,6 @@ void BN_zero_ex(BIGNUM *a);
const
BIGNUM
*
BN_value_one
(
void
);
const
BIGNUM
*
BN_value_one
(
void
);
char
*
BN_options
(
void
);
char
*
BN_options
(
void
);
BN_CTX
*
BN_CTX_new
(
void
);
BN_CTX
*
BN_CTX_new
(
void
);
#ifndef OPENSSL_NO_DEPRECATED
void
BN_CTX_init
(
BN_CTX
*
c
);
#endif
void
BN_CTX_free
(
BN_CTX
*
c
);
void
BN_CTX_free
(
BN_CTX
*
c
);
void
BN_CTX_start
(
BN_CTX
*
ctx
);
void
BN_CTX_start
(
BN_CTX
*
ctx
);
BIGNUM
*
BN_CTX_get
(
BN_CTX
*
ctx
);
BIGNUM
*
BN_CTX_get
(
BN_CTX
*
ctx
);
...
@@ -415,7 +363,6 @@ int BN_num_bits(const BIGNUM *a);
...
@@ -415,7 +363,6 @@ int BN_num_bits(const BIGNUM *a);
int
BN_num_bits_word
(
BN_ULONG
l
);
int
BN_num_bits_word
(
BN_ULONG
l
);
int
BN_security_bits
(
int
L
,
int
N
);
int
BN_security_bits
(
int
L
,
int
N
);
BIGNUM
*
BN_new
(
void
);
BIGNUM
*
BN_new
(
void
);
void
BN_init
(
BIGNUM
*
);
void
BN_clear_free
(
BIGNUM
*
a
);
void
BN_clear_free
(
BIGNUM
*
a
);
BIGNUM
*
BN_copy
(
BIGNUM
*
a
,
const
BIGNUM
*
b
);
BIGNUM
*
BN_copy
(
BIGNUM
*
a
,
const
BIGNUM
*
b
);
void
BN_swap
(
BIGNUM
*
a
,
BIGNUM
*
b
);
void
BN_swap
(
BIGNUM
*
a
,
BIGNUM
*
b
);
...
@@ -548,7 +495,6 @@ int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
...
@@ -548,7 +495,6 @@ int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
BN_GENCB
*
cb
);
BN_GENCB
*
cb
);
BN_MONT_CTX
*
BN_MONT_CTX_new
(
void
);
BN_MONT_CTX
*
BN_MONT_CTX_new
(
void
);
void
BN_MONT_CTX_init
(
BN_MONT_CTX
*
ctx
);
int
BN_mod_mul_montgomery
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
b
,
int
BN_mod_mul_montgomery
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
const
BIGNUM
*
b
,
BN_MONT_CTX
*
mont
,
BN_CTX
*
ctx
);
BN_MONT_CTX
*
mont
,
BN_CTX
*
ctx
);
int
BN_to_montgomery
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
BN_MONT_CTX
*
mont
,
BN_CTX
*
ctx
);
int
BN_to_montgomery
(
BIGNUM
*
r
,
const
BIGNUM
*
a
,
BN_MONT_CTX
*
mont
,
BN_CTX
*
ctx
);
...
@@ -589,7 +535,6 @@ void BN_set_params(int mul,int high,int low,int mont);
...
@@ -589,7 +535,6 @@ void BN_set_params(int mul,int high,int low,int mont);
int
BN_get_params
(
int
which
);
/* 0, mul, 1 high, 2 low, 3 mont */
int
BN_get_params
(
int
which
);
/* 0, mul, 1 high, 2 low, 3 mont */
#endif
#endif
void
BN_RECP_CTX_init
(
BN_RECP_CTX
*
recp
);
BN_RECP_CTX
*
BN_RECP_CTX_new
(
void
);
BN_RECP_CTX
*
BN_RECP_CTX_new
(
void
);
void
BN_RECP_CTX_free
(
BN_RECP_CTX
*
recp
);
void
BN_RECP_CTX_free
(
BN_RECP_CTX
*
recp
);
int
BN_RECP_CTX_set
(
BN_RECP_CTX
*
recp
,
const
BIGNUM
*
rdiv
,
BN_CTX
*
ctx
);
int
BN_RECP_CTX_set
(
BN_RECP_CTX
*
recp
,
const
BIGNUM
*
rdiv
,
BN_CTX
*
ctx
);
...
...
crypto/bn/bn_lcl.h
浏览文件 @
19391879
...
@@ -119,6 +119,56 @@ extern "C" {
...
@@ -119,6 +119,56 @@ extern "C" {
#endif
#endif
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
;
};
/* Used for montgomery multiplication */
struct
bn_mont_ctx_st
{
int
ri
;
/* number of bits in R */
BIGNUM
RR
;
/* used to convert to montgomery form */
BIGNUM
N
;
/* The modulus */
BIGNUM
Ni
;
/* R*(1/R mod N) - N*Ni = 1
* (Ni is only stored for bignum algorithm) */
BN_ULONG
n0
[
2
];
/* least significant word(s) of Ni;
(type changed with 0.9.9, was "BN_ULONG n0;" before) */
int
flags
;
};
/* Used for reciprocal division/mod functions
* It cannot be shared between threads
*/
struct
bn_recp_ctx_st
{
BIGNUM
N
;
/* the divisor */
BIGNUM
Nr
;
/* the reciprocal */
int
num_bits
;
int
shift
;
int
flags
;
};
/* Used for slow "generation" functions. */
struct
bn_gencb_st
{
unsigned
int
ver
;
/* To handle binary (in)compatibility */
void
*
arg
;
/* callback-specific data */
union
{
/* if(ver==1) - handles old style callbacks */
void
(
*
cb_1
)(
int
,
int
,
void
*
);
/* if(ver==2) - new callback style */
int
(
*
cb_2
)(
int
,
int
,
BN_GENCB
*
);
}
cb
;
};
/*
/*
* BN_window_bits_for_exponent_size -- macro for sliding window mod_exp functions
* BN_window_bits_for_exponent_size -- macro for sliding window mod_exp functions
*
*
...
@@ -506,6 +556,10 @@ extern "C" {
...
@@ -506,6 +556,10 @@ extern "C" {
}
}
#endif
/* !BN_LLONG */
#endif
/* !BN_LLONG */
void
BN_init
(
BIGNUM
*
a
);
void
BN_RECP_CTX_init
(
BN_RECP_CTX
*
recp
);
void
BN_MONT_CTX_init
(
BN_MONT_CTX
*
ctx
);
void
bn_mul_normal
(
BN_ULONG
*
r
,
BN_ULONG
*
a
,
int
na
,
BN_ULONG
*
b
,
int
nb
);
void
bn_mul_normal
(
BN_ULONG
*
r
,
BN_ULONG
*
a
,
int
na
,
BN_ULONG
*
b
,
int
nb
);
void
bn_mul_comba8
(
BN_ULONG
*
r
,
BN_ULONG
*
a
,
BN_ULONG
*
b
);
void
bn_mul_comba8
(
BN_ULONG
*
r
,
BN_ULONG
*
a
,
BN_ULONG
*
b
);
void
bn_mul_comba4
(
BN_ULONG
*
r
,
BN_ULONG
*
a
,
BN_ULONG
*
b
);
void
bn_mul_comba4
(
BN_ULONG
*
r
,
BN_ULONG
*
a
,
BN_ULONG
*
b
);
...
...
util/libeay.num
浏览文件 @
19391879
...
@@ -1064,7 +1064,7 @@ asn1_add_error 1091 EXIST::FUNCTION:
...
@@ -1064,7 +1064,7 @@ asn1_add_error 1091 EXIST::FUNCTION:
d2i_ASN1_BMPSTRING 1092 EXIST::FUNCTION:
d2i_ASN1_BMPSTRING 1092 EXIST::FUNCTION:
i2d_ASN1_BMPSTRING 1093 EXIST::FUNCTION:
i2d_ASN1_BMPSTRING 1093 EXIST::FUNCTION:
BIO_f_ber 1094 NOEXIST::FUNCTION:
BIO_f_ber 1094 NOEXIST::FUNCTION:
BN_init 1095 EXIST::FUNCTION:
BN_init 1095
NO
EXIST::FUNCTION:
COMP_CTX_new 1096 EXIST::FUNCTION:
COMP_CTX_new 1096 EXIST::FUNCTION:
COMP_CTX_free 1097 EXIST::FUNCTION:
COMP_CTX_free 1097 EXIST::FUNCTION:
COMP_CTX_compress_block 1098 NOEXIST::FUNCTION:
COMP_CTX_compress_block 1098 NOEXIST::FUNCTION:
...
@@ -1097,15 +1097,15 @@ bn_mul_recursive 1124 NOEXIST::FUNCTION:
...
@@ -1097,15 +1097,15 @@ bn_mul_recursive 1124 NOEXIST::FUNCTION:
bn_mul_part_recursive 1125 NOEXIST::FUNCTION:
bn_mul_part_recursive 1125 NOEXIST::FUNCTION:
bn_sqr_recursive 1126 NOEXIST::FUNCTION:
bn_sqr_recursive 1126 NOEXIST::FUNCTION:
bn_mul_low_normal 1127 NOEXIST::FUNCTION:
bn_mul_low_normal 1127 NOEXIST::FUNCTION:
BN_RECP_CTX_init 1128 EXIST::FUNCTION:
BN_RECP_CTX_init 1128
NO
EXIST::FUNCTION:
BN_RECP_CTX_new 1129 EXIST::FUNCTION:
BN_RECP_CTX_new 1129 EXIST::FUNCTION:
BN_RECP_CTX_free 1130 EXIST::FUNCTION:
BN_RECP_CTX_free 1130 EXIST::FUNCTION:
BN_RECP_CTX_set 1131 EXIST::FUNCTION:
BN_RECP_CTX_set 1131 EXIST::FUNCTION:
BN_mod_mul_reciprocal 1132 EXIST::FUNCTION:
BN_mod_mul_reciprocal 1132 EXIST::FUNCTION:
BN_mod_exp_recp 1133 EXIST::FUNCTION:
BN_mod_exp_recp 1133 EXIST::FUNCTION:
BN_div_recp 1134 EXIST::FUNCTION:
BN_div_recp 1134 EXIST::FUNCTION:
BN_CTX_init 1135
EXIST::FUNCTION:DEPRECATED
BN_CTX_init 1135
NOEXIST::FUNCTION:
BN_MONT_CTX_init 1136 EXIST::FUNCTION:
BN_MONT_CTX_init 1136
NO
EXIST::FUNCTION:
RAND_get_rand_method 1137 EXIST::FUNCTION:
RAND_get_rand_method 1137 EXIST::FUNCTION:
PKCS7_add_attribute 1138 EXIST::FUNCTION:
PKCS7_add_attribute 1138 EXIST::FUNCTION:
PKCS7_add_signed_attribute 1139 EXIST::FUNCTION:
PKCS7_add_signed_attribute 1139 EXIST::FUNCTION:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录