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
- If `(SIVLEN + component_len) % PADBS = 1`: add 2 bytes of padding
518
518
- If `(SIVLEN + component_len) % PADBS = 2`: add 1 byte of padding
519
519
520
-
With the default value of PADBS=3, this padding scheme provides partial length-hiding:
521
-
components with consecutive byte lengths produce ciphertexts of the same size. For example,
522
-
with SIVLEN=16, components of length 3, 4, and 5 bytes all produce 21-byte outputs after
523
-
padding. This creates size buckets where multiple plaintext lengths map to the same
524
-
ciphertext length, preventing passive adversaries from determining exact component sizes
525
-
without the secret key.
520
+
With the default value of `PADBS=3`, this padding scheme provides partial length-hiding.
521
+
For example, with `SIVLEN=16`, components "abc", "abcd", and "abcde" all produce 21-byte
522
+
outputs after padding. Without the secret key, a passive adversary cannot determine
523
+
the exact original component size.
526
524
527
525
The final output is encoded using URL-safe base64 {{!RFC4648}}, with '-' replacing
528
526
'+'and '_' replacing '/' for URI compatibility.
@@ -753,10 +751,10 @@ The security of URICrypt is bounded by the following:
753
751
URICrypt makes specific security trade-offs for functionality, including the following:
754
752
755
753
- Deterministic encryption: Same inputs produce same outputs, enabling certain traffic analysis
756
-
- Partial length obfuscation: With PADBS=3, exact component lengths are partially hidden as multiple consecutive lengths produce identical ciphertext sizes
754
+
- Partial length obfuscation: With `PADBS=3`, exact component lengths are partially hidden
757
755
- Prefix structure leakage: The hierarchical structure of URIs is preserved by design
758
756
- SIV length configuration: Implementations MAY adjust `SIVLEN` for different usage bounds. Larger values (24 or 32 bytes) increase birthday bound resistance at the cost of ciphertext expansion. However, 16 bytes is generally recommended as it provides practical collision resistance with acceptable overhead
759
-
- Padding block size configuration: The default PADBS=3 already provides partial length-hiding by grouping consecutive component lengths into the same ciphertext size. Implementations MAY adjust `PADBS` to increase size obfuscation. Larger values create larger size buckets but increase ciphertext expansion. The value MUST remain a multiple of 3 to ensure efficient Base64url encoding without padding characters
757
+
- Padding block size configuration: The default `PADBS=3` already provides partial length-hiding. Implementations MAY adjust `PADBS` to increase size obfuscation. Larger values create larger size buckets but increase ciphertext expansion. The value MUST remain a multiple of 3 to ensure efficient Base64url encoding without padding characters
760
758
761
759
These trade-offs are intentional and necessary for the prefix-preserving functionality. Applications requiring stronger privacy guarantees should evaluate whether URICrypt's properties align with their threat model.
762
760
@@ -791,10 +789,9 @@ but only with knowledge of the secret key. The security properties depend on:
791
789
the SIV mechanism. Any modification, reordering, or truncation of
792
790
components will be detected during decryption.
793
791
794
-
* Length Obfuscation: The default PADBS=3 configuration provides partial
795
-
length-hiding, where components with consecutive byte lengths produce
0 commit comments