1
$\begingroup$

Trying to implement a mechanism for one way transmission of encrypted string values using ECC.

  • Assume there is a fixed secret unavailable private key FPK, and public key FP for it is available to the application.
  • As user enters a value, a new private key is generated, then shared key is produced from exchanging it from FP. Resulting sharing key is different every time.
  • Symmetric encryption key DSK is derived from shared key using KDF (Scrypt or HKDF).

Possible option is to follow the ECDH hybrid scheme as described here

enter image description here

Is there any advantage of generating additional random symmetric key RK here to encrypt the value, then encrypt RK with DSK (and pay additional transmission overhead), or it is safe enough to just use DSK directly for symmetric encryption of the value?

$\endgroup$
2

2 Answers 2

1
$\begingroup$

The image you've included in your answer (which is also from the web page you've provided) is, confusingly, different to the "ECC-based hybrid encryption scheme" that is then described on that web page.

The diagram seems to be showing that a symmetric key is used to encrypt a file, and then that symmetric key is encrypted using a "user public key" and stored alongside the encrypted file.

However, what is described in text in the web page as "ECC-based hybrid encryption scheme" simply creates an ephemeral encryption key-pair, performs an ECDH exchange and then derives the symmetric encryption key from the ECDH shared-secret.

Your question is whether the latter method is safe. Yes, it is safe, and their implementation looks sound to me.

$\endgroup$
0
$\begingroup$

Encrypting data with symmetric key and then encrypting symmetric with receiver's public key provides, authentication, message confidentiality, and secret key secrecy. However, if data is directly encrypted with receiver's public key then it will not provide authentication since public key is public and any malicious party can encrypt data with public key.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.