🔧 How the @@ Protocol Works
The DAE @@ protocol allows sending DAE emails securely using RSA asymmetric cryptography. The process is transparent for both ends.
See How It Works
▼Watch this video to learn how to send and receive DAE emails with the @@ protocol.
Browser Encryption - Maximum Security
▼Your data never leaves your device unencrypted.
- 100% client-side encryption: We use cryptographic JavaScript libraries that run directly in your browser
- Transparent code: You can inspect and audit the JavaScript code that performs encryption
- No trusted server: Not even DAE servers can see your messages before encryption
- Complete peace of mind: Your files are encrypted locally on your computer before uploading anything to the internet
📤 For the Sender
Compose the Email
▼Write your email normally, including attachments if desired. The system will handle the entire encryption process automatically.
RSA Encryption in your Browser 🔒
▼100% client-side encryption: The system uses JavaScript cryptographic libraries running directly in your browser to encrypt ALL content (text + files) into a single file using the recipient's RSA public key.
This ensures your data never leaves your device unprotected, and not even DAE servers can see your original message.
Split into eHead and eBody
▼The encrypted file is divided into two parts:
eHead: First 50 KB of the encrypted file
eBody: The rest of the encrypted file
Send via Ordinary Email
▼The eHead is attached in an ordinary email sent to the recipient. Along with it, a unique URL is included from where they can download the eBody.
Secure Storage
▼The eBody is stored on DAE servers, protected and available only for download using the unique token sent to the recipient.
📥 For the Recipient
Receive the Email
▼The recipient receives an ordinary email with:
- An attached eHead file
- A URL to download the eBody
Download the eBody
▼Access the provided URL (format: download.php?token=XXXXXXXXXX) and download the corresponding eBody file.
Join eHead and eBody
▼Place both files (eHead and eBody) in the same folder on your computer. The system will recognize them automatically.
Decrypt with Private Key
▼Use your RSA private key to decrypt the combined file. Only you have access to this key, guaranteeing confidentiality.
Get the Original Message
▼The system recovers the complete original message: text + attachments. Now you can incorporate it into your regular email client.
Security Note
▼🔐 Información sobre Claves Criptográficas
Clave Pública
▼- Se comparte abiertamente con todos
- Los remitentes la usan para encriptar mensajes para ti
- Se puede publicar sin riesgo
- Se almacena en la base de datos del sistema
Clave Privada
▼- Solo tú la debes tener
- La usas para desencriptar mensajes recibidos
- NUNCA la compartas con nadie
- NUNCA la subas a internet o la envíes por email
- Si la pierdes, nadie puede recuperar tus mensajes
Seguridad
▼- Genera nuevas claves periódicamente (recomendado: cada 6 meses)
- Guarda tu clave privada en un dispositivo seguro
- Considera usar una contraseña para proteger tu clave privada
- Haz copias de seguridad de tu clave privada en lugares seguros
🔍 API Pública de Consulta de Clave Pública
Documentación del Endpoint
▼
Integración con Terceras Aplicaciones:
Documentación de la API REST para que aplicaciones terceras puedan consultar claves públicas de usuarios DAE.
🔑 Obtén tu API Key
Paso 1: Inicia sesión en tu cuenta de DAE.
Paso 2: Ve a Mi Perfil.
Paso 3: En la sección "🔐 API Key para Terceras Apps", haz clic en "Generar API Key".
Paso 4: Copia tu API Key y guárdala de forma segura. Nunca la compartas.
📚 Endpoint de Consulta
GET /api_lookup.php
🔐 Métodos de Autenticación
La API acepta dos métodos de autenticación:
Método 1: API Key (Recomendado para aplicaciones de terceros)
Usa tu email y API Key para autenticarte.
- Vía Query String:
?email=tu@@email.com&api_key=tu_api_key - Vía Headers HTTP:
X-DAE-Email: tu@@email.comyX-API-Key: tu_api_key
Método 2: Sesión (Solo para uso desde el sitio web)
Requiere estar logueado en el sitio web de DAE.
- Usa cookies de sesión automáticamente
- No recomendado para aplicaciones de terceros
Parámetros de Query String:
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
email |
string | Sí* | Email del usuario @@ a consultar (ej: usuario@@dominio.com) |
api_key |
string | Sí** | Tu API Key de DAE (para autenticación sin sesión) |
* Requerido: Email a consultar
** Requerido solo si no usas sesión web
Headers HTTP Alternativos (para API Key):
X-DAE-Email: tu@@email.com X-API-Key: dae_123_abc123def456...
Respuesta Exitosa (200 OK):
{
"status": "success",
"user": {
"id": 123,
"email": "usuario@dominio.com",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA...\n-----END PUBLIC KEY-----",
"registered": "2026-01-28 10:30:00"
},
"cost": {
"tokens": 1,
"remaining": 9
},
"auth_method": "api_key"
}
Errores Comunes:
| Código HTTP | Error |
|---|---|
401 |
No autenticado (falta sesión válida o API Key incorrecta) |
401 |
Email no coincide con el de la API Key |
200 |
Usuario no encontrado / inactivo |
429 |
Límite de consultas excedido |
200 |
Tokens insuficientes |
📝 Ejemplos de Uso
Método 1: cURL con API Key (Recomendado)
# Método 1A: Via Query String curl -X GET "https://doubleat.email/api_lookup.php?email=destino@@dominio.com&api_key=dae_123_abc123def456..." \ -H "Content-Type: application/json" # Método 1B: Via Headers HTTP (más seguro) curl -X GET "https://doubleat.email/api_lookup.php?email=destino@@dominio.com" \ -H "X-DAE-Email: tu@@dominio.com" \ -H "X-API-Key: dae_123_abc123def456..." \ -H "Content-Type: application/json"
Método 2: JavaScript con API Key
// Ejemplo con API Key (recomendado para terceras apps)
const email = 'destino@@dominio.com';
const apiKey = 'dae_123_abc123def456...';
// Método 1: Query String
fetch(`https://doubleat.email/api_lookup.php?email=${encodeURIComponent(email)}&api_key=${apiKey}`)
.then(response => response.json())
.then(data => {
if (data.status === 'success') {
console.log('Clave pública:', data.user.public_key);
console.log('Tokens usados:', data.cost.tokens);
console.log('Tokens restantes:', data.cost.remaining);
} else {
console.error('Error:', data.message);
}
});
// Método 2: Headers HTTP (más seguro)
fetch('https://doubleat.email/api_lookup.php?email=' + encodeURIComponent(email), {
headers: {
'X-DAE-Email': 'tu@@dominio.com',
'X-API-Key': apiKey
}
})
.then(response => response.json())
.then(data => {
// Manejar respuesta igual que arriba
});
Método 3: Python con API Key
import requests
# Configuración
api_key = 'dae_123_abc123def456...'
your_email = 'tu@@dominio.com'
target_email = 'destino@@dominio.com'
# Método 1: Query String
url = f'https://doubleat.email/api_lookup.php?email={target_email}&api_key={api_key}'
response = requests.get(url)
data = response.json()
# Método 2: Headers HTTP
headers = {
'X-DAE-Email': your_email,
'X-API-Key': api_key
}
url = f'https://doubleat.email/api_lookup.php?email={target_email}'
response = requests.get(url, headers=headers)
data = response.json()
if data['status'] == 'success':
print(f"Clave pública: {data['user']['public_key']}")
print(f"Tokens usados: {data['cost']['tokens']}")
print(f"Tokens restantes: {data['cost']['remaining']}")
else:
print(f"Error: {data['message']}")
Método 4: Desde el sitio web (requiere login)
Nota: Este método solo funciona si estás logueado en doubleat.email. No es útil para aplicaciones de terceros.
// Solo desde el sitio web DAE (requiere estar logueado)
fetch('https://doubleat.email/api_lookup.php?email=destino@@dominio.com', {
credentials: 'include' // Incluye cookies de sesión automáticamente
})
.then(response => response.json())
.then(data => {
if (data.status === 'success') {
console.log('Clave pública:', data.user.public_key);
console.log('Tokens usados:', data.cost.tokens);
} else {
console.error('Error:', data.message);
}
});
Limites y Costos:
- Costo: 1 token por consulta
- Límite: 10 consultas por minuto
- Autenticación: Requiere sesión activa (cookie PHPSESSID)
- Rate Limiting: Basado en IP y usuario
💡 Nota para Desarrolladores:
Email format: Al hacer consultas, convierte automáticamente el formato @@ a @ para la búsqueda en base de datos. Tu aplicación puede enviar emails en cualquiera de los dos formatos.