zkemail / zk-email-verify

Verify any text in any sent or received email, cryptographically and via only trusting the sending mailserver.
https://prove.email
MIT License
325 stars 65 forks source link

Unable to generate circuit inputs for email with base64 encoded attachment #154

Open mohammed7s opened 6 months ago

mohammed7s commented 6 months ago

eml used has a base64 encoded attachment. running generate_input.ts generates this error:

Error: No public key found on DKIM verification result

Logging the result.results[0] from result = await dkimVerify(email); yields this output:

image

so the bodyHash and bodyHashExpecting are not matching so its failing here: https://github.com/zkemail/zk-email-verify/blob/5c46156301c373086e1a06715297fe45b845ebf5/packages/helpers/dist/dkim/dkim-verifier.js#L189

foolo commented 6 months ago

not sure if this applies to your issue, but i recall encountering this when my eml for some reason didn't contain a dkim signature in the header at all

Divide-By-0 commented 6 months ago

eml used has a base64 encoded attachment. running generate_input.ts generates this error:

Can you attach the eml here?

Billionaire-Developer commented 6 months ago

eml used has a base64 encoded attachment. running generate_input.ts generates this error:

Error: No public key found on DKIM verification result

Logging the result.results[0] from result = await dkimVerify(email); yields this output:

image

so the bodyHash and bodyHashExpecting are not matching so its failing here:

https://github.com/zkemail/zk-email-verify/blob/5c46156301c373086e1a06715297fe45b845ebf5/packages/helpers/dist/dkim/dkim-verifier.js#L189

Module Export: exports.DkimVerifier = void 0;

Bisht13 commented 6 months ago

Is your DNS getting resolved? While running it locally it uses your DNS entry to fetch the public keys, make sure it is set to Google DNS of 8.8.8.8/8.8.4.4.

mohammed7s commented 6 months ago

Ok it seems there is an issue with outlook emails. And the emails I am using were sent to office360. I tested with a simple hotmail account and it also fails. Any ideas why that could be the case?