Skip to content

[Feature Request]: Improve performance of encrypted packet usage #6426

Description

@jasonbcox

Platform

Cross-Platform

Description

There appears to be a fair amount of low hanging fruit that, if my understanding is correct, may dramatically improve performance of encrypted packet usage (and by extension, battery usage). Areas of interest:

  • Nodes relaying packets on encrypted channels must decrypt the entire payload. Encrypting a few bytes separately from the payload would allow relayers to check if they could decrypt the message without necessarily needing to.
  • The shared secret used for encrypted channels is recomputed for every packet. Generating an ECDH secret is typically an order of magnitude (or more!) expensive than encryption/decryption. If true, caching secrets could cut CPU/battery usage during decryption by 50% or more for small packets (< 1kb). There are some hurdles to tackle like the memory usage of such a cache, but at a glance it appears achievable.

Feel free to assign this to me. I am still exploring the codebase.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesttriagedReviewed by the team, has enough information and ready to work on now.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions