How to encrypt with elliptic curve cryptography (ECC)? I need to ask this, as I am not allowed to comment and don't quite understand an existing answer because I don't have a cryptography background and never looked into how ECC works.


Why can't you encrypt a message with a public key generated via ECC?
How can two peers Alice and Bob agree on shared secret (symmetric key), both of which having elliptic-curve-based public-private key pairs?
Could schemes be based on a plain Diffie-Helmann key exchange, where you use the other's public key as authentication (signing messages)?
Why can't you encrypt a message with a public key generated via ECC?
  


Well, for starters, you need to realize that ECC is a collective term for a number of protocols that use elliptic curves to do cryptography.  Some of these protocols (ECIES, ECElGamal) are public key encryption methods (that is, they have a public encryption key, and the private decryption key, and the public encryption key allows you to encrypt a message, but not decrypt it); with these, you most certainly can encrypt with the public key.  Of course, there are other protocols (ECDH, ECDSA, EdDSA) which do other things, and are not intended to encrypt messages.


  
  How can two peers Alice and Bob agree on shared secret (symmetric key), both of which having elliptic-curve-based public-private key pairs?
  


Actually, yes, Diffie-Hellman translates nicely to elliptic curves, that version is called ECDH, and is widely used.  ECDH works mostly like classical DH (with the minor differences being mostly the validity checking that you need to do on the public shares)


  
  Could schemes be based on a plain Diffie-Helmann key exchange, where you use the other's public key as authentication (signing messages)?
  


It doesn't make sense to use a public key as 'authentication'; to make sure that the message came from you, you need to stir in something that not everyone knows.  This could be a private signature key, or it could be a secret shared between you and the intended recipient.  If it's something everyone knows, then everyone can produce that message, and so it wouldn't actually serve as 'authentication'