Skip to content
GitLab
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
TTCN-3 Libraries
LibIts
Compare revisions
e7fd225d8556549ffee6a82f504ca032a78b6103...81624a5e373011bca6067a08d6ff63a2d3b4413b
Commits (1)
Bug fixed on Encryption algorithm support
· 81624a5e
YannGarcia
authored
Oct 10, 2019
81624a5e
Hide whitespace changes
Inline
Side-by-side
ttcn/Pki/LibItsPki_Functions.ttcn
View file @
81624a5e
...
...
@@ -1952,6 +1952,7 @@ module LibItsPki_Functions {
var
bitstring
v_enc_value
;
var
octetstring
v_ec_hash
;
var
PublicVerificationKey
v_public_verification_key
;
var
BasePublicEncryptionKey
v_public_encryption_key
;
var
Oct8
v_ec_hashed_id8
;
var
octetstring
public_enc_key_x
;
var
octetstring
public_enc_key_y
;
...
...
@@ -2241,13 +2242,18 @@ module LibItsPki_Functions {
}
else
{
v_enc_eccP256_curve_point
:=
m_eccP256CurvePoint_compressed_y_1
(
v_public_enc_key_x
);
}
if
(
PX_EC_ALG_FOR_AT
==
e_nist_p256
)
{
v_public_encryption_key
:=
valueof
(
m_publicEncryptionKey_eciesNistP256
(
v_enc_eccP256_curve_point
));
}
else
{
v_public_encryption_key
:=
valueof
(
m_publicEncryptionKey_eciesBrainpoolP256r1
(
v_enc_eccP256_curve_point
));
}
p_inner_at_request
.
publicKeys
:=
valueof
(
// The freshly generated public verification & encrypition keys to be used for the requested AT certificate
m_publicKeys
(
v_public_verification_key
,
m_encryptionKey
(
// FIXME Encryption keys could be optional
-
,
m
_public
E
ncryption
Key_ecdsaNistP256
(
v_enc_eccP256_curve_point
)
)
v
_public
_e
ncryption
_key
)
)
);
}
else
{
...
...
@@ -2291,6 +2297,7 @@ module LibItsPki_Functions {
var
bitstring
v_enc_value
;
var
octetstring
v_ec_hash
;
var
PublicVerificationKey
v_public_verification_key
;
var
BasePublicEncryptionKey
v_public_encryption_key
;
var
Oct8
v_ec_hashed_id8
;
var
octetstring
public_enc_key_x
;
var
octetstring
public_enc_key_y
;
...
...
@@ -2605,13 +2612,18 @@ module LibItsPki_Functions {
}
else
{
v_enc_eccP256_curve_point
:=
m_eccP256CurvePoint_compressed_y_1
(
v_public_enc_key_x
);
}
if
(
PX_EC_ALG_FOR_AT
==
e_nist_p256
)
{
v_public_encryption_key
:=
valueof
(
m_publicEncryptionKey_eciesNistP256
(
v_enc_eccP256_curve_point
));
}
else
{
v_public_encryption_key
:=
valueof
(
m_publicEncryptionKey_eciesBrainpoolP256r1
(
v_enc_eccP256_curve_point
));
}
p_inner_at_request
.
publicKeys
:=
valueof
(
// The freshly generated public verification & encrypition keys to be used for the requested AT certificate
m_publicKeys
(
v_public_verification_key
,
m_encryptionKey
(
// FIXME Encryption keys could be optional
-
,
m
_public
E
ncryption
Key_ecdsaNistP256
(
v_enc_eccP256_curve_point
)
)
v
_public
_e
ncryption
_key
)
)
);
}
else
{
...
...
ttcn/Security/LibItsSecurity_Templates.ttcn
View file @
81624a5e
...
...
@@ -1675,17 +1675,17 @@ module LibItsSecurity_Templates {
publicKey
:=
p_publicKey
}
// End of template mw_encryptionKey
template
(
value
)
BasePublicEncryptionKey
m_publicEncryptionKey_ec
dsa
NistP256
(
template
(
value
)
BasePublicEncryptionKey
m_publicEncryptionKey_ec
ies
NistP256
(
in
template
(
value
)
EccP256CurvePoint
p_eciesNistP256
)
:=
{
eciesNistP256
:=
p_eciesNistP256
}
// End of template m_publicEncryptionKey_ec
dsa
NistP256
}
// End of template m_publicEncryptionKey_ec
ies
NistP256
template
(
present
)
BasePublicEncryptionKey
mw_publicEncryptionKey_ec
dsa
NistP256
(
template
(
present
)
BasePublicEncryptionKey
mw_publicEncryptionKey_ec
ies
NistP256
(
template
(
present
)
EccP256CurvePoint
p_eciesNistP256
:=
?
)
:=
{
eciesNistP256
:=
p_eciesNistP256
}
// End of template mw_publicEncryptionKey_ec
dsa
NistP256
}
// End of template mw_publicEncryptionKey_ec
ies
NistP256
template
(
value
)
BasePublicEncryptionKey
m_publicEncryptionKey_eciesBrainpoolP256r1
(
in
template
(
value
)
EccP256CurvePoint
p_eciesBrainpoolP256r1
...
...