0003 XAS-3d — Email Wallets for Xahau #215
Replies: 5 comments 16 replies
-
Hiya @RichardAH DKIM normally is a means to trust a server has sent an email for a domain and the signatures are done at the domain level. The public key being singular for the domain. I understand the approach your taking but im not sure how you will know "Neil" sent the email and not just the service "@neilsdomain.com" has said can send emails for my domain? I cant recall the name now but there used to be another form of secure email, i think literally just signed mail. Which encoded the body of the enail using the private key and the public key was in the email body for verification. The certs name being the email address. Or did i misunderstanding somthing :) |
Beta Was this translation helpful? Give feedback.
-
Thanks so much for drafting this, Richard, it is a really neat and convenient idea! Can you please clarify more how the Also, it seems like this could provide a rouge system administrator with a massive attack vector. Perhaps users should be warned that their email provider has the ability to submit transactions on their behalf. It seems like users should consider their email r addresses similar to their personal wallet - a place to keep some spending money, not one's entire life savings. DNS servers would provide another potential attack vector, but that's a larger issue that seems outside the scope of this. |
Beta Was this translation helpful? Give feedback.
-
Can any one host an e-mail relay and submit to the ledger, and is it open source? If anyone can host one, could they not just accept (or even just make up that an email was sent) any emails (ignoring the DKIM check) and submit like above? or do all the nodes check the e-mails content in the memo, compare it to the transaction and also perform a DKIM check to verify the e-mail? |
Beta Was this translation helpful? Give feedback.
-
Could you please supply some information how private keys of those email accounts would be managed by xahaud ? |
Beta Was this translation helpful? Give feedback.
-
nit: shouldn't the API be called |
Beta Was this translation helpful? Give feedback.
-
XAS 3d — Email Wallets for Xahau
Background
Email is one of the longest running and most widely used protocols on the Internet today. Despite this email was largely considered insecure until the advent of RFC 8301 and 8463.
DomainKeys Identified Mail (DKIM) is an add-on protocol to email that allows an email provider (like Gmail, Hotmail, et al.) to publish a public key on their domain whilst using the corresponding private key to sign your outgoing emails. This allows the recipient of the email to check that the email really did come from your provider (and therefore from you) and that it was not modified in transit.
Herein proposed is an amendment that leverages this signing as a form of transaction authentication on Xahau, eliminating the need for additional wallet software, and allowing Xahau to be used with just a modern email address.
Qualifying emails
For an email to qualify as a transaction it must contain:
From
address,From
address matches the DKIM domain,REMIT
orREKEY
as discussed below,To
email address.Address conversion
Each email address (
From
/To
) is canonicalized by removing optional comments and tags, capitalization and in some case dots, before being SHA512 hashed twice (with the inner hash prepended with0xEEEEFFFF
). The first 20 bytes of the outer hash become an AccountID with a corresponding r-address. The r-address is unique to the email-address, and is a 1-1 mapping. Existing Xahau accounts created by other means cannot be linked to emails. An email address becomes a Xahau address and is activated in the normal way by sending sufficient gas funds to it.Relaying and submission
A public relay is a daemon that listens at a specific email address for incoming qualifying emails that
cc
it. Upon receiving a qualifying email, it forwards the raw email content to a new websocket API provided by xahaud:submitEmail
.The
submitEmail
API verifies the email is a qualifying email, constructs an equivalent transaction, but does not sign it. The raw email is then placed in the firstMemo
of the transaction and a global transaction flagtfEmailSig
is set.The transaction is then circulated into consensus as per normal. If the
featureEmail
amendment is enabled then the memo will act as the signature in consensus.Should a relay fail, the recipient of the email may manually submit it for a period of up to 5 days. It is important that the email provider supplies accurate
t=
tags in their DKIM headers, to avoid replay attacks. If you do not trust your email provider, change email providers!Replay attacks
To prevent replay attacks the DKIM signature of the message is hashed and recorded against the sender's Xahau account. This hash is held for 5 days in a ledger object up to a nominal maximum number of entries. Cleanup is amortized across further submissions. Fees are adjusted according to the burden of storing this extra data. Emails older than 5 days cannot be submitted.
A transaction failure also results in an entry.
Instructions
A qualifying email contains either a
REMIT
instruction or aREKEY
instruction. The instruction must come at the beginning of a new line and the entire line must contain only the instruction and its parameters.The
REMIT
instruction follows these formats:Any variation invalidates the instruction, including trailing characters or preceding characters. The instruction is translated into a
Remit
transaction from theFrom
email address (or more specifically its corresponding r-address) to theTo
email address for the amount and currency specified.The
REKEY
instruction follows this format:Any variation invalidates the instruction, including trailing characters or preceding characters. The instruction is translated into a
SetRegularKey
transaction changing the keying of theFrom
address. TheTo
address is ignored.Conclusion
With this proposed amendment it is possible to operate a Xahau wallet for payments without using wallet software. All that is required is a DKIM-enabled email provider... which most are in 2024. A user can receive and send multiple currencies and interact with Hooks using only their email address and browser. Should a user want to upgrade to a fully functional wallet software, they can do so by setting a Regular Key using the
REKEY
instruction. This provides a simple and powerful new way for inexperienced users to benefit from, and being included in, Xahau.Beta Was this translation helpful? Give feedback.
All reactions