O
O
OpenId3 Docs
Search
K

Email Engine

Main Idea

We also rewrote the SMTP protocol so it allows DApps to send emails and SMS messages to authenticated users while keeping the email addresses and phone numbers private. This functionality enables the communication between DApps and traditional users that has never been seen before.

Infrastructure Flow

How does it work?

A user can register his email and Web3 address inside the DAuth enclave. Once users are authenticated, the protocols or DApps can use the service by sending a request to DAuth to send an email to the user with only knowing his Web3 address.
This anonymous mechanism is based on the reconstruction of the SMTP protocol. SMTP allows proxy servers to send emails to a given email address. When the DAuth node gets an email request, the enclave will translate the web3 address to the user's email accordingly, and the enclave will establish an SMTP channel with the email service provider. The key point is that the channel will be encrypted with a TLS handshake between the DAuth Enclave and the email service provider, which will keep the user's email address invisible to the DAuth node.

The Example Flow of an Anonymous SMTP Request

$telnet smtpdm.email-service-provider.com 25
S:220 email-service-provider.com MX Mail
Server(127.0.0.1)
[TLS-handshake]
Orcas encalve key generation
Key exchagne with email service provider
C:HELLO dauth-verifier.com
S:250-smtp.email-service-provider.com
S:250-8BITMIME
S:250-AUTH=PLAIN LOGIN XALIOAUTH
S:250-AUTH PLAIN LOGIN XALIOAUTH
S:250-PIPELINING S:250 DSN
C:AUTH LOGIN S:334 dXNlcm5hbWU6
C:YSoqKkBleGFtcGxlLm5ldA== //the base64 code of email address
S:334 UGFzc3dvcmQ6 C:eHBxdA== // the base64 of the secret
S:235 Authentication successful
C:MAIL FROM: [email protected] S:250 Mail Ok
C:RCPT TO: [email protected]
S:250 Rcpt Ok
C:DATA
S:354 End data with .
C:subject: test
C:from: < [email protected] >
S:Data Ok: queued as freedom ###envid=148316944
C:QUIT