Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ITS - Intelligent Transport Systems
ITS
Commits
0cffb776
Commit
0cffb776
authored
Dec 11, 2017
by
garciay
Browse files
Add Brainpool Security support
parent
36aa1e2e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
ttcn/TestCodec/TestCodec_Certificates.ttcn
View file @
0cffb776
This diff is collapsed.
Click to expand it.
ttcn/TestCodec/TestCodec_SecuredFuntions.ttcn
View file @
0cffb776
...
...
@@ -43,7 +43,7 @@ module TestCodec_SecuredFuntions {
}
else
{
setverdict
(
pass
);
}
}
// End of test tc_sha256_1
}
// End of test
case
tc_sha256_1
testcase
tc_sha384_1
()
runs
on
TCType
system
TCType
{
var
octetstring
v_test
:=
'616263'O
;
...
...
@@ -57,7 +57,7 @@ module TestCodec_SecuredFuntions {
}
else
{
setverdict
(
pass
);
}
}
// End of test tc_sha384_1
}
// End of test
case
tc_sha384_1
testcase
tc_f_generate_key_pair_1
()
runs
on
TCType
system
TCType
{
var
Oct32
v_private_key
;
...
...
@@ -73,7 +73,7 @@ module TestCodec_SecuredFuntions {
log
(
"v_public_key Y= "
,
v_publicKeyY
);
setverdict
(
pass
);
}
// End of test tc_f_generate_key_pair_1
}
// End of test
case
tc_f_generate_key_pair_1
testcase
tc_f_generate_key_pair_2
()
runs
on
TCType
system
TCType
{
var
Oct32
v_private_key
;
...
...
@@ -89,7 +89,7 @@ module TestCodec_SecuredFuntions {
log
(
"v_public_key Y= "
,
v_publicKeyY
);
setverdict
(
pass
);
}
// End of test tc_f_generate_key_pair_2
}
// End of test
case
tc_f_generate_key_pair_2
testcase
tc_f_generate_key_pair_3
()
runs
on
TCType
system
TCType
{
var
Oct48
v_private_key
;
...
...
@@ -105,7 +105,7 @@ module TestCodec_SecuredFuntions {
log
(
"v_public_key Y= "
,
v_publicKeyY
);
setverdict
(
pass
);
}
// End of test tc_f_generate_key_pair_3
}
// End of test
case
tc_f_generate_key_pair_3
testcase
tc_f_signWithEcdsaNistp256WithSha256_1
()
runs
on
TCType
system
TCType
{
var
Oct32
v_private_key
;
...
...
@@ -129,7 +129,7 @@ module TestCodec_SecuredFuntions {
}
setverdict
(
pass
);
}
// End of test tc_f_signWithEcdsaNistp256WithSha256_1
}
// End of test
case
tc_f_signWithEcdsaNistp256WithSha256_1
testcase
tc_f_verifyWithEcdsaNistp256WithSha256_1
()
runs
on
TCType
system
TCType
{
var
Oct32
v_private_key
;
...
...
@@ -158,7 +158,7 @@ module TestCodec_SecuredFuntions {
}
else
{
setverdict
(
pass
);
}
}
// End of test tc_f_verifyWithEcdsaNistp256WithSha256_1
}
// End of test
case
tc_f_verifyWithEcdsaNistp256WithSha256_1
testcase
tc_f_verifyWithEcdsaNistp256WithSha256_2
()
runs
on
TCType
system
TCType
{
var
Oct32
v_private_key
;
...
...
@@ -203,7 +203,7 @@ module TestCodec_SecuredFuntions {
}
else
{
setverdict
(
pass
);
}
}
// End of test tc_f_verifyWithEcdsaNistp256WithSha256_2
}
// End of test
case
tc_f_verifyWithEcdsaNistp256WithSha256_2
testcase
tc_f_verifyWithEcdsaNistp256WithSha256_3
()
runs
on
TCType
system
TCType
{
var
Oct32
v_private_key
;
...
...
@@ -256,7 +256,7 @@ module TestCodec_SecuredFuntions {
}
setverdict
(
pass
);
}
// End of test tc_f_verifyWithEcdsaNistp256WithSha256_3
}
// End of test
case
tc_f_verifyWithEcdsaNistp256WithSha256_3
testcase
tc_f_signWithEcdsaBrainpoolp256WithSha256_1
()
runs
on
TCType
system
TCType
{
var
Oct32
v_private_key
;
...
...
@@ -280,7 +280,7 @@ module TestCodec_SecuredFuntions {
}
setverdict
(
pass
);
}
// End of test tc_f_signWithEcdsaBrainpoolp256WithSha256_1
}
// End of test
case
tc_f_signWithEcdsaBrainpoolp256WithSha256_1
testcase
tc_f_signWithEcdsaBrainpoolp384WithSha384_1
()
runs
on
TCType
system
TCType
{
var
Oct48
v_private_key
;
...
...
@@ -304,7 +304,7 @@ module TestCodec_SecuredFuntions {
}
setverdict
(
pass
);
}
// End of test tc_f_signWithEcdsaBrainpoolp384WithSha384_1
}
// End of test
case
tc_f_signWithEcdsaBrainpoolp384WithSha384_1
testcase
tc_f_verifyWithEcdsaBrainpoolp256WithSha256_1
()
runs
on
TCType
system
TCType
{
var
Oct32
v_private_key
;
...
...
@@ -333,7 +333,7 @@ module TestCodec_SecuredFuntions {
}
else
{
setverdict
(
pass
);
}
}
// End of test tc_f_verifyWithEcdsaBrainpoolp256WithSha256_1
}
// End of test
case
tc_f_verifyWithEcdsaBrainpoolp256WithSha256_1
testcase
tc_f_verifyWithEcdsaBrainpoolp256WithSha256_2
()
runs
on
TCType
system
TCType
{
var
Oct32
v_private_key
;
...
...
@@ -378,7 +378,7 @@ module TestCodec_SecuredFuntions {
}
else
{
setverdict
(
pass
);
}
}
// End of test tc_f_verifyWithEcdsaBrainpoolp256WithSha256_2
}
// End of test
case
tc_f_verifyWithEcdsaBrainpoolp256WithSha256_2
testcase
tc_f_verifyWithEcdsaBrainpoolp256WithSha256_3
()
runs
on
TCType
system
TCType
{
var
Oct32
v_private_key
;
...
...
@@ -431,7 +431,7 @@ module TestCodec_SecuredFuntions {
}
setverdict
(
pass
);
}
// End of test tc_f_verifyWithEcdsaBrainpoolp256WithSha256_3
}
// End of test
case
tc_f_verifyWithEcdsaBrainpoolp256WithSha256_3
testcase
tc_f_verifyWithEcdsaBrainpoolp384WithSha384_1
()
runs
on
TCType
system
TCType
{
var
Oct48
v_private_key
;
...
...
@@ -460,7 +460,7 @@ module TestCodec_SecuredFuntions {
}
else
{
setverdict
(
pass
);
}
}
// End of test tc_f_verifyWithEcdsaBrainpoolp384WithSha384_1
}
// End of test
case
tc_f_verifyWithEcdsaBrainpoolp384WithSha384_1
testcase
tc_f_verifyWithEcdsaBrainpoolp384WithSha384_2
()
runs
on
TCType
system
TCType
{
var
Oct48
v_private_key
;
...
...
@@ -505,7 +505,7 @@ module TestCodec_SecuredFuntions {
}
else
{
setverdict
(
pass
);
}
}
// End of test tc_f_verifyWithEcdsaBrainpoolp384WithSha384_2
}
// End of test
case
tc_f_verifyWithEcdsaBrainpoolp384WithSha384_2
testcase
tc_f_verifyWithEcdsaBrainpoolp384WithSha384_3
()
runs
on
TCType
system
TCType
{
var
Oct48
v_private_key
;
...
...
@@ -558,6 +558,26 @@ module TestCodec_SecuredFuntions {
}
setverdict
(
pass
);
}
// End of test tc_f_verifyWithEcdsaBrainpoolp384WithSha384_3
}
// End of testcase tc_f_verifyWithEcdsaBrainpoolp384WithSha384_3
control
{
execute
(
tc_sha256_1
());
execute
(
tc_sha384_1
());
execute
(
tc_f_generate_key_pair_1
());
execute
(
tc_f_generate_key_pair_2
());
execute
(
tc_f_generate_key_pair_3
());
execute
(
tc_f_signWithEcdsaNistp256WithSha256_1
());
execute
(
tc_f_verifyWithEcdsaNistp256WithSha256_1
());
execute
(
tc_f_verifyWithEcdsaNistp256WithSha256_2
());
execute
(
tc_f_verifyWithEcdsaNistp256WithSha256_3
());
execute
(
tc_f_signWithEcdsaBrainpoolp256WithSha256_1
());
execute
(
tc_f_signWithEcdsaBrainpoolp384WithSha384_1
());
execute
(
tc_f_verifyWithEcdsaBrainpoolp256WithSha256_1
());
execute
(
tc_f_verifyWithEcdsaBrainpoolp256WithSha256_2
());
execute
(
tc_f_verifyWithEcdsaBrainpoolp256WithSha256_3
());
execute
(
tc_f_verifyWithEcdsaBrainpoolp384WithSha384_1
());
execute
(
tc_f_verifyWithEcdsaBrainpoolp384WithSha384_2
());
execute
(
tc_f_verifyWithEcdsaBrainpoolp384WithSha384_3
());
}
}
// End of module TestCodec_SecuredFuntions
ttcn/TestCodec/TestCodec_SecuredMessages.ttcn
View file @
0cffb776
...
...
@@ -46,7 +46,7 @@ module TestCodec_SecuredMessages {
setverdict
(
pass
);
}
}
}
}
// End of testcase tc_ssp_cam
testcase
tc_ssp_denm
()
runs
on
TCType
system
TCType
{
var
SspDENM
v_sspDENM
:=
valueof
(
m_sspDENMContainer_sign_all
);
...
...
@@ -64,21 +64,21 @@ module TestCodec_SecuredMessages {
setverdict
(
pass
);
}
}
}
}
// End of testcase tc_ssp_denm
testcase
tc_secured_message_unsecured
()
runs
on
TCType
system
TCType
{
var
template
(
value
)
EtsiTs103097Data
v_secured_data
;
var
bitstring
v_encMsg
;
v_secured_data
:=
m_etsiTs103097Data_unsecured
(
'
CAFEDECA
'
O
);
'
CAFEDECA
'
O
);
v_encMsg
:=
encvalue
(
v_secured_data
);
setverdict
(
pass
,
"Encoding passed."
);
}
}
// End of testcase tc_secured_message_unsecured
testcase
tc_secured_message_signed
()
runs
on
TCType
system
TCType
{
testcase
tc_secured_message_signed
_1
()
runs
on
TCType
system
TCType
{
var
template
(
value
)
EtsiTs103097Data
v_secured_data
;
var
octetstring
v_raw_payload_to_be_signed
:=
'
CAFFEDECA0000001
'
O
;
var
HashedId8
v_digest
:=
'0000000000000000'O
;
...
...
@@ -111,6 +111,13 @@ module TestCodec_SecuredMessages {
v_encMsg
:=
encvalue
(
v_secured_data
);
setverdict
(
pass
,
"Encoding passed."
);
}
// End of testcase tc_secured_message_signed_1
control
{
execute
(
tc_ssp_cam
());
execute
(
tc_ssp_denm
());
execute
(
tc_secured_message_unsecured
());
execute
(
tc_secured_message_signed_1
());
}
}
// End of module TestCodec_SecuredMessages
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment