@purecore/one-jwt-4-all 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +87 -0
- package/LICENSE-COGFULNESS +117 -0
- package/examples/MTLS_AGENTS.md +288 -0
- package/examples/SELF_HEALING_AGENTS.md +269 -0
- package/examples/SIGNAL_E2EE.md +457 -0
- package/examples/mtls-agents.ts +539 -0
- package/examples/self-healing-agents.ts +355 -0
- package/examples/signal-e2ee-agents.ts +827 -0
- package/package.json +20 -0
- package/readme.md +507 -0
- package/reports/22-12-2024_01-50.md +165 -0
- package/src/examples.mcps.ts +86 -0
- package/src/examples.ts +81 -0
- package/src/index.ts +286 -0
- package/tsconfig.json +24 -0
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
# Signal Protocol End-to-End Encryption para Agentes
|
|
2
|
+
|
|
3
|
+
## Sumário
|
|
4
|
+
|
|
5
|
+
1. [O que é o Signal Protocol?](#o-que-é-o-signal-protocol)
|
|
6
|
+
2. [Como Funciona](#como-funciona)
|
|
7
|
+
3. [Algoritmos Utilizados](#algoritmos-utilizados)
|
|
8
|
+
4. [Propriedades de Segurança](#propriedades-de-segurança)
|
|
9
|
+
5. [Como Usar](#como-usar)
|
|
10
|
+
6. [Signal E2EE vs mTLS](#signal-e2ee-vs-mtls)
|
|
11
|
+
7. [Usando Ambos em Conjunto](#usando-ambos-em-conjunto)
|
|
12
|
+
8. [Quando Usar Cada Um](#quando-usar-cada-um)
|
|
13
|
+
9. [Referências](#referências)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## O que é o Signal Protocol?
|
|
18
|
+
|
|
19
|
+
O **Signal Protocol** é um protocolo de criptografia end-to-end desenvolvido por Trevor Perrin e Moxie Marlinspike. É amplamente considerado o **padrão-ouro** para mensagens seguras e é utilizado por aplicativos como:
|
|
20
|
+
|
|
21
|
+
- **Signal** (o aplicativo original)
|
|
22
|
+
- **WhatsApp** (3+ bilhões de usuários)
|
|
23
|
+
- **Facebook Messenger** (modo secreto)
|
|
24
|
+
- **Google Messages** (RCS)
|
|
25
|
+
- **Skype** (conversas privadas)
|
|
26
|
+
|
|
27
|
+
O protocolo combina dois componentes principais:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
31
|
+
│ Signal Protocol │
|
|
32
|
+
├─────────────────────────────────────────────────────────────┤
|
|
33
|
+
│ │
|
|
34
|
+
│ ┌───────────────────┐ ┌───────────────────────────────┐ │
|
|
35
|
+
│ │ X3DH │───▶│ Double Ratchet │ │
|
|
36
|
+
│ │ Key Agreement │ │ Continuous Key Rotation │ │
|
|
37
|
+
│ └───────────────────┘ └───────────────────────────────┘ │
|
|
38
|
+
│ │
|
|
39
|
+
│ Estabelece sessão Protege cada mensagem │
|
|
40
|
+
│ inicial segura individualmente │
|
|
41
|
+
│ │
|
|
42
|
+
└─────────────────────────────────────────────────────────────┘
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Como Funciona
|
|
48
|
+
|
|
49
|
+
### 1. X3DH (Extended Triple Diffie-Hellman)
|
|
50
|
+
|
|
51
|
+
O X3DH é usado para estabelecer a sessão inicial entre dois agentes:
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
// Cada agente publica um "Key Bundle" contendo:
|
|
55
|
+
interface KeyBundle {
|
|
56
|
+
identityKey: Buffer; // Chave de identidade (longo prazo)
|
|
57
|
+
signedPreKey: Buffer; // Pre-key assinada (médio prazo)
|
|
58
|
+
signedPreKeySignature: Buffer;
|
|
59
|
+
oneTimePreKey?: Buffer; // Pre-key única (curto prazo)
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
O protocolo realiza **4 operações Diffie-Hellman**:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
Alice (Iniciadora) Bob (Receptor)
|
|
67
|
+
────────────────── ─────────────────
|
|
68
|
+
IKa (Identity Key) IKb (Identity Key)
|
|
69
|
+
EKa (Ephemeral Key) SPKb (Signed Pre-Key)
|
|
70
|
+
OPKb (One-Time Pre-Key)
|
|
71
|
+
|
|
72
|
+
DH1 = DH(IKa, SPKb) ──────────────────────────────────────
|
|
73
|
+
DH2 = DH(EKa, IKb) ──────────────────────────────────────
|
|
74
|
+
DH3 = DH(EKa, SPKb) ──────────────────────────────────────
|
|
75
|
+
DH4 = DH(EKa, OPKb) ──────────────────────────────────────
|
|
76
|
+
|
|
77
|
+
SharedSecret = HKDF(DH1 || DH2 || DH3 || DH4)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 2. Double Ratchet Algorithm
|
|
81
|
+
|
|
82
|
+
Após o X3DH estabelecer o segredo compartilhado, o **Double Ratchet** entra em ação:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
┌───────────────────────────────────┐
|
|
86
|
+
│ Root Key (RK) │
|
|
87
|
+
└───────────┬───────────────────────┘
|
|
88
|
+
│
|
|
89
|
+
┌──────────────────┼──────────────────────┐
|
|
90
|
+
▼ ▼ ▼
|
|
91
|
+
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
|
92
|
+
│ DH Ratchet │ │ Sending Chain │ │ Receiving Chain │
|
|
93
|
+
│ (Asymmetric) │ │ (Symmetric) │ │ (Symmetric) │
|
|
94
|
+
└─────────────────┘ └─────────────────┘ └─────────────────┘
|
|
95
|
+
│ │ │
|
|
96
|
+
│ ▼ ▼
|
|
97
|
+
│ ┌───────────────┐ ┌───────────────┐
|
|
98
|
+
│ │ Message Key 1 │ │ Message Key 1 │
|
|
99
|
+
│ │ Message Key 2 │ │ Message Key 2 │
|
|
100
|
+
│ │ Message Key 3 │ │ Message Key 3 │
|
|
101
|
+
│ │ ... │ │ ... │
|
|
102
|
+
│ └───────────────┘ └───────────────┘
|
|
103
|
+
│
|
|
104
|
+
└─────── Atualiza chains a cada resposta
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Symmetric-key Ratchet:**
|
|
108
|
+
- Deriva uma nova chave para cada mensagem
|
|
109
|
+
- Impossibilita calcular chaves anteriores a partir de posteriores
|
|
110
|
+
|
|
111
|
+
**DH Ratchet:**
|
|
112
|
+
- Troca novas chaves DH a cada "turno" de conversa
|
|
113
|
+
- Impossibilita calcular chaves futuras a partir de anteriores
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Algoritmos Utilizados
|
|
118
|
+
|
|
119
|
+
| Componente | Algoritmo | Propósito |
|
|
120
|
+
|------------|-----------|-----------|
|
|
121
|
+
| Key Exchange | **X25519** | Diffie-Hellman sobre Curve25519 |
|
|
122
|
+
| Key Derivation | **HKDF-SHA256** | Derivação de chaves a partir de DH |
|
|
123
|
+
| Encryption | **AES-256-GCM** | Encriptação autenticada |
|
|
124
|
+
| Authentication | **Ed25519** | Assinatura de pre-keys |
|
|
125
|
+
| Chain KDF | **HMAC-SHA256** | Avanço das chains |
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Propriedades de Segurança
|
|
130
|
+
|
|
131
|
+
### Perfect Forward Secrecy (PFS)
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
Se o atacante obtiver sua chave privada AGORA:
|
|
135
|
+
├── ✅ Mensagens PASSADAS permanecem seguras
|
|
136
|
+
└── ❌ Apenas mensagens ATUAIS são comprometidas
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Post-Compromise Security (PCS)
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
Se o atacante comprometeu sua chave NO PASSADO:
|
|
143
|
+
├── ✅ Mensagens FUTURAS se tornam seguras novamente
|
|
144
|
+
└── 🔄 Após troca de DH ratchet keys
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Deniability (Negabilidade)
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
Qualquer pessoa com a chave pública poderia ter criado a mensagem:
|
|
151
|
+
├── ✅ Você não pode provar criptograficamente quem enviou
|
|
152
|
+
└── ✅ Útil para proteção legal/privacidade
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Chaves Únicas por Mensagem
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
Mensagem 1: ChaveA ──────────────────
|
|
159
|
+
Mensagem 2: ChaveB ──────────────────
|
|
160
|
+
Mensagem 3: ChaveC ──────────────────
|
|
161
|
+
|
|
162
|
+
✅ Compromisso de ChaveB não afeta mensagens 1 ou 3
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Como Usar
|
|
168
|
+
|
|
169
|
+
### Instalação
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# Clone o repositório
|
|
173
|
+
cd purecore-jwtfy
|
|
174
|
+
|
|
175
|
+
# Instale dependências
|
|
176
|
+
bun install
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Uso Básico
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
import {
|
|
183
|
+
SignalE2EEAgent,
|
|
184
|
+
TokenAuthority
|
|
185
|
+
} from './examples/signal-e2ee-agents';
|
|
186
|
+
|
|
187
|
+
// 1. Criar autoridade de tokens (para JWT)
|
|
188
|
+
const tokenAuthority = new TokenAuthority();
|
|
189
|
+
|
|
190
|
+
// 2. Criar agentes
|
|
191
|
+
const alice = new SignalE2EEAgent('alice', tokenAuthority);
|
|
192
|
+
const bob = new SignalE2EEAgent('bob', tokenAuthority);
|
|
193
|
+
|
|
194
|
+
await alice.initialize();
|
|
195
|
+
await bob.initialize();
|
|
196
|
+
|
|
197
|
+
// 3. Trocar bundles públicos
|
|
198
|
+
alice.registerPeerBundle('bob', bob.getPublicKeyBundle());
|
|
199
|
+
bob.registerPeerBundle('alice', alice.getPublicKeyBundle());
|
|
200
|
+
|
|
201
|
+
// 4. Estabelecer sessão E2EE
|
|
202
|
+
await alice.establishSession('bob');
|
|
203
|
+
await bob.acceptSession(
|
|
204
|
+
'alice',
|
|
205
|
+
alice.getIdentityPublicKey(),
|
|
206
|
+
alice.getPublicKeyBundle().signedPreKey
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
// 5. Enviar mensagens encriptadas
|
|
210
|
+
const msg = await alice.sendMessage('bob', 'Hello, secure world!');
|
|
211
|
+
const plaintext = await bob.receiveMessage(msg);
|
|
212
|
+
|
|
213
|
+
console.log(plaintext); // "Hello, secure world!"
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Eventos
|
|
217
|
+
|
|
218
|
+
```typescript
|
|
219
|
+
bob.on('message', ({ from, content, message }) => {
|
|
220
|
+
console.log(`Mensagem de ${from}: ${content}`);
|
|
221
|
+
});
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Signal E2EE vs mTLS
|
|
227
|
+
|
|
228
|
+
### Tabela Comparativa
|
|
229
|
+
|
|
230
|
+
| Aspecto | Signal E2EE | mTLS |
|
|
231
|
+
|---------|-------------|------|
|
|
232
|
+
| **Camada OSI** | Aplicação (7) | Transporte (4) |
|
|
233
|
+
| **O que protege** | Conteúdo da mensagem | Canal de comunicação |
|
|
234
|
+
| **Forward Secrecy** | ✅ Por mensagem | ✅ Por sessão TLS |
|
|
235
|
+
| **Post-Compromise** | ✅ Sim (Double Ratchet) | ❌ Não |
|
|
236
|
+
| **Autenticação** | Identidade E2E | Certificados X.509 |
|
|
237
|
+
| **Visibilidade servidor** | ❌ Não vê conteúdo | ⚠️ Termina no servidor |
|
|
238
|
+
| **Complexidade** | Alta | Média |
|
|
239
|
+
| **Overhead** | Maior (crypto por msg) | Menor (por sessão) |
|
|
240
|
+
|
|
241
|
+
### Diferenças Visuais
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
mTLS (Mutual TLS):
|
|
245
|
+
┌─────────┐ ┌─────────┐ ┌─────────┐
|
|
246
|
+
│ Agent A │◀═══════▶│ Server │◀═══════▶│ Agent B │
|
|
247
|
+
└─────────┘ TLS └─────────┘ TLS └─────────┘
|
|
248
|
+
│
|
|
249
|
+
Pode ver o
|
|
250
|
+
conteúdo!
|
|
251
|
+
|
|
252
|
+
Signal E2EE:
|
|
253
|
+
┌─────────┐════════════════════════════▶┌─────────┐
|
|
254
|
+
│ Agent A │ Encriptado E2E │ Agent B │
|
|
255
|
+
└─────────┘◀════════════════════════════└─────────┘
|
|
256
|
+
│
|
|
257
|
+
Servidor não
|
|
258
|
+
pode ver nada!
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Quando Cada Um é Comprometido
|
|
262
|
+
|
|
263
|
+
```
|
|
264
|
+
Cenário: Atacante obtém chave privada
|
|
265
|
+
|
|
266
|
+
mTLS:
|
|
267
|
+
├── Passado: ❌ Todas as mensagens dessa sessão comprometidas
|
|
268
|
+
├── Futuro: ❌ Até nova sessão TLS
|
|
269
|
+
└── Servidor: Ainda protegido (tem próprio cert)
|
|
270
|
+
|
|
271
|
+
Signal E2EE:
|
|
272
|
+
├── Passado: ✅ Mensagens antigas protegidas (PFS)
|
|
273
|
+
├── Futuro: ✅ Proteção restaurada após DH ratchet
|
|
274
|
+
└── Servidor: N/A (nunca viu o conteúdo)
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Usando Ambos em Conjunto
|
|
280
|
+
|
|
281
|
+
### SIM! Você pode e DEVE usar ambos!
|
|
282
|
+
|
|
283
|
+
A combinação cria **defesa em profundidade**:
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
287
|
+
│ Arquitetura Combinada │
|
|
288
|
+
├─────────────────────────────────────────────────────────────┤
|
|
289
|
+
│ │
|
|
290
|
+
│ ┌───────────────────────────────────────────────────────┐ │
|
|
291
|
+
│ │ Signal E2EE │ │
|
|
292
|
+
│ │ ┌─────────────────────────────────────────────────┐ │ │
|
|
293
|
+
│ │ │ mTLS │ │ │
|
|
294
|
+
│ │ │ ┌─────────────────────────────────────────┐ │ │ │
|
|
295
|
+
│ │ │ │ JWT │ │ │ │
|
|
296
|
+
│ │ │ │ │ │ │ │
|
|
297
|
+
│ │ │ │ Payload/Contexto │ │ │ │
|
|
298
|
+
│ │ │ │ │ │ │ │
|
|
299
|
+
│ │ │ └─────────────────────────────────────────┘ │ │ │
|
|
300
|
+
│ │ │ Autenticação de Transporte │ │ │
|
|
301
|
+
│ │ └─────────────────────────────────────────────────┘ │ │
|
|
302
|
+
│ │ Encriptação End-to-End │ │ │
|
|
303
|
+
│ └───────────────────────────────────────────────────────┘ │
|
|
304
|
+
│ │
|
|
305
|
+
└─────────────────────────────────────────────────────────────┘
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Benefícios da Combinação
|
|
309
|
+
|
|
310
|
+
| Camada | Protocolo | Proteção | Se Comprometido... |
|
|
311
|
+
|--------|-----------|----------|-------------------|
|
|
312
|
+
| **Transporte** | mTLS | Canal seguro, anti-MITM | E2EE ainda protege conteúdo |
|
|
313
|
+
| **Aplicação** | Signal E2EE | Conteúdo encriptado | mTLS ainda autentica partes |
|
|
314
|
+
| **Contexto** | JWT | Claims, autorização | Outros layers ainda funcionam |
|
|
315
|
+
|
|
316
|
+
### Exemplo de Uso Combinado
|
|
317
|
+
|
|
318
|
+
```typescript
|
|
319
|
+
import { mTLSAgent, CertificateAuthority } from './mtls-agents';
|
|
320
|
+
import { SignalE2EEAgent, TokenAuthority } from './signal-e2ee-agents';
|
|
321
|
+
|
|
322
|
+
// Setup de infraestrutura
|
|
323
|
+
const ca = new CertificateAuthority();
|
|
324
|
+
const tokenAuth = new TokenAuthority();
|
|
325
|
+
|
|
326
|
+
// Agente com ambas as camadas
|
|
327
|
+
class HybridSecureAgent {
|
|
328
|
+
private mtlsAgent: mTLSAgent;
|
|
329
|
+
private e2eeAgent: SignalE2EEAgent;
|
|
330
|
+
|
|
331
|
+
constructor(agentId: string) {
|
|
332
|
+
const cert = ca.generateAgentCertificate(agentId);
|
|
333
|
+
|
|
334
|
+
// mTLS para transporte
|
|
335
|
+
this.mtlsAgent = new mTLSAgent(
|
|
336
|
+
agentId, 'primary', tokenAuth, cert, ca.getCACertificate()
|
|
337
|
+
);
|
|
338
|
+
|
|
339
|
+
// Signal E2EE para conteúdo
|
|
340
|
+
this.e2eeAgent = new SignalE2EEAgent(agentId, tokenAuth);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
async sendSecureMessage(peerId: string, content: string) {
|
|
344
|
+
// 1. Encripta com Signal E2EE
|
|
345
|
+
const encryptedMsg = await this.e2eeAgent.sendMessage(peerId, content);
|
|
346
|
+
|
|
347
|
+
// 2. Envia pelo canal mTLS (já encriptado E2E!)
|
|
348
|
+
await this.mtlsAgent.sendMessage(peerId, JSON.stringify(encryptedMsg));
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### Fluxo de Dados Combinado
|
|
354
|
+
|
|
355
|
+
```
|
|
356
|
+
Agent A Agent B
|
|
357
|
+
─────── ───────
|
|
358
|
+
│ │
|
|
359
|
+
│ 1. Criar payload (ex: comando para agente) │
|
|
360
|
+
│ ↓ │
|
|
361
|
+
│ 2. Adicionar JWT (claims, exp, iss) │
|
|
362
|
+
│ ↓ │
|
|
363
|
+
│ 3. Encriptar com Signal E2EE │
|
|
364
|
+
│ ↓ │
|
|
365
|
+
│ 4. Enviar pelo canal mTLS ════════════════════════▶ │
|
|
366
|
+
│ │
|
|
367
|
+
│ 5. mTLS valida │
|
|
368
|
+
│ certificados │
|
|
369
|
+
│ ↓ │
|
|
370
|
+
│ 6. Decripta E2EE │
|
|
371
|
+
│ ↓ │
|
|
372
|
+
│ 7. Verifica JWT │
|
|
373
|
+
│ ↓ │
|
|
374
|
+
│ 8. Processa │
|
|
375
|
+
│ payload │
|
|
376
|
+
│ │
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
## Quando Usar Cada Um
|
|
382
|
+
|
|
383
|
+
### Use Apenas mTLS quando:
|
|
384
|
+
|
|
385
|
+
- ✅ Comunicação servidor-servidor tradicional
|
|
386
|
+
- ✅ APIs onde o servidor precisa ver o conteúdo
|
|
387
|
+
- ✅ Infraestrutura já possui PKI estabelecida
|
|
388
|
+
- ✅ Latência é crítica (menos overhead)
|
|
389
|
+
- ✅ Compliance requer logs do conteúdo
|
|
390
|
+
|
|
391
|
+
### Use Apenas Signal E2EE quando:
|
|
392
|
+
|
|
393
|
+
- ✅ Zero-trust absoluto (nem servidores intermediários)
|
|
394
|
+
- ✅ Mensagens precisam de PFS por mensagem
|
|
395
|
+
- ✅ Negabilidade é importante
|
|
396
|
+
- ✅ Comunicação peer-to-peer direta
|
|
397
|
+
- ✅ Privacidade máxima do conteúdo
|
|
398
|
+
|
|
399
|
+
### Use Ambos quando:
|
|
400
|
+
|
|
401
|
+
- ✅ **Comunicação entre agentes autônomos**
|
|
402
|
+
- ✅ Defesa em profundidade é necessária
|
|
403
|
+
- ✅ Diferentes adversários em diferentes camadas
|
|
404
|
+
- ✅ Regulamentação exige múltiplas camadas
|
|
405
|
+
- ✅ Sistemas críticos de alta segurança
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
## Referências
|
|
410
|
+
|
|
411
|
+
### Especificações Oficiais
|
|
412
|
+
|
|
413
|
+
1. **Double Ratchet Algorithm** (Revision 4, 2025)
|
|
414
|
+
- https://signal.org/docs/specifications/doubleratchet/
|
|
415
|
+
- Trevor Perrin, Moxie Marlinspike, Rolfe Schmidt
|
|
416
|
+
|
|
417
|
+
2. **X3DH Key Agreement Protocol**
|
|
418
|
+
- https://signal.org/docs/specifications/x3dh/
|
|
419
|
+
|
|
420
|
+
3. **PQXDH** (Post-Quantum Extended Diffie-Hellman)
|
|
421
|
+
- https://signal.org/docs/specifications/pqxdh/
|
|
422
|
+
|
|
423
|
+
### Implementações de Referência
|
|
424
|
+
|
|
425
|
+
4. **libsignal** (Oficial)
|
|
426
|
+
- https://github.com/signalapp/libsignal
|
|
427
|
+
|
|
428
|
+
5. **2key-ratchet** (TypeScript)
|
|
429
|
+
- https://github.com/PeculiarVentures/2key-ratchet
|
|
430
|
+
|
|
431
|
+
### Papers Acadêmicos
|
|
432
|
+
|
|
433
|
+
6. **The Double Ratchet: Security Notions, Proofs, and Modularization**
|
|
434
|
+
- Alwen, Coretti, Dodis (2019)
|
|
435
|
+
- https://eprint.iacr.org/2018/1037
|
|
436
|
+
|
|
437
|
+
7. **A Formal Security Analysis of the Signal Messaging Protocol**
|
|
438
|
+
- Cohn-Gordon, Cremers, et al. (2017)
|
|
439
|
+
- https://eprint.iacr.org/2016/1013
|
|
440
|
+
|
|
441
|
+
### RFCs Relacionados
|
|
442
|
+
|
|
443
|
+
8. **RFC 7748** - Elliptic Curves for Security (X25519)
|
|
444
|
+
9. **RFC 5869** - HKDF (HMAC-based Key Derivation Function)
|
|
445
|
+
10. **RFC 8446** - TLS 1.3
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
## Changelog
|
|
450
|
+
|
|
451
|
+
| Versão | Data | Mudanças |
|
|
452
|
+
|--------|------|----------|
|
|
453
|
+
| 1.0.0 | 22/12/2024 | Implementação inicial do Signal E2EE para agentes |
|
|
454
|
+
|
|
455
|
+
---
|
|
456
|
+
|
|
457
|
+
*Documentação criada para o projeto @purecore/one-jwt-4-all*
|