Skip to content

Commit f6a5461

Browse files
committed
up
1 parent c9162b3 commit f6a5461

1 file changed

Lines changed: 9 additions & 12 deletions

File tree

draft-denis-uricrypt.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -517,12 +517,10 @@ The padding calculation `(PADBS - (SIVLEN + component_len) % PADBS) % PADBS` ens
517517
- If `(SIVLEN + component_len) % PADBS = 1`: add 2 bytes of padding
518518
- If `(SIVLEN + component_len) % PADBS = 2`: add 1 byte of padding
519519

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.
526524

527525
The final output is encoded using URL-safe base64 {{!RFC4648}}, with '-' replacing
528526
'+' and '_' replacing '/' for URI compatibility.
@@ -753,10 +751,10 @@ The security of URICrypt is bounded by the following:
753751
URICrypt makes specific security trade-offs for functionality, including the following:
754752

755753
- 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
757755
- Prefix structure leakage: The hierarchical structure of URIs is preserved by design
758756
- 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
760758

761759
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.
762760

@@ -791,10 +789,9 @@ but only with knowledge of the secret key. The security properties depend on:
791789
the SIV mechanism. Any modification, reordering, or truncation of
792790
components will be detected during decryption.
793791

794-
* Length Obfuscation: The default PADBS=3 configuration provides partial
795-
length-hiding, where components with consecutive byte lengths produce
796-
identical ciphertext sizes. Applications requiring stronger length-hiding
797-
SHOULD consider using larger PADBS values or padding components to fixed lengths.
792+
* Length Obfuscation: The default `PADBS=3` configuration provides partial
793+
length-hiding. Applications requiring stronger length-hiding
794+
SHOULD consider using larger `PADBS` values or padding components to fixed lengths.
798795

799796
* Key Reuse: Using the same key with different contexts is safe, but
800797
using the same (key, context) pair for different applications is

0 commit comments

Comments
 (0)