Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
e24536ba
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
e24536ba
编写于
8月 28, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 28, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9888 XTS新增HUKS对init finish阶段的长度和算法校验
Merge pull request !9888 from WXY123456/master
上级
31f9eb99
6044d2ac
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
30 addition
and
16 deletion
+30
-16
security/huks_napi_BasicTest/include/huks_agree_dh_test.h
security/huks_napi_BasicTest/include/huks_agree_dh_test.h
+2
-2
security/huks_napi_BasicTest/src/huks_derive_hkdf_test.cpp
security/huks_napi_BasicTest/src/huks_derive_hkdf_test.cpp
+2
-2
security/huks_napi_BasicTest/src/huks_derive_pbkdf_test.cpp
security/huks_napi_BasicTest/src/huks_derive_pbkdf_test.cpp
+1
-1
security/security_huks_basic/utils/param/agree/publicAgreeCallback.js
...urity_huks_basic/utils/param/agree/publicAgreeCallback.js
+5
-2
security/security_huks_basic/utils/param/agree/publicAgreePromise.js
...curity_huks_basic/utils/param/agree/publicAgreePromise.js
+5
-2
security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit.test.js
...e/SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit.test.js
+3
-3
security/security_huks_reformed_test/utils/param/agree/publicAgreeCallback.js
...ks_reformed_test/utils/param/agree/publicAgreeCallback.js
+6
-2
security/security_huks_reformed_test/utils/param/agree/publicAgreePromise.js
...uks_reformed_test/utils/param/agree/publicAgreePromise.js
+6
-2
未找到文件。
security/huks_napi_BasicTest/include/huks_agree_dh_test.h
浏览文件 @
e24536ba
...
...
@@ -65,7 +65,7 @@ static struct OH_Huks_Param g_agreeParams01Init001[] = {
.
uint32Param
=
OH_HUKS_KEY_PURPOSE_AGREE
},
{
.
tag
=
OH_HUKS_TAG_KEY_SIZE
,
.
uint32Param
=
OH_HUKS_
DH_KEY_SIZE_2048
.
uint32Param
=
OH_HUKS_
AES_KEY_SIZE_256
}
};
static
struct
OH_Huks_Param
g_agreeParams01Finish001
[]
=
{
...
...
@@ -107,7 +107,7 @@ static struct OH_Huks_Param g_agreeParams02Init001[] = {
.
uint32Param
=
OH_HUKS_KEY_PURPOSE_AGREE
},
{
.
tag
=
OH_HUKS_TAG_KEY_SIZE
,
.
uint32Param
=
OH_HUKS_
DH_KEY_SIZE_2048
.
uint32Param
=
OH_HUKS_
AES_KEY_SIZE_256
}
};
static
struct
OH_Huks_Param
g_agreeParams02Finish001
[]
=
{
...
...
security/huks_napi_BasicTest/src/huks_derive_hkdf_test.cpp
浏览文件 @
e24536ba
...
...
@@ -89,10 +89,10 @@ static struct OH_Huks_Param g_hkdfFinishParams001[] = {
}
},
{
.
tag
=
OH_HUKS_TAG_ALGORITHM
,
.
uint32Param
=
OH_HUKS_ALG_
HKDF
.
uint32Param
=
OH_HUKS_ALG_
AES
},
{
.
tag
=
OH_HUKS_TAG_KEY_SIZE
,
.
uint32Param
=
DERIVE_KEY_SIZE_32
.
uint32Param
=
256
},
{
.
tag
=
OH_HUKS_TAG_PURPOSE
,
.
uint32Param
=
OH_HUKS_KEY_PURPOSE_DERIVE
...
...
security/huks_napi_BasicTest/src/huks_derive_pbkdf_test.cpp
浏览文件 @
e24536ba
...
...
@@ -118,7 +118,7 @@ static struct OH_Huks_Param g_pbkdf2FinishParams001[] = {
.
uint32Param
=
OH_HUKS_ALG_AES
},
{
.
tag
=
OH_HUKS_TAG_KEY_SIZE
,
.
uint32Param
=
DERIVE_KEY_SIZE_32
.
uint32Param
=
256
},
{
.
tag
=
OH_HUKS_TAG_PURPOSE
,
.
uint32Param
=
OH_HUKS_KEY_PURPOSE_DERIVE
...
...
security/security_huks_basic/utils/param/agree/publicAgreeCallback.js
浏览文件 @
e24536ba
...
...
@@ -234,7 +234,10 @@ async function publicAgreeFunc(
HuksOptions
.
properties
.
splice
(
5
,
1
);
}
await
publicAgreeInitFunc
(
srcKeyAliesFrist
,
HuksOptions
);
let
HuksOptionsInit
=
JSON
.
parse
(
JSON
.
stringify
(
HuksOptions
));
HuksOptionsInit
.
properties
.
splice
(
2
,
1
,
HuksOptionsFinish
.
properties
[
3
])
await
publicAgreeInitFunc
(
srcKeyAliesFrist
,
HuksOptionsInit
);
await
publicAgreeUpdateFunc
(
HuksOptions
,
1
);
await
publicAgreeFinishAbortFunc
(
HuksOptionsFinish
,
thirdInderfaceName
);
...
...
@@ -245,7 +248,7 @@ async function publicAgreeFunc(
value
:
stringToUint8Array
(
srcKeyAliesSecond
+
'
final
'
),
});
await
publicAgreeInitFunc
(
srcKeyAliesSecond
,
HuksOptions
);
await
publicAgreeInitFunc
(
srcKeyAliesSecond
,
HuksOptions
Init
);
await
publicAgreeUpdateFunc
(
HuksOptions
,
2
);
await
publicAgreeFinishAbortFunc
(
HuksOptionsFinishSecond
,
thirdInderfaceName
);
...
...
security/security_huks_basic/utils/param/agree/publicAgreePromise.js
浏览文件 @
e24536ba
...
...
@@ -148,7 +148,10 @@ async function publicAgreeFunc(
HuksOptions
.
properties
.
splice
(
5
,
1
);
}
await
publicAgreeInitFunc
(
srcKeyAliesFrist
,
HuksOptions
);
let
HuksOptionsInit
=
JSON
.
parse
(
JSON
.
stringify
(
HuksOptions
));
HuksOptionsInit
.
properties
.
splice
(
2
,
1
,
HuksOptionsFinish
.
properties
[
3
])
await
publicAgreeInitFunc
(
srcKeyAliesFrist
,
HuksOptionsInit
);
await
publicAgreeUpdateFunc
(
HuksOptions
,
1
);
await
publicAgreeFinishAbortFunc
(
HuksOptionsFinish
,
thirdInderfaceName
);
...
...
@@ -159,7 +162,7 @@ async function publicAgreeFunc(
value
:
stringToUint8Array
(
srcKeyAliesSecond
+
'
final
'
),
});
await
publicAgreeInitFunc
(
srcKeyAliesSecond
,
HuksOptions
);
await
publicAgreeInitFunc
(
srcKeyAliesSecond
,
HuksOptions
Init
);
await
publicAgreeUpdateFunc
(
HuksOptions
,
2
);
await
publicAgreeFinishAbortFunc
(
HuksOptionsFinishSecond
,
thirdInderfaceName
);
...
...
security/security_huks_reformed_test/huks_agree_promise_BasicTest/src/main/js/test/Agree/SecurityHuksAgreeDHBasicFinish65KBPromiseJsunit.test.js
浏览文件 @
e24536ba
...
...
@@ -52,9 +52,9 @@ function makehuksOptionsDerive(srcKeyAliesFirst){
let
huksOptionsFinish
=
{
properties
:
new
Array
(
HuksAgreeDH
.
HuksKeyALGORITHMAES
,
HuksAgreeDH
.
HuksKeySIZE256
,
HuksAgreeDH
.
HuksKeyPurposeDERIVE
,
HuksAgreeDH
.
HuksKeyDIGESTSHA256
,
HuksAgreeDH
.
HuksKeySIZE256
,
HuksAgreeDH
.
HuksKeyPADDINGNONE
,
HuksAgreeDH
.
HuksKeyBLOCKMODEECB
,
{
...
...
@@ -73,9 +73,9 @@ function makehuksOptionsHmac(srcKeyAliesFirst){
let
huksOptionsFinish
=
{
properties
:
new
Array
(
HuksAgreeDH
.
HuksKeyALGORITHMHMAC
,
HuksAgreeDH
.
HuksKeySIZE256
,
HuksAgreeDH
.
HuksKeyPurposeMAC
,
HuksAgreeDH
.
HuksKeyDIGESTSHA256
,
HuksAgreeDH
.
HuksKeySIZE256
,
HuksAgreeDH
.
HuksKeyPADDINGNONE
,
HuksAgreeDH
.
HuksKeyBLOCKMODEECB
,
{
...
...
security/security_huks_reformed_test/utils/param/agree/publicAgreeCallback.js
浏览文件 @
e24536ba
...
...
@@ -272,6 +272,7 @@ async function publicAgreeFunc(
thirdInderfaceName
)
{
try
{
await
publicAgreeGenFunc
(
srcKeyAliesFrist
,
HuksOptions
);
await
publicAgreeGenFunc
(
srcKeyAliesSecond
,
HuksOptions
);
await
publicAgreeExport1Func
(
srcKeyAliesFrist
,
HuksOptions
,
1
);
...
...
@@ -284,7 +285,10 @@ async function publicAgreeFunc(
HuksOptions
.
properties
.
splice
(
5
,
1
);
}
await
publicAgreeInitFunc
(
srcKeyAliesFrist
,
HuksOptions
);
let
HuksOptionsInit
=
JSON
.
parse
(
JSON
.
stringify
(
HuksOptions
));
HuksOptionsInit
.
properties
.
splice
(
2
,
1
,
HuksOptionsFinish
.
properties
[
3
])
await
publicAgreeInitFunc
(
srcKeyAliesFrist
,
HuksOptionsInit
);
await
publicAgreeUpdateFunc
(
HuksOptions
,
1
);
await
publicAgreeFinishAbortFunc
(
HuksOptionsFinish
,
thirdInderfaceName
);
...
...
@@ -295,7 +299,7 @@ async function publicAgreeFunc(
value
:
stringToUint8Array
(
srcKeyAliesSecond
+
'
final
'
),
});
await
publicAgreeInitFunc
(
srcKeyAliesSecond
,
HuksOptions
);
await
publicAgreeInitFunc
(
srcKeyAliesSecond
,
HuksOptions
Init
);
await
publicAgreeUpdateFunc
(
HuksOptions
,
2
);
await
publicAgreeFinishAbortFunc
(
HuksOptionsFinishSecond
,
thirdInderfaceName
);
...
...
security/security_huks_reformed_test/utils/param/agree/publicAgreePromise.js
浏览文件 @
e24536ba
...
...
@@ -166,6 +166,7 @@ async function publicAgreeFunc(
thirdInderfaceName
)
{
try
{
await
publicAgreeGenFunc
(
srcKeyAliesFrist
,
HuksOptions
);
await
publicAgreeGenFunc
(
srcKeyAliesSecond
,
HuksOptions
);
await
publicAgreeExport1Func
(
srcKeyAliesFrist
,
HuksOptions
,
1
);
...
...
@@ -178,7 +179,10 @@ async function publicAgreeFunc(
HuksOptions
.
properties
.
splice
(
5
,
1
);
}
await
publicAgreeInitFunc
(
srcKeyAliesFrist
,
HuksOptions
);
let
HuksOptionsInit
=
JSON
.
parse
(
JSON
.
stringify
(
HuksOptions
));
HuksOptionsInit
.
properties
.
splice
(
2
,
1
,
HuksOptionsFinish
.
properties
[
3
])
await
publicAgreeInitFunc
(
srcKeyAliesFrist
,
HuksOptionsInit
);
await
publicAgreeUpdateFunc
(
HuksOptions
,
1
);
await
publicAgreeFinishAbortFunc
(
HuksOptionsFinish
,
thirdInderfaceName
);
...
...
@@ -189,7 +193,7 @@ async function publicAgreeFunc(
value
:
stringToUint8Array
(
srcKeyAliesSecond
+
'
final
'
),
});
await
publicAgreeInitFunc
(
srcKeyAliesSecond
,
HuksOptions
);
await
publicAgreeInitFunc
(
srcKeyAliesSecond
,
HuksOptions
Init
);
await
publicAgreeUpdateFunc
(
HuksOptions
,
2
);
await
publicAgreeFinishAbortFunc
(
HuksOptionsFinishSecond
,
thirdInderfaceName
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录