You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "Tweaks and Keys for Block Ciphers: the TWEAKEY Framework"
96
92
author:
@@ -101,7 +97,6 @@ informative:
101
97
seriesinfo:
102
98
Cryptology ePrint Archive: Paper 2014/831
103
99
target: https://eprint.iacr.org/2014/831
104
-
eprint: 2014/831
105
100
XTS-AES:
106
101
title: "The XTS-AES Mode for Disk Encryption"
107
102
author:
@@ -112,14 +107,12 @@ informative:
112
107
date: 2010
113
108
seriesinfo:
114
109
IEEE: 1619-2007
115
-
doi: 10.1109/TC.2010.58
116
110
IPCRYPT2:
117
111
title: "ipcrypt2: IP address encryption/obfuscation tool"
118
112
author:
119
113
- ins: F. Denis
120
114
date: 2025
121
115
target: https://github.com/jedisct1/ipcrypt2
122
-
license: ISC
123
116
124
117
--- abstract
125
118
@@ -139,23 +132,23 @@ Deterministic mode produces a 16-byte ciphertext enabling format preservation. N
139
132
140
133
This document specifies methods for the encryption and obfuscation of IP addresses for both operational use and privacy preservation. The objective is to enable network operators, researchers, and privacy advocates to share or analyze data while protecting sensitive address information.
141
134
142
-
This work addresses concerns raised in {{!RFC7624}} regarding confidentiality in the face of pervasive surveillance. The security properties of these methods are discussed throughout this document and summarized in {{Security Considerations}}.
135
+
This work addresses concerns raised in {{!RFC7624}} regarding confidentiality in the face of pervasive surveillance. The security properties of these methods are discussed throughout this document and summarized in {{security-considerations}}.
143
136
144
137
## Use Cases and Motivations
145
138
146
139
The main motivations include:
147
140
148
141
- **Privacy Protection:** Encrypting IP addresses prevents the disclosure of user-specific information when data is logged or measured, as discussed in {{!RFC6973}}.
149
142
150
-
- **Format Preservation:** Ensuring that the encrypted output remains a valid IP address allows network devices to process the data without modification. See {{Format Preservation}} for details.
143
+
- **Format Preservation:** Ensuring that the encrypted output remains a valid IP address allows network devices to process the data without modification. See {{format-preservation}} for details.
151
144
152
-
- **Mitigation of Correlation Attacks:** Deterministic encryption reveals repeated inputs; non-deterministic modes use a random tweak to obscure linkability while keeping the underlying input confidential. See {{Non-Deterministic Encryption}} for implementation details.
145
+
- **Mitigation of Correlation Attacks:** Deterministic encryption reveals repeated inputs; non-deterministic modes use a random tweak to obscure linkability while keeping the underlying input confidential. See {{non-deterministic-encryption}} for implementation details.
153
146
154
147
- **Privacy-Preserving Analytics:** Many common operations like counting unique clients or implementing rate limiting can be performed using encrypted IP addresses without ever accessing the original values. This enables privacy-preserving analytics while maintaining functionality.
155
148
156
149
- **Third-Party Service Integration:** IP addresses are private information that should not be sent in cleartext to potentially untrusted third-party services or cloud providers. Using encrypted IP addresses as keys or identifiers allows integration with external services while protecting user privacy.
157
150
158
-
For implementation examples, see {{Pseudocode and Examples}}.
151
+
For implementation examples, see {{pseudocode-and-examples}}.
159
152
160
153
# Terminology
161
154
@@ -211,12 +204,12 @@ The conversion algorithm is as follows:
211
204
This specification defines two generic cryptographic constructions:
212
205
213
206
1. **128-bit Block Cipher Construction:**
214
-
- Used in deterministic encryption (see {{Deterministic Encryption}})
207
+
- Used in deterministic encryption (see {{deterministic-encryption}})
- Used in non-deterministic encryption (see {{Non-Deterministic Encryption}})
212
+
- Used in non-deterministic encryption (see {{non-deterministic-encryption}})
220
213
- Accepts a key, a tweak, and a message
221
214
- The tweak must be uniformly random when generated
222
215
- Reuse of the same tweak on different inputs does not compromise confidentiality
@@ -225,22 +218,22 @@ Valid options for implementing a tweakable block cipher include, but are not lim
225
218
226
219
- **SKINNY** (see {{SKINNY}})
227
220
- **DEOXYS-BC** (see {{DEOXYS-BC}})
228
-
- **KIASU-BC** (see {{Implementing KIASU-BC}} for implementation details)
229
-
- **AES-XTS** (see {{ipcrypt-ndx (AES-XTS)}} for usage)
221
+
- **KIASU-BC** (see {{implementing-kiasu-bc}} for implementation details)
222
+
- **AES-XTS** (see {{ipcrypt-ndx}} for usage)
230
223
231
224
Implementers MUST choose a cipher that meets the required security properties and provides robust resistance against related-tweak and other cryptographic attacks.
232
225
233
226
# Deterministic Encryption
234
227
235
228
Deterministic encryption applies a 128-bit block cipher directly to the 16-byte representation of an IP address. All instantiations documented in this specification (`ipcrypt-deterministic`, `ipcrypt-nd`, and `ipcrypt-ndx`) are invertible - encrypted IP addresses can be decrypted back to their original values using the same key. For non-deterministic modes, the tweak must be preserved along with the ciphertext to enable decryption.
236
229
237
-
For implementation details, see {{Pseudocode and Examples}}.
230
+
For implementation details, see {{pseudocode-and-examples}}.
238
231
239
232
## ipcrypt-deterministic
240
233
241
234
The `ipcrypt-deterministic` instantiation employs AES-128 in a single-block operation. The key MUST be exactly 16 bytes (128 bits) in length. Since AES-128 is a permutation, every distinct 16-byte input maps to a unique 16-byte ciphertext, preserving the IP address format.
242
235
243
-
For test vectors, see {{ipcrypt-deterministic Test Vectors}}.
236
+
For test vectors, see {{ipcrypt-deterministic-test-vectors}}.
244
237
245
238
~~~
246
239
+---------------------+
@@ -279,7 +272,7 @@ To ensure IPv4 format preservation, implementers MUST consider using cycle-walki
Non-deterministic encryption leverages a tweakable block cipher together with a random tweak. For implementation details, see {{Pseudocode and Examples}}.
275
+
Non-deterministic encryption leverages a tweakable block cipher together with a random tweak. For implementation details, see {{pseudocode-and-examples}}.
283
276
284
277
## Encryption Process
285
278
@@ -319,13 +312,13 @@ For test vectors, see {{ipcrypt-nd-test-vectors}} and {{ipcrypt-ndx-test-vectors
319
312
320
313
### ipcrypt-nd (KIASU-BC) {#ipcrypt-nd}
321
314
322
-
The `ipcrypt-nd` instantiation uses the KIASU-BC tweakable block cipher with an 8-byte (64-bit) tweak. For implementation details, see {{Implementing KIASU-BC}}. The output is 24 bytes total, consisting of an 8-byte tweak concatenated with a 16-byte ciphertext.
315
+
The `ipcrypt-nd` instantiation uses the KIASU-BC tweakable block cipher with an 8-byte (64-bit) tweak. For implementation details, see {{implementing-kiasu-bc}}. The output is 24 bytes total, consisting of an 8-byte tweak concatenated with a 16-byte ciphertext.
323
316
324
317
Random sampling of an 8-byte tweak yields an expected collision for a specific tweak value after about 2^(64/2) = 2^32 operations (approximately 4 billion operations). If an `(input, tweak)` collision occurs, it indicates that the same input was processed with that tweak without revealing the input's value.
325
318
326
319
These collision bounds apply per cryptographic key. By rotating keys regularly, secure usage can be extended well beyond these bounds. The effective security is determined by the underlying block cipher's strength.
327
320
328
-
For test vectors, see {{ipcrypt-nd Test Vectors}}.
321
+
For test vectors, see {{ipcrypt-nd-test-vectors}}.
329
322
330
323
### ipcrypt-ndx (AES-XTS) {#ipcrypt-ndx}
331
324
@@ -383,7 +376,7 @@ This document does not require any IANA actions.
383
376
384
377
# Diagrams {#diagrams}
385
378
386
-
This appendix provides visual representations of the key operations described in this document. For implementation details, see {{Pseudocode and Examples}}.
379
+
This appendix provides visual representations of the key operations described in this document. For implementation details, see {{pseudocode-and-examples}}.
@@ -469,11 +462,11 @@ This appendix provides visual representations of the key operations described in
469
462
470
463
# Pseudocode and Examples {#pseudocode-and-examples}
471
464
472
-
This appendix provides detailed pseudocode for key operations described in this document. For a visual representation of these operations, see {{Diagrams}}.
465
+
This appendix provides detailed pseudocode for key operations described in this document. For a visual representation of these operations, see {{diagrams}}.
473
466
474
467
## IPv4 Address Conversion
475
468
476
-
For a diagram of this conversion process, see {{IPv4 Address Conversion Diagram}}.
469
+
For a diagram of this conversion process, see {{ipv4-address-conversion-diagram}}.
0 commit comments