Store email hashes and signatures in db and run GCD public key finder for missing keys
Closed this issue · 1 comments
foolo commented
Created new issue from "Part A" here: #70 (comment)
Most of this is already done, so this issue is mostly for better overview.
Steps needed:
- (Done: 350e709 ) Create a new database table "EmailSignatures", with columns: Domain, Selector, HeaderHash, DkimSignature. (Edit: also need a Timestamp column, as per feedback below)
- Implement/find a tool for canonicalization of email headers during upload. Maybe we have code for this in some of the other zkemail projects. (done, using 3rd party lib for now, but see #93 )
- (Done: 350e709 ) When a user uploads an email via
/upload_gmail
: Canonicalize header fields and calculate hash. Put the hash in EmailMessages table. - (Done: foolo/sigs2rsa@3c1574b ) A small modification of the current GCD solver (https://github.com/foolo/sigs2rsa/blob/main/sigs2rsa.py) to simply use those hash signatures instead of calculating them from plaintext.
- (Done: 350e709 ) Update the privacy policy with new info about data usage. (Do we need a re-verification with Google for that?)
- (Done: 06aba0b ) (If we choose to implement only part A: Create a script that runs the GCD solver for new records in EmailSignatures table, and adds any new keys to the db.)
foolo commented
done, see references in 1st comment