2

I am looking for asymmetric encryption using SECP256K1. But all over the internet, I see that it also requires AES encryption. Instead of generating an AES secret key, is it possible to encrypt using the public key alone?

Conrado
  • 6,414
  • 1
  • 29
  • 44
  • Yes, check this out and go further yourself. https://en.wikipedia.org/wiki/Integrated_Encryption_Scheme – Bao HQ Aug 02 '19 at 09:32

1 Answers1

3

You can encrypt with secp256k1 (or any elliptic curve) by using ECIES (Elliptc Curve Integrated Encryption Scheme). However, inside ECIES a symmetric key is generated and the message is encrypted using it.

This is in contrast with RSA, which can encrypt data directly; though most of the time it is also used to encrypt a symmetric key and then encrypt data with that key.

If you really want to avoid AES, then you can use the secret derived inside ECIES and simply XOR with your message. Check the SEC 1 standard, section 5.1.3.

Conrado
  • 6,414
  • 1
  • 29
  • 44
  • yah. @conrado. That is my issue. Where as in some of the white paper, I can find point doubling and point multiplication, Can't we do that with SECP256K1 – Naveen Kumar Aug 01 '19 at 12:58
  • 1
    I interpreted the question to be asking if one can use ECC "directly" to encrypt values akin to what could be done with RSA, rather than using it to agree on keys and using those keys with a symmetric cipher. My interpretation could be in error, however. – Ella Rose Aug 01 '19 at 15:58
  • @NaveenKumar can you clarify your question? Which white paper? Can't to what with secp256k1? – Conrado Aug 01 '19 at 16:04
  • @EllaRose. Yes. You got my question. – Naveen Kumar Aug 02 '19 at 05:58
  • @NaveenKumar I've expanded the answer – Conrado Aug 02 '19 at 11:32