I have couple of questions about ECIES. I understand how ECIES work and what I must do if I want to have ECIES with ECDSA for authentication (I understand that for full authentication I have to have PKI, but for simplicity in these examples I will not use PKI). I can use sign-encrypt-sign (as described here ECIES with ECDSA):
ECIES(Bob's public key, M || ECDSA(Alice's static private key, M))
And in this case I have structure of message for sending:
[Alice's ephemeral public key, Alice's static public key, ciphertext, Mac's tag]
I understand that this is secure, but for example Alice do:
fetch Bob's static public key
generate ephemeral key pair
SK = ECDH(Bob's static public key, Alice's ephemeral private key)
Kenc || Kmac = KDF(SK)
Ciphertext = Encrypt(Message, Kenc)
ECDSA's tag = ECDSA(Ciphertext, Alice static private key)
HMAC's tag = MAC(Alice's static public key || Ciphertext || ECDSA's tag, Kmac)
Alice make ECDSA's tag first and after that make MAC's tag based on Alice's static public key, Ciphertext, and ECDSA's tag. Alice have structure of message:
|Alice's ephemeral public key, Alice's static public key, Ciphertext, ECDSA's tag, MAC's tag|
I think this is secure as sign-encrypt-sign, because ECDSA's tag is signed by Kmac and Eve can not just take this message, throw away Alice's ECDSA tag, sign the ciphertext with Eve's own key because after that she need to make MAC's tag and she can not, because she do not know Kmac.
Do I correct understand that this is secure as sign-encrypt-sign?
If this correct, I am not sure that MAC's tag is necessary in this scheme. Alice would do:
fetch Bob's public key
generate ephemeral key pair
SK = ECDH(Bob's public key, Alice's ephemeral private key)
Kenc || Kmac = KDF(SK)
Ciphertext = Encrypt(Message, Kenc)
ECDSA's tag = ECDSA(Alice's public key || Ciphertext || Kmac, Alice's static private key)
And Alice have structure of message for sending:
|Alice's ephemeral public key, Alice's staic public key, C, ECDSA's tag|
I think Bob can use ECDSA's tag for verifying that message was not changed and that this message was sent by Alice. Eve can not compromise the message because she have to know Kmac which is used to make correct ECDSA's tag, is not it?
Or, for example, can I use last scheme only for handshake message and after that encrypt next messages by using symmetric cipher and MAC?