Skip to content

Commit 9212ee8

Browse files
committed
Sync website with spec
1 parent 992d1b7 commit 9212ee8

File tree

3 files changed

+145
-49
lines changed

3 files changed

+145
-49
lines changed

www/pages/about.md

Lines changed: 75 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ permalink: /about/
77

88
## What is IPCrypt?
99

10-
IPCrypt is a simple, open specification that suggests methods for encrypting and obfuscating IP addresses. It offers both deterministic format-preserving and non-deterministic approaches that work with both IPv4 and IPv6 addresses.
10+
IP addresses are personally identifiable information that requires protection, yet common techniques such as truncation destroy data irreversibly while providing inconsistent privacy guarantees, and ad-hoc encryption schemes often lack interoperability and security analysis.
1111

12-
This community effort was inspired by privacy concerns highlighted in [RFC6973](https://datatracker.ietf.org/doc/html/rfc6973) and [RFC7258](https://datatracker.ietf.org/doc/html/rfc7258) about pervasive monitoring and data collection. We aimed to help maintain the practical utility of IP addresses in network operations while addressing these privacy considerations.
12+
IPCrypt provides secure, efficient methods for encrypting IP addresses for privacy-preserving storage, logging, and analytics. The methods enable data analysis while protecting user privacy from third parties without key access, addressing data minimization concerns raised in [RFC6973](https://datatracker.ietf.org/doc/html/rfc6973). Three concrete instantiations are defined: `ipcrypt-deterministic` provides deterministic, format-preserving encryption, while `ipcrypt-nd` and `ipcrypt-ndx` introduce randomness to prevent correlation. All methods are reversible with the encryption key and designed for high-performance processing at network speeds.
1313

1414
## The Challenge We're Trying to Help With
1515

@@ -21,7 +21,7 @@ IP addresses are fundamental to network operations but present some privacy chal
2121
4. **Service Provider Concerns**: Sharing raw IP addresses with external services raises privacy questions
2222
5. **Varied Approaches**: Different organizations use different methods to protect IP addresses
2323

24-
IPCrypt tries to offer a simple, consistent approach to IP address encryption that anyone can implement.
24+
IPCrypt addresses these deficiencies by specifying secure, efficient, and interoperable methods for IP address encryption and obfuscation. The objective is to enable network operators, researchers, and privacy advocates to share or analyze data while protecting sensitive address information through cryptographically sound techniques.
2525

2626
## Potential Benefits
2727

@@ -62,32 +62,48 @@ IPCrypt operates by converting IP addresses to a 16-byte representation and then
6262
### ipcrypt-deterministic
6363

6464
- Uses AES-128 in a single-block operation
65-
- Produces a 16-byte output that can be converted back to an IP address format
66-
- Always produces the same output for a given input and key
67-
- Suitable for applications where format preservation is required and linkability is acceptable
65+
- Output size: 16 bytes (most compact)
66+
- Same IP always produces same ciphertext (allows correlation)
67+
- Performance: Fastest (single AES operation)
68+
69+
**Choose when:**
70+
- Duplicate IP addresses need to be detected in encrypted form (e.g., for rate limiting)
71+
- Storage space is critical (produces only 16 bytes output)
72+
- Format preservation is required (output remains a valid IP address)
73+
- Correlation of the same address across records is acceptable
6874

6975
### ipcrypt-nd
7076

7177
- Uses the KIASU-BC tweakable block cipher with an 8-byte tweak
72-
- Produces a 24-byte output (8-byte tweak + 16-byte ciphertext)
73-
- Different outputs for the same input due to random tweak
74-
- Suitable for applications where correlation protection is important
78+
- Output size: 24 bytes (16-byte ciphertext + 8-byte tweak)
79+
- Same IP produces different ciphertexts (prevents most correlation)
80+
- Collision resistance: Approximately 4 billion operations per key
81+
82+
**Choose when:**
83+
- General privacy protection with reasonable storage overhead
84+
- Preventing correlation of the same IP address across records is critical
85+
- Processing the same address multiple times without revealing repetition patterns
7586

7687
### ipcrypt-ndx
7788

7889
- Uses the AES-XTS tweakable block cipher with a 16-byte tweak
79-
- Produces a 32-byte output (16-byte tweak + 16-byte ciphertext)
80-
- Highest security margin with 128-bit tweak space
81-
- Suitable for applications requiring maximum security and correlation protection
90+
- Output size: 32 bytes (16-byte ciphertext + 16-byte tweak)
91+
- Same IP produces different ciphertexts (prevents correlation)
92+
- Collision resistance: Approximately 18 quintillion operations per key
93+
94+
**Choose when:**
95+
- Maximum privacy protection when storage permits
96+
- Stronger privacy guarantees than deterministic encryption provides are required
97+
- Processing extremely high volumes of data with a single key
8298

8399
## Comparison with Ad-hoc Mechanisms
84100

85-
Many organizations currently use ad-hoc mechanisms to protect IP addresses, such as:
101+
IP addresses are personally identifiable information requiring protection, yet common anonymization approaches have fundamental limitations:
86102

87-
1. **Simple Hashing**: Vulnerable to rainbow table attacks
88-
2. **Truncation**: Removes information but doesn't provide cryptographic protection
103+
1. **Truncation (zeroing parts of addresses)**: Irreversibly destroys data while providing unpredictable privacy levels - a /24 mask may hide one user or thousands depending on network allocation
104+
2. **Simple Hashing**: Produces non-reversible outputs unsuitable for operational tasks such as abuse investigation
89105
3. **Tokenization**: Often lacks consistency and security guarantees
90-
4. **Custom Encryption**: May have unknown security properties or implementation flaws
106+
4. **Custom Encryption**: Ad-hoc schemes often lack rigorous security analysis and cannot interoperate between systems
91107

92108
IPCrypt offers several advantages over these approaches:
93109

@@ -101,6 +117,49 @@ IPCrypt offers several advantages over these approaches:
101117
| Decryption Capability | Often one-way | Fully invertible |
102118
| Documentation | Typically minimal | Comprehensive specification |
103119

120+
## Efficiency Benefits
121+
122+
Organizations handling IP addresses must protect user privacy while maintaining operational capabilities. Generic encryption systems, though secure, are poorly suited for IP addresses - they expand data unpredictably, break compatibility with network tools, and operate too slowly for high-volume processing. IPCrypt resolves these conflicts through purpose-built cryptographic techniques:
123+
124+
- **Efficiency and Compactness**: All variants operate on exactly 128 bits, achieving single-block encryption speed critical for network-rate processing. Non-deterministic variants add only 8-16 bytes of tweak overhead versus potentially hundreds of bytes with generic encryption. This difference enables processing addresses in real-time rather than requiring expensive batch operations.
125+
126+
- **High Usage Limits**: Non-deterministic variants safely handle massive volumes - approximately 4 billion operations for `ipcrypt-nd` and 18 quintillion for `ipcrypt-ndx` per key - without degrading security. Generic encryption often requires operationally complex key rotation schemes at much lower thresholds.
127+
128+
- **Format Preservation (Deterministic)**: The `ipcrypt-deterministic` variant produces valid IP addresses, not arbitrary ciphertext. This enables encrypted addresses to flow through existing network infrastructure, monitoring tools, and databases without modification.
129+
130+
- **Interoperability**: This specification ensures that encrypted IP addresses can be exchanged between different systems, vendors, and programming languages. All conforming implementations produce identical results, enabling seamless data exchange and avoiding vendor lock-in.
131+
132+
## Format Preservation and Limitations
133+
134+
### Network Hierarchy Preservation
135+
136+
The encryption methods described in this specification do not preserve network hierarchy or prefix relationships.
137+
138+
- IPv4 and IPv6 prefixes are completely scrambled in the encrypted output
139+
- Addresses from the same subnet will not appear related after encryption
140+
- Geographic or topological proximity cannot be inferred from encrypted addresses
141+
142+
### Preserving Metadata for Analytics
143+
144+
Organizations requiring network metadata for analytics SHOULD extract and store geographic location, ASN, or network classification separately before encryption, rather than using IP address truncation. Truncation (e.g., storing only /24 or /48 prefixes) is a fundamentally flawed privacy mechanism that provides inconsistent protection and irreversibly destroys data.
145+
146+
Recommended approach:
147+
1. Extract metadata (geographic location, ASN, network type) from the original IP address
148+
2. Store this information as separate fields alongside the encrypted IP address
149+
3. Apply appropriate privacy-preserving aggregation to the metadata itself
150+
151+
Example storage schema:
152+
```json
153+
{
154+
"encrypted_ip": "bde9:6789:d353:824c:d7c6:f58a:6bd2:26eb",
155+
"country": "US",
156+
"asn": 15169,
157+
"network_type": "cloud_provider"
158+
}
159+
```
160+
161+
This approach ensures consistent privacy protection through proper encryption while preserving analytical capabilities in a controlled manner.
162+
104163
## Real-World Applications
105164

106165
This section showcases practical examples of how IPCrypt can be used in various environments.

www/pages/encryption-modes.md

Lines changed: 58 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -523,36 +523,73 @@ IPCrypt offers the following encryption modes:
523523
<div class="mode-card-icon deterministic-icon">?</div>
524524
<div>
525525
<h3 class="mode-card-title">Mode Selection Guide</h3>
526-
<p class="mode-card-subtitle">Factors to consider when choosing an encryption mode</p>
526+
<p class="mode-card-subtitle">Choosing the right mode depends on specific privacy requirements and operational constraints</p>
527527
</div>
528528
</div>
529529

530-
<p>When selecting an encryption mode, consider the following factors:</p>
530+
<h3>Deterministic Mode (ipcrypt-deterministic)</h3>
531531

532+
<p><strong>Choose when:</strong></p>
532533
<div class="feature-list">
533534
<div class="feature-item">
534-
<div class="feature-icon">1</div>
535-
<div class="feature-text"><strong>Format Requirements</strong>: If you need to maintain the IP address format, use deterministic mode</div>
535+
<div class="feature-icon"></div>
536+
<div class="feature-text">Duplicate IP addresses need to be detected in encrypted form (e.g., for rate limiting)</div>
536537
</div>
537538
<div class="feature-item">
538-
<div class="feature-icon">2</div>
539-
<div class="feature-text"><strong>Correlation Protection</strong>: If preventing correlation is important, use nd or ndx mode</div>
539+
<div class="feature-icon"></div>
540+
<div class="feature-text">Storage space is critical (produces only 16 bytes output)</div>
540541
</div>
541542
<div class="feature-item">
542-
<div class="feature-icon">3</div>
543-
<div class="feature-text"><strong>Security Requirements</strong>: For maximum security, use ndx mode</div>
543+
<div class="feature-icon"></div>
544+
<div class="feature-text">Format preservation is required (output remains a valid IP address)</div>
544545
</div>
545546
<div class="feature-item">
546-
<div class="feature-icon">4</div>
547-
<div class="feature-text"><strong>Performance Considerations</strong>: Deterministic mode is fastest, followed by nd and ndx</div>
547+
<div class="feature-icon">✓</div>
548+
<div class="feature-text">Correlation of the same address across records is acceptable</div>
549+
</div>
550+
</div>
551+
552+
<h3>Non-Deterministic Mode (ipcrypt-nd)</h3>
553+
554+
<p><strong>Choose when:</strong></p>
555+
<div class="feature-list">
556+
<div class="feature-item">
557+
<div class="feature-icon">✓</div>
558+
<div class="feature-text">Preventing correlation of the same IP address across records is critical</div>
559+
</div>
560+
<div class="feature-item">
561+
<div class="feature-icon">✓</div>
562+
<div class="feature-text">Storage can accommodate the additional tweak data (8 bytes)</div>
548563
</div>
549564
<div class="feature-item">
550-
<div class="feature-icon">5</div>
551-
<div class="feature-text"><strong>Storage Constraints</strong>: Consider the different output sizes when storage is limited</div>
565+
<div class="feature-icon">✓</div>
566+
<div class="feature-text">General privacy protection with reasonable storage overhead</div>
567+
</div>
568+
<div class="feature-item">
569+
<div class="feature-icon">✓</div>
570+
<div class="feature-text">Processing the same address multiple times without revealing repetition patterns</div>
552571
</div>
553572
</div>
573+
<p><strong>Collision resistance:</strong> Approximately 4 billion operations per key</p>
574+
575+
<h3>Extended Non-Deterministic Mode (ipcrypt-ndx)</h3>
554576

555-
<p>For most applications, the deterministic mode provides a good balance of security and usability. However, when privacy concerns are paramount, the non-deterministic modes offer stronger protection against correlation attacks.</p>
577+
<p><strong>Choose when:</strong></p>
578+
<div class="feature-list">
579+
<div class="feature-item">
580+
<div class="feature-icon">✓</div>
581+
<div class="feature-text">Maximum privacy protection when storage permits</div>
582+
</div>
583+
<div class="feature-item">
584+
<div class="feature-icon">✓</div>
585+
<div class="feature-text">Stronger privacy guarantees than deterministic encryption provides are required</div>
586+
</div>
587+
<div class="feature-item">
588+
<div class="feature-icon">✓</div>
589+
<div class="feature-text">Processing extremely high volumes of data with a single key</div>
590+
</div>
591+
</div>
592+
<p><strong>Collision resistance:</strong> Approximately 18 quintillion operations per key</p>
556593

557594
<h3>Mode Comparison</h3>
558595

@@ -597,22 +634,22 @@ IPCrypt offers the following encryption modes:
597634
<td>16 bytes</td>
598635
</tr>
599636
<tr>
600-
<td>Security Margin</td>
601-
<td>Standard</td>
602-
<td>High</td>
603-
<td>Highest</td>
637+
<td>Collision Resistance</td>
638+
<td>N/A</td>
639+
<td>~4 billion operations</td>
640+
<td>~18 quintillion operations</td>
604641
</tr>
605642
<tr>
606643
<td>Performance</td>
607-
<td>Fastest</td>
644+
<td>Fastest (single AES)</td>
645+
<td>Fast</td>
608646
<td>Fast</td>
609-
<td>Moderate</td>
610647
</tr>
611648
<tr>
612649
<td>Recommended Use Case</td>
613650
<td>Logging, Rate Limiting</td>
614-
<td>Data Sharing</td>
615-
<td>Highest Security Needs</td>
651+
<td>Data Sharing, Privacy Protection</td>
652+
<td>Maximum Privacy, High Volume</td>
616653
</tr>
617654
</tbody>
618655
</table>

0 commit comments

Comments
 (0)