I'm working on a system where I need to sign some data using an ECC private key and share the data and signature over a BLE ADV packet. Since an ADV packet is limited in space, I can't use a full ECDSA signature as the output is too large. As far as I understand, you can't readily truncate an ECDSA signature as you can with AES.

As an alternative, I am considering simply encrypting the data I need to sign using the private key and provide the plaintext-ciphertext pair as a way to communicate to the public key holder that the data was generated from a trusted source (holder of private key).

I know that under other cryptographic systems, this is not advisable as is it exposes the system to a known plaintext attack. I cannot find any information as to whether elliptic curve cryptography is vulnerable to this. I have seen some authentication schemes that suggest doing something like this instead of using signatures.

Is it safe to expose both the plaintext and ciphertext data to an attacker using ECC? Is there another method of signing data with ECC private keys that could yield a smaller signature or allow for truncation of the signature? I need to limit this signature to ~16 bytes or so. I would use a smaller key size but none of the recommended curves use 64 bit signatures which makes sense.

  • $\begingroup$ Can you expect the two sides to share a key setup first? If so, you could generate a MAC value using a shared secret. I'm not sure there's a secure option for asymmetric cryptography. $\endgroup$
    – bk2204
    Jul 21, 2023 at 21:43
  • $\begingroup$ @bk2204, the idea here is to use pki so shared symmetric keys are not needed $\endgroup$ Jul 21, 2023 at 21:50

1 Answer 1


You're a bit out of luck; there's no known secure signature system with signatures only 16 bytes (the best is BLS, which can live in circa 32 bytes if you don't mind circa 100 bits of security).

As for the idea of sending the data encrypted doesn't really work either; with ECC, you can't encrypt data with the private key, and in any case ECC encryption systems add more than 16 bytes of overhead.

Now, if you could live with a symmetric system (both sides have the same key), a Message Authentication Code could easily live in 16 bytes (and can easily be trimmed down from). On the other hand, you might not be able to allow the receiver to be able to generate its own messages.

Another possibility would be send the signatures in an additional BLE ADV packet (which might contain the Merkle tree authenticating a series of data packets). This has obvious costs (the packet you receive isn't authenticated until a later packet, or the transmitter must know what packets it'll send before it sends them; and the additional packets); however it could work...

  • $\begingroup$ Learning a lot here, thanks for your help. I arrived at a solution using ECIES to derive a symmetric key. $\endgroup$ Jul 25, 2023 at 17:50

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.