TheDiscordian / disco-chat

A peer-to-peer messaging app.
MIT License
22 stars 2 forks source link

Don't regen the shared secret every message #30

Open TheDiscordian opened 1 year ago

TheDiscordian commented 1 year ago

Currently on encrypted message send/receive the shared secret is regenerated every single time. This is the heaviest crypto operation happening, and for specific users, produces the same result every time. It'd make more sense to cache these keys in memory upon generation, and grab them from there as needed.