Email as phone number in delta.chat

Expected behavior

I would like to hide the email address so that it looks like the phone number. There are websites and libraries that allow this like source-code johnkingzy/phone-number-generator-vuejs, website raphgen

Actual behavior

This feature does not currently exist.

Example Images

yovaha2924@sample.com081-6932372

What’s the benefit of this?

Sorry if this question is stupid :roll_eyes:

3 Likes

Hi, webratte.

What’s the benefit of this?

part 1: cases

there are 5 ways to hide an email address.

    1. through alias, example: username.aliasname@providersample.com - in this case we don’t know which address belongs to the user’s account, since the user uses an alias for this. A good example of the use of alias can be when you want to receive messages specific to a specific folder, by default gmail has this feature as well as other email providers as well.
    1. with message forwarding: you can forward a message to another mail server. that way, one email is public and another email is private. which guarantees some privacy, anonymity.
    1. through temporary email: with the temporary email you can have an email that will be deleted over time.
    1. Hash email: Today with blockchain technology, there are emails being hashed md5, sha-1 etc. You don’t know the email as the address is only known with a public key. The disadvantage of this method is that the hash is too large to process. Example: testsample@gmail.com 708e87edfad175ca85f6ef218b5ca441(md5)
    1. you could transform the email instead of an alphanumeric hash into a numeric hash, which decreases the size (the length). That’s what I’m requesting here. Example: testsample@gmail.com 081-6932372(phone-number-hash-method)
part 2: comparisons

708e87edfad175ca85f6ef218b5ca441(md5-hash-alphanumeric) vs 081-6932372(md5-hash-numeric)

part 3: final conclusions and arguments
  • As I briefly demonstrated in these 5 use cases, there are ways to ensure anonymity, security, and privacy. Delta.chat uses email to receive and send messages, as there is no phone record - it would be nice to hide the email address for anonymity, security and privacy. - with an alphanumeric hash or a numeric hash.
  • Another advantage of using a hash-number - you can rename this hash to a specific name, that way you don’t have to remember the person’s email, just their name. When we access a site on the internet, the site is associated with the ip number, this process is called dns - domain name service, it is a phone book. What I’m talking about here is associating the person’s full name with the email address, this email address is hidden through a numeric hash which in turn represents the person’s name. Let’s go to the example…
  • Yo Vaha → 081-6932372yovaha2924@sample.com - when someone adds the name Yo Vaha to her network, she is adding a hidden email with a numerical hash. The person’s name is unique and the email address is unique and the email hash is unique. What prevents spam, ensures greater privacy, control. It is close to the idea of dns(domain-name-service) and nft(non-fungible token)

DeltaChat is just an email client we don’t have servers so I don’t see:
A. how this is practical/possible
B. why you want to hide your address, why not just create an address that has no real name in it? (btw you can even use deltachat over the TOR network just fine already)
C. what’s even the thread model you want to protect against with this method?

cases 1-3 need mail server support or a central server or network which we don’t have.
let’s take case 4 and 5 for example and say we want a networked/distributed or “blockchain” solution, who is gonna take part in that network? who is gonna pay the upkeep costs of running all the nodes of that hypothetical network?

Hashing looses data, as hashes get smaller, collisions can be found more easily (two inputs that result in same hash) see Collision resistance - Wikipedia.

I still don’t see what your threat model is here, what’s anonymous about a unique hash? security against what? which privacy concept/definition do you mean?

My “Conclusion”: what is the point you are trying to make here? do you understand how email works on a technical level? am I just not seeing what you mean?

1 Like

Yes, I know.

I didn’t say create a server.

  1. I didn’t say create a server or create a blockchain network. I just gave an example of a hash feature available in email only from the blockchain-email protocol.
  2. Therefore, there would be no maintenance cost. The hash algorithm is md5 (number only). The idea would be a private network, that is, only when you know someone - you will indicate the hash of your contact. Let’s take an example, bob knows alice, bob says hello alice, this is my phone number add it to your network. Alice, as she is friends with bob, adds bob to her network with her contact number and so the two friends talk about games, movies and pop culture.

Yes, I know.

I just gave an example of email hiding using hashing.

Yes, I know.

I just gave an example of email hiding using hashing.

email addresses are needed that the email providers know where to send the email to, so hiding them behind hashes without server side changes at the provider side, seems impossible to me :confused:

email addresses are needed that the email providers know where to send the email to, so hiding them behind hashes without server side changes at the provider side, seems impossible to me :confused:

My idea is to create a method of encryption and decryption through a public and private key in md5. With the public key, you decrypt the email address for an entire network. With the private key, you only have your contacts.

I think you need to elaborate more on that, I still don’t understand your point like at all :confused: :cry:

I think It could help to have answers to the following questions:

  • why? what is the problem you want to solve?
  • how does the proposed solution solve the problem?
  • what would be the effort of implementation (just general, don’t start searching for libraries before we know that the idea is viable)?
  • who is the user stereotype/model that would appreciate the feature (normie tech noob, privacy nerd, activist, …)?
1 Like

Hi Simon.

The current problem with email is that it can be used as spam. If someone finds out your email address, they can send hundreds of messages just to advertise some product or service or just for fun or hacking.

One way to avoid this is to have a numeric hash that hides the email address, so that no one knows your email just a number associated with the email you distribute in a local network of contacts (people you know: your friends, family, boss of work, co-worker, etc.)

So… what I’m trying to avoid in this topic here is spam.

I don’t think spam is avoidable as long as people fall for these kind of scams and phishing attacks.
If there is some money to make people will always find ways to abuse any system.

Telegram, whatsapp, even sms and classical postal letters also have spam problems.

2 Likes

it seems that you don’t understand how email works, Delta Chant, as an email client, can’t hide your email address or replace it with some “phone number”, no email client can do that, because when you send an email you must provide your email address that will be shown to the receiver,

what you can do is use an alias if your provider supports it, or create another email account that you use for public interactions while keeping your mail account private for close friends, or use some dedicate service that work as an email proxy or “mask” similar to the alias address

all the solutions are external to the Delta Chat app

Hey there!

I created an algorithm that does this, I want to know everyone’s opinion here. I’m new to javascript and I’ve been using delta.chat for 2 months now, I found this topic interesting and wanted to help.

my reasons

I think this feature is important because it will turn delta.chat into something more like chat. Generally, when we open the app we have to enter the email address and some email settings to receive and send messages. Instead of typing the email, you just type the number and the system can automatically configure any setting.

Another reason for this feature would be the purpose of disclosing contact emails, without the contact emails appearing as contact emails, but on the contrary as phone numbers.

Another advantage of the algorithm if there is interest, could implement the generation of phone numbers randomly based on the ascii table, unicode, alphabet or common order and randomness as well. It would be possible to have different types of mailPhone number, different patterns if the mailPhone pattern were adopted.

algorithm.js
// check if email is valid(return value) or if "false" without value
// console.log(testMail('abc@abc.com'));
function testMail(string_mail) {
  const re = /\S+@\S+\.\S+/;
  if(re.test(string_mail)){
     return true; // return with value
   }
  else {
    return ''; // return without value, false, '';
  }
}

// Write a function that accepts an array of 10 integers (between 0 and 9), that returns a string of those numbers in the form of a phone number.
// example: generatePhoneNumber([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) // => returns "(123) 456-7890"
function generatePhoneNumber(numbers){
  // patterns: '+979 (8) 996-4-979' or '+97 (98) 9964-9798 9946-9911 110' for 'a (b) c@ .com' etc 
  let format = "(xx-xx-xx)-xx-(xx-xx-xx)-xx-(xx-xxx-xxx)"; //"+xx (xx) xxxx-xxxxxx-xxxxxxxxxx"; // a b c @ab c.def -> +123 (0) 123-0-456 -> abc(@)-.-def
  for(let i = 0; i < numbers.length; i++){
    format = format.replace('x', numbers[i]);
  }
  return format;
}

function getCharCodes(s){
    let charCodeArr = [];
    for(let i = 0; i < s.length; i++){
        let code = s.charCodeAt(i);
        charCodeArr.push(code);
    }
    let strx = charCodeArr.toString();
    let withoutCommas = strx.replace(/,/g, '');
    return generatePhoneNumber(withoutCommas); // 👉️ '12345.67' // generatePhoneNumber(charCodeArr.toString());
} 

function encodeMailPhone(string_mail){ // 'abc@abc.com' in string_mail
  if(testMail(string_mail)){
    console.log('encode abc@abc.com to :', getCharCodes(string_mail)); //console.log(text); //or text.join();
 } 
  else {
    return ''; // return without value, false, '';
  }
} 

function decodeMailPhone(string){ // string, "(97-98-99)-64-(97-98-99)-46-(99-111-109)"; 
   let stringEmail = string.replace('(', '').replace(')', '').replace('(', '').replace(')', '').replace('(', '').replace(')','').replace('-', ' ').replace('-', ' ').replace('-', ' ').replace('-', ' ').replace('-', ' ').replace('-', ' ').replace('-', ' ').replace('-', ' ').replace('-', ' ').replace('-', ' ');
   let array = stringEmail.split(" ");
   console.log('decode (97-98-99)-64-(97-98-99)-46-(99-111-109) to:', String.fromCharCode(...array)); // String.fromCharCode(72, 69, 76, 76, 79); or characters

}

encodeMailPhone('abc@abc.com');//=>  abc@abc.com => 97 98 99 64 97 98 99 46 99 111 109 => (97-98-99)-64-(97-98-99)-46-(99-111-109)
decodeMailPhone("(97-98-99)-64-(97-98-99)-46-(99-111-109)"); //output: (97-98-99)-64-(97-98-99)-46-(99-111-109) => 97 98 99 64 97 98 99 46 99 111 109 => abc@abc.com

The algorithm validates the email address, after this validation process, the algorithm takes the email address and transforms it into an ascii sequence, this ascii sequence has a positional criterion, so it is the same written form of the email, but kept only with numerical characters represented by the position of the character in the ascii table. There is another way to transform an email address into a phone number, which could be the same way of querying the ascii table to the unicode table or the alphanumeric table that can have a common or random ordering. Please see my code on pastebin pastebin/raw/f3zQ9VTe

sample.html
<!DOCTYPE html>
<html>
<head>
<title>Sample mailPhone and Qrcode</title>
<!---  delta-chat, qrcode, mailPhone  --->
<script src="https://github.com/davidshimjs/qrcodejs.js"/></script>
</head>
<body>
<div id="qrcode"></div>
<script type="text/javascript">
var qrcode = new QRCode(document.getElementById("qrcode"), {
	text: 'abc@abc.com', // or: 'sample@domain.com' // or: ' (97-98-99)-64-(97-98-99)-46-(99-111-109) '
	width: 128,
	height: 128,
	colorDark : "#000000",
	colorLight : "#ffffff",
	correctLevel : QRCode.CorrectLevel.H
});
</script>
</body>
</html>

As we can see in this html file, we have a js library to create a qrcode from mail or mailPhone. The advantage of this resource I observe today that it can be used to disclose the number by qrcode. That way, when the person reads the qrcode, he then has access to the number, adding the cell phone number, it is possible that this number is saved in his main contact book or in the cloud.

ui/ux

As we can see in this conceptual image, we can have several contact numbers that are ways of representing the email. You can save email numbers within your contact book locally or in the cloud. The advantage of this contact number being saved in your calendar or cloud is that there is no way to know if the number is an email or not, which guarantees certain anonymity of the contacts you have by email, but they are seen as cell phone numbers. Please see this code here

Safety

If there is any leak of information, data or spam to any mailPhone, you can delete the mailPhone contact, and you will not receive that message anymore. From the user’s point of view, it is easier to delete the contact number or block a contact number than by email.

Another interesting idea, is to think that mailPhone is something similar to the tor project, you can redirect a list of mailPhone to different people and routes too, so that you don’t know the origin of the email sent or received. Not even the email header. This usually ensures or prevents spam, trojans, phishing, and other types of email attacks. Either you have an unalterable mailPhone with a changeable username, or you have a changeable mailPhone (which changes) with an unchangeable username. So It might be interesting for you to have a public mailPhone and a private mailPhone. So the private mailPhone(only a list of private contacts you trust, can be accessed by your mailPhone). And even if those contacts share your mailPhone without having that you know that, you can block or delete some of those contacts who shared your mailPhone. You can delete the number associated with mailPhone or the email associated with MailPhone. But just like you can use the public mailPhone, where you configure routes or which contacts are available.

Today there are linux smartphones, in theory you could set up a hardware key built into these linux devices so that only those devices communicate with each other. That is, if there is any external communication, this is routed to other devices outside the network to prevent some external attack on an internal network, which these two devices are communicating with the mailPhone.

License

The algorithm license is under Mit, but can be changed if there is interest in delta.chat

Another reason for this feature would be that you can generate an email invitation link for a person.

let linkEmailDeltaChat= new URL('/email_phone/(97-98-99)-64-(97-98-99)-46-(99-111-109)', 'https://delta.chat');
console.log(linkEmailDeltaChat); // url: https://delta.chat/email_phone/979899649798994699111109

You don’t need a big hash for mail addresses, something common in things like Blockchain-email. The mailPhone size can be defined by the email size(address) itself.

The solution is not external to the application. It’s possible in theory to create local, temporary aliases without relying on some external service.

Useless feature. The main idea is chat over email and you want to add another number/nickname. Why? Antispam? To look like other chat clients? Or it is “end in itself”. Register new address dedicated to chat and use it only for this. How you are using email - maybe you recommend Google to add phone number feature and other email you at phone number?

Hi ta.bg, thank u for comment.

My idea was to solve the problem of this topic, I thought of a way to transform the email into a mobile number format.

  • Because it’s a way to create local and temporary aliases.
  • And because turning the email into a cell phone number would make delta.chat look like a real chat.
  • Also, with the feature, I can share group links with more than one person.
  • You can generate several numerical representations of email to prevent anyone from knowing your email.

Please read this: “The algorithm validates the email address, after this validation process, the algorithm takes the email address and transforms it into an ascii sequence, this ascii sequence has a positional criterion, so it is the same written form of the email, but kept only with numerical characters represented by the position of the character in the ascii table.”

my idea
char char from ascii email “email_format_phone” or “mailPhone”
a 97 abc@abc.com 97 98 99 64 97 98 99 46 99 111 109
b 98 - -
c 99 - -
@ 64 - -
a 97 - -
b 97 - -
c 97 - -
. 46 - -
c 99 - -
o 111 - -
m 109 - -

Yes, “to look like other chat clients”.

So 97 98 99 64 97 98 99 46 99 111 109 is "a", "b", "c", "@", ".", "c", "o", "m" or abc@abc.com

What I’m talking about here is exactly that, what I changed was the email format so it looked like a mobile number. So “end in itself”, the purpose is still email, what changes is the format…

What do you think about this?(Wdytat)? I want to hear your criticism, your feedback now. This is very important to check if this feature is good or not.

When such “trick” become widely used then spammers will automate collection of emails-encoded-like-phone-numbers and will continue their work.

Hi ta.bg.

So, there are 8 ways to solve this problem.

Plese read this:

  1. If there is any leak of information, data or spam to any mailPhone, you can delete the mailPhone contact, and you will not receive that message anymore. From the user’s point of view, it is easier to delete the contact number or block a contact number than by email.
  2. Today there are linux smartphones, in theory you could set up a hardware key built into these linux devices so that only those devices communicate with each other. That is, if there is any external communication, this is routed to other devices outside the network to prevent some external attack on an internal network, which these two devices are communicating with the mailPhone.
  3. You don’t know whether the maiPhone represents a mobile number or email. One would have to try to find that out, that process would be very time consuming.
  4. It is possible to use deltachat over the TOR network. As this is possible, we can generate random mailPhone numbers at each connection or on the tor network to guarantee greater security, privacy, anonymity.
  5. It is possible to avoid spam because the email provider already does this, emails like google, limit up to 500 emails per day.
  6. Furthermore, it is possible to restrict mailPhones through masks. These masks are the emailPhone format that can be restricted.
  7. It is possible to create a minimal cdn server with sending and answer format in rest where spam numbers are publicly listed, distributed, so that the system is updated in real time, and these numbers are excluded, blocked.
  8. Usually in the email you have a contact list of close friends, so there would be no spam I don’t think from those contacts.

Hey there.

I would like to comment on a few things in the part I talked about security with mailPhone.

This security part would be interesting to use mailPhone on clients. Applications like delta.chat can benefit, and other applications where the user manages his own data can also benefit from this here.

This security part would be interesting to use mailPhone on servers or instances (self-hosted). This can be done, but it doesn’t need to be implemented.

This security part would be interesting to use mailPhone on clients(self-hosteds), Applications like delta.chat can benefit, and other applications where the user manages his own data can also benefit from this here too.

Note
the only problem I see is that as there is no way to know which email is, there may be a server that records email messages permanently, which can make using the emailPhone bad. But this can be resolved using the official delta.chat app or use known temporary email providers or known email providers. This could avoid this issue here.

I developed an even more complex algorithm that has huge positional variation. I call this encrypted problem the “representational problem” or the “positional problem” or the “number representation problem” or the “no knowledge problem” or the “zigzag problem”. I haven’t come up with a technical name for it yet. But in general, the problem is figuring out which string is used to represent the mail characters.

Below you will see that there is a series of positional encodings and decodings. The algorithm is complex and very long in lines, I won’t post it because the text is big.

 // encodeMailPhone
 encodeMailPhone('',positionCommonHistoricalEncryptionChangeLetter)
 encodeMailPhone('',positionCommonTOTP)
 encodeMailPhone('',positionCommonASCIItable)
 encodeMailPhone('',positionCommonBase64table)
 encodeMailPhone('',positionCommonAlphanumerictable) 
 encodeMailPhone('',positionCommonUnicodetable)
 encodeMailPhone('',positionCommonCesartable)
 encodeMailPhone('',positionRandomChartable)
 encodeMailPhone('',positionRandomHistoricalEncryptionChangeLetter)
 encodeMailPhone('',positionCommonMD5Hashtable)
 encodeMailPhone('',positionCommonSHAHashtable)
 encodeMailPhone('',positionRandomASCIItable)
 encodeMailPhone('',positionRandomBase64table)
 encodeMailPhone('',positionRandomAlphanumerictable)
 encodeMailPhone('',positionRandomUnicodetable)
 encodeMailPhone('',positionRandomCesartable)
 encodeMailPhone('',positionCommonBinary)
 encodeMailPhone('',positionRandomBinary)
 encodeMailPhone('', positionCommonROT13)
 encodeMailPhone('', positionCommonAtbash)
 encodeMailPhone('', positionCommonBacon)
 encodeMailPhone('', positionCommonTransposition)
 encodeMailPhone('', positionCommonRandom)
 encodeMailPhone('', positionCommonOrder)
 encodeMailPhone('', positionCommonSort)
 encodeMailPhone('', positionCommonStreamDice)
 encodeMailPhone('', positionCommonMultiPosition)
 encodeMailPhone('', positionCommonMultiAlgoritms) 
 encodeMailPhone('', positionRandomROT13)
 encodeMailPhone('', positionRandomAtbash)
 encodeMailPhone('', positionRandomBacon)
 encodeMailPhone('', positionRandomTransposition)
 encodeMailPhone('', positionRandom)
 encodeMailPhone('', positionRandomOrder)
 encodeMailPhone('', positionRandomSort)
 encodeMailPhone('', positionRandomStreamDice)
 encodeMailPhone('', positionRandomMultiPosition)
 encodeMailPhone('', positionRandomMultiAlgoritms) 
 // decodeMailPhone
 decodeMailPhone('',positionCommonHistoricalEncryptionChangeLetter)
 decodeMailPhone('',positionCommonTOTP)
 decodeMailPhone('',positionCommonASCIItable)
 decodeMailPhone('',positionCommonBase64table)
 decodeMailPhone('',positionCommonAlphanumerictable) 
 decodeMailPhone('',positionCommonUnicodetable)
 decodeMailPhone('',positionCommonCesartable)
 decodeMailPhone('',positionRandomChartable)
 decodeMailPhone('',positionRandomHistoricalEncryptionChangeLetter)
 decodeMailPhone('',positionCommonMD5Hashtable)
 decodeMailPhone('',positionCommonSHAHashtable)
 decodeMailPhone('',positionRandomASCIItable)
 decodeMailPhone('',positionRandomBase64table)
 decodeMailPhone('',positionRandomAlphanumerictable)
 decodeMailPhone('',positionRandomUnicodetable)
 decodeMailPhone('',positionRandomCesartable)
 decodeMailPhone('',positionCommonBinary)
 decodeMailPhone('',positionRandomBinary)
 decodeMailPhone('', positionCommonROT13)
 decodeMailPhone('', positionCommonAtbash)
 decodeMailPhone('', positionCommonBacon)
 decodeMailPhone('', positionCommonTransposition)
 decodeMailPhone('', positionCommonRandom)
 decodeMailPhone('', positionCommonOrder)
 decodeMailPhone('', positionCommonSort)
 decodeMailPhone('', positionCommonStreamDice)
 decodeMailPhone('', positionCommonMultiPosition)
 decodeMailPhone('', positionCommonMultiAlgoritms) 
 decodeMailPhone('', positionRandomROT13)
 decodeMailPhone('', positionRandomAtbash)
 decodeMailPhone('', positionRandomBacon)
 decodeMailPhone('', positionRandomTransposition)
 decodeMailPhone('', positionRandom)
 decodeMailPhone('', positionRandomOrder)
 decodeMailPhone('', positionRandomSort)
 decodeMailPhone('', positionRandomStreamDice)
 decodeMailPhone('', positionRandomMultiPosition)
 decodeMailPhone('', positionRandomMultiAlgoritms)

I can use tables with common positions, random positions, varied positions or disordered positions. Each of these positions has a series of particular algorithms that may or may not work together. As you receive and send messages, the mailPhone may or may not change. That’s because you can configure the mailPhone randomly or not.

I would like to list a number of good reasons for mailPhone:

  1. It is not necessary a central server to validate mailPhone, this can be done by delta.chat itself.
  2. Random numbers are generated at each connection or on the tor network (delta.chat already works on the tor network).
  3. It has no cost or maintenance, although it is similar to the idea of hashing email that is common in blockchain implementation for email. You don’t need a big hash for mail addresses, something common in things like Blockchain-email. The mailPhone size can be defined by the email size(address) itself.
  4. Avoid spam(because it is not necessary or possible to know the recipient’s email).
  5. Turning the email into a cell phone number would make delta.chat look like a real chat. Generally, when we open the app we have to enter the email address and some email settings to receive and send messages. Instead of typing the email, you just type the number and the system can automatically configure any setting.
  6. I can share group links with more than one person.
  7. You can generate several numerical representations of email to prevent anyone from knowing your email.
  8. The solution is not external to the application. It’s possible in theory to create local, temporary aliases without relying on some external service.
  9. Disclosing contact emails, without the contact emails appearing as contact emails, but on the contrary as phone numbers.
  10. If there is interest, could implement the generation of phone numbers randomly based on the ascii table, unicode, alphabet or common order and randomness as well. It would be possible to have different types of mailPhone number, different patterns if the mailPhone pattern were adopted.
  11. With mailphone you have an alias without having a provider that supports it. You don’t need to create another email account for public interactions and a private account for close friends or use a dedicated service that works as a media proxy or mask similar to the alias address, or message forward.
  12. avoid censure.

I am not sure if I understand well but this sounds like a really bad idea, encoding the email as numbers doesn’t give any kind of protection, just give the user a false sense of protection while their email addresses are still being leaked, this is something that affects only how emails are displayed inside Delta Chat, if the peer is using other email clients they can see your email address, also showing weird long numbers only makes the app more confusing to the user

to effectively protect your address just create an email alias if your provider support them, then share that address, that btw, could probably be something like 55555555@example.com if you like phone numbers that bad :smiley: