Commit 81624a5e authored by YannGarcia's avatar YannGarcia
Browse files

Bug fixed on Encryption algorithm support

parent e7fd225d
Loading
Loading
Loading
Loading
+16 −4
Original line number Diff line number Diff line
@@ -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,12 +2242,17 @@ 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_publicEncryptionKey_ecdsaNistP256(v_enc_eccP256_curve_point)
                                                                              v_public_encryption_key
                                                                              )
                                                              )
                                                  );
@@ -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,12 +2612,17 @@ 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_publicEncryptionKey_ecdsaNistP256(v_enc_eccP256_curve_point)
                                                                              v_public_encryption_key
                                                                              )
                                                              )
                                                  );
+4 −4
Original line number Diff line number Diff line
@@ -1675,17 +1675,17 @@ module LibItsSecurity_Templates {
            publicKey        := p_publicKey
        } // End of template mw_encryptionKey
        
        template (value) BasePublicEncryptionKey m_publicEncryptionKey_ecdsaNistP256(
        template (value) BasePublicEncryptionKey m_publicEncryptionKey_eciesNistP256(
                                                                                     in template (value) EccP256CurvePoint p_eciesNistP256
        ) := { 
            eciesNistP256 := p_eciesNistP256
        } // End of template m_publicEncryptionKey_ecdsaNistP256
        } // End of template m_publicEncryptionKey_eciesNistP256
        
        template (present) BasePublicEncryptionKey mw_publicEncryptionKey_ecdsaNistP256(
        template (present) BasePublicEncryptionKey mw_publicEncryptionKey_eciesNistP256(
                                                                                        template (present) EccP256CurvePoint p_eciesNistP256 := ?
        ) := { 
            eciesNistP256 := p_eciesNistP256
        } // End of template mw_publicEncryptionKey_ecdsaNistP256
        } // End of template mw_publicEncryptionKey_eciesNistP256
        
        template (value) BasePublicEncryptionKey m_publicEncryptionKey_eciesBrainpoolP256r1(
                                                                                            in template (value) EccP256CurvePoint p_eciesBrainpoolP256r1