Commit b702fe2f authored by garciay's avatar garciay
Browse files

AtsCAM validation with Nordsys

parent 76ffa86f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -524,7 +524,7 @@ int security_ecc::generate_and_derive_ephemeral_key(const encryption_algotithm p
int security_ecc::generate_and_derive_ephemeral_key(const encryption_algotithm p_enc_algorithm, const OCTETSTRING& p_private_enc_key, const OCTETSTRING& p_recipients_compressed_key_x, const INTEGER& p_compressed_mode, const OCTETSTRING& p_enc_sym_key, const OCTETSTRING& p_expected_nonce, const OCTETSTRING& p_authentication_vector) {
int security_ecc::generate_and_derive_ephemeral_key(const encryption_algotithm p_enc_algorithm, const OCTETSTRING& p_private_enc_key, const OCTETSTRING& p_recipients_compressed_key_x, const INTEGER& p_compressed_mode, const OCTETSTRING& p_enc_sym_key, const OCTETSTRING& p_expected_nonce, const OCTETSTRING& p_authentication_vector) {
  loggers::get_instance().log(">>> security_ecc::generate_and_derive_ephemeral_key (3)");
  loggers::get_instance().log(">>> security_ecc::generate_and_derive_ephemeral_key (3)");


  security_ecc ec(ec_elliptic_curves::nist_p_256, p_recipients_compressed_key_x, (p_compressed_mode == 0) ? ecc_compressed_mode::compressed_y_0 : ecc_compressed_mode::compressed_y_1);
  security_ecc ec(ec_elliptic_curves::nist_p_256, p_recipients_compressed_key_x, (p_compressed_mode == 0) ? ecc_compressed_mode::compressed_y_0 : ecc_compressed_mode::compressed_y_1); // FIXME Why using ec_elliptic_curves::nist_p_256, it can be brainpool_p_256_r1
  return generate_and_derive_ephemeral_key(p_enc_algorithm, p_private_enc_key, ec.public_key_x(), ec.public_key_y(), p_enc_sym_key, p_expected_nonce, p_authentication_vector);
  return generate_and_derive_ephemeral_key(p_enc_algorithm, p_private_enc_key, ec.public_key_x(), ec.public_key_y(), p_enc_sym_key, p_expected_nonce, p_authentication_vector);
}
}


+1 −1
Original line number Original line Diff line number Diff line
@@ -394,7 +394,7 @@ int security_services::process_ieee_1609_dot2_encrypted_data(const IEEE1609dot2:
    const INTEGER compressed_mode(1);
    const INTEGER compressed_mode(1);
    result = ec.generate_and_derive_ephemeral_key(encryption_algotithm::aes_128_ccm, p_enc_key, ecies->v().compressed__y__1(), compressed_mode, ecies->c(), p_encrypted_data.ciphertext().aes128ccm().nonce(), ecies->t());
    result = ec.generate_and_derive_ephemeral_key(encryption_algotithm::aes_128_ccm, p_enc_key, ecies->v().compressed__y__1(), compressed_mode, ecies->c(), p_encrypted_data.ciphertext().aes128ccm().nonce(), ecies->t());
  } else {
  } else {
    loggers::get_instance().warning("security_services::decrypt_gn_payload: Failed to decode Decrypt Ieee1609Dot2Data-Encrypted");
    loggers::get_instance().warning("security_services::process_ieee_1609_dot2_encrypted_data: Failed to decode Decrypt Ieee1609Dot2Data-Encrypted");
    return -1;
    return -1;
  }
  }
  if (result == -1) {
  if (result == -1) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -357,7 +357,7 @@ cd ${PATH_DEV_ITS}/bin/asn1
make CC=gcc -f ${PATH_DEV_ITS}/asn1/Makefile
make CC=gcc -f ${PATH_DEV_ITS}/asn1/Makefile
# Remove useless ASN.1 files
# Remove useless ASN.1 files
rm -fr ${PATH_DEV_ITS}/ttcn/LibIts/asn1/IS/ISO_TS_19091/original
rm -fr ${PATH_DEV_ITS}/ttcn/LibIts/asn1/IS/ISO_TS_19091/original
rm -f ${PATH_DEV_ITS}/ttcn/LibIts/asn1/Security/TS102921/EtsiTs102941MessagesCA.asn
rm -f ${PATH_DEV_ITS}/ttcn/LibIts/asn1/Security/TS102921/EtsiTs102941MessagesItss.asn
rm -f ${PATH_DEV_ITS}/ttcn/LibIts/asn1/Security/TS102921/MessagesItss_OptionalPrivacy.asn
rm -f ${PATH_DEV_ITS}/ttcn/LibIts/asn1/Security/TS102921/MessagesItss_OptionalPrivacy.asn
cd -
cd -
if [ ! -d ${PATH_DEV_ITS}/include/asn1 ]
if [ ! -d ${PATH_DEV_ITS}/include/asn1 ]
+7730 −0

File added.

Preview size limit exceeded, changes collapsed.

+3.8 KiB

File added.

No diff preview for this file type.

Loading