Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
Alex Gleason (alex@gleasonator.com)'s status on Friday, 14-Jul-2023 12:19:31 JSTAlex Gleason how to do RSA keys on the Fediverse the good way
DONT: generate an rsa keypair for every user on signup and then store the entire thing in the database. that's called BLOAT, Mastodon
DO: combine the user's id with a secret key as a seed for the RSA PRNG, create the RSA key and then cache it in a LRU cache with a max of like 1000 or so. do all this in realtime so inactive keys get evicted but can be quickly regenerated at any time.