Loading ccsrc/Protocols/Security/security_ecc.cc +2 −2 Original line number Diff line number Diff line Loading @@ -394,7 +394,7 @@ int security_ecc::generate_and_derive_ephemeral_key(const encryption_algotithm p // Derive the shared secret key const int k_enc = nonce_length + sym_key_length + tag_length; const int k_mac = k_length + k_length; OCTETSTRING digest(k_enc + k_mac, 0x00); OCTETSTRING digest = int2oct(0, k_enc + k_mac); loggers::get_instance().log("security_ecc::generate_and_derive_ephemeral_key (1): k_enc size:%d - k_mac size: %d - digest size:%d: ", k_enc, k_mac, digest.lengthof()); if (PKCS5_PBKDF2_HMAC((const char*)static_cast<const unsigned char*>(_secret_key), _secret_key.lengthof(), nullptr, 0, 2000, EVP_sha256(), digest.lengthof(), (unsigned char*)static_cast<const unsigned char*>(digest)) != 1) { loggers::get_instance().warning("security_ecc::generate_and_derive_ephemeral_key: Failed to derive shared secret key"); Loading Loading @@ -484,7 +484,7 @@ int security_ecc::generate_and_derive_ephemeral_key(const encryption_algotithm p // Derive the shared secret key const int k_enc = nonce_length + sym_key_length + tag_length; const int k_mac = k_length + k_length; OCTETSTRING digest(k_enc + k_mac, 0x00); OCTETSTRING digest = int2oct(0, k_enc + k_mac); loggers::get_instance().log("security_ecc::generate_and_derive_ephemeral_key (2): k_enc size:%d - k_mac size: %d - digest size:%d: ", k_enc, k_mac, digest.lengthof()); if (PKCS5_PBKDF2_HMAC((const char*)static_cast<const unsigned char*>(_secret_key), _secret_key.lengthof(), nullptr, 0, 2000, EVP_sha256(), digest.lengthof(), (unsigned char*)static_cast<const unsigned char*>(digest)) != 1) { loggers::get_instance().warning("security_ecc::generate_and_derive_ephemeral_key: Failed to derive shared secret key"); Loading Loading
ccsrc/Protocols/Security/security_ecc.cc +2 −2 Original line number Diff line number Diff line Loading @@ -394,7 +394,7 @@ int security_ecc::generate_and_derive_ephemeral_key(const encryption_algotithm p // Derive the shared secret key const int k_enc = nonce_length + sym_key_length + tag_length; const int k_mac = k_length + k_length; OCTETSTRING digest(k_enc + k_mac, 0x00); OCTETSTRING digest = int2oct(0, k_enc + k_mac); loggers::get_instance().log("security_ecc::generate_and_derive_ephemeral_key (1): k_enc size:%d - k_mac size: %d - digest size:%d: ", k_enc, k_mac, digest.lengthof()); if (PKCS5_PBKDF2_HMAC((const char*)static_cast<const unsigned char*>(_secret_key), _secret_key.lengthof(), nullptr, 0, 2000, EVP_sha256(), digest.lengthof(), (unsigned char*)static_cast<const unsigned char*>(digest)) != 1) { loggers::get_instance().warning("security_ecc::generate_and_derive_ephemeral_key: Failed to derive shared secret key"); Loading Loading @@ -484,7 +484,7 @@ int security_ecc::generate_and_derive_ephemeral_key(const encryption_algotithm p // Derive the shared secret key const int k_enc = nonce_length + sym_key_length + tag_length; const int k_mac = k_length + k_length; OCTETSTRING digest(k_enc + k_mac, 0x00); OCTETSTRING digest = int2oct(0, k_enc + k_mac); loggers::get_instance().log("security_ecc::generate_and_derive_ephemeral_key (2): k_enc size:%d - k_mac size: %d - digest size:%d: ", k_enc, k_mac, digest.lengthof()); if (PKCS5_PBKDF2_HMAC((const char*)static_cast<const unsigned char*>(_secret_key), _secret_key.lengthof(), nullptr, 0, 2000, EVP_sha256(), digest.lengthof(), (unsigned char*)static_cast<const unsigned char*>(digest)) != 1) { loggers::get_instance().warning("security_ecc::generate_and_derive_ephemeral_key: Failed to derive shared secret key"); Loading