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
Copy file name to clipboardExpand all lines: draft-denis-ipcrypt.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -547,7 +547,7 @@ Test vectors are provided in {{ipcrypt-nd-test-vectors}}.
547
547
548
548
The `ipcrypt-ndx` instantiation uses the AES-XTS tweakable block cipher with a 16-byte (128-bit) tweak. The output is 32 bytes total, consisting of a 16-byte tweak concatenated with a 16-byte ciphertext.
549
549
550
-
Since only a single block is encrypted, the construction is equivalent to AES-XTX (also known as XEX), and identical to AES-XTS at block index 0, where the tweak is not multiplied by the primitive element α.
550
+
Since only a single block is encrypted, the construction is equivalent to AES-XEX, and identical to AES-XTS at block index 0, where the tweak is not multiplied by the primitive element α.
551
551
552
552
For single-block AES-XTS, independent sampling of a 16-byte tweak results in an expected collision after about 2<sup>64</sup> operations (approximately 18 quintillion).
553
553
@@ -1195,7 +1195,7 @@ function AES_XTS_encrypt(key, tweak, block):
1195
1195
// Encrypt the tweak with the second half of the key
1196
1196
ET = AES128_encrypt(K2, tweak)
1197
1197
1198
-
// Encrypt the block: AES128(block ⊕ ET, K1) ⊕ ET
1198
+
// Encrypt the block: AES128_encrypt(K1, block ⊕ ET) ⊕ ET
1199
1199
return AES128_encrypt(K1, block ⊕ ET) ⊕ ET
1200
1200
1201
1201
function AES_XTS_decrypt(key, tweak, block):
@@ -1205,7 +1205,7 @@ function AES_XTS_decrypt(key, tweak, block):
1205
1205
// Encrypt the tweak with the second half of the key
1206
1206
ET = AES128_encrypt(K2, tweak)
1207
1207
1208
-
// Decrypt the block: AES128_decrypt(block ⊕ ET, K1) ⊕ ET
1208
+
// Decrypt the block: AES128_decrypt(K1, block ⊕ ET) ⊕ ET
0 commit comments