Skip to content

Commit ed4996e

Browse files
committed
Use consistent punctuation
1 parent 0d1fd93 commit ed4996e

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

draft-denis-uricrypt.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -571,17 +571,17 @@ Steps:
571571
2. Initialize XOF instances as described in {{xof-init}}
572572
3. `encrypted_output = empty byte array`
573573
4. For each component:
574-
- Update `components_xof` with `component`.
575-
- `SIV = components_xof.clone().read(SIVLEN)`.
576-
- `keystream_xof = base_keystream_xof.clone()`.
577-
- `keystream_xof.update(SIV)`.
578-
- `padding_len = (PADBS - (SIVLEN + len(component)) % PADBS) % PADBS`.
579-
- `keystream = keystream_xof.read(len(component) + padding_len)`.
580-
- `padded_component = component concatenated with zeros(padding_len)`.
581-
- `encrypted_part = padded_component XOR keystream`.
582-
- `encrypted_output = encrypted_output concatenated with SIV concatenated with encrypted_part`.
583-
584-
5. `base64_output = base64url_encode(encrypted_output)`.
574+
- Update `components_xof` with `component`
575+
- `SIV = components_xof.clone().read(SIVLEN)`
576+
- `keystream_xof = base_keystream_xof.clone()`
577+
- `keystream_xof.update(SIV)`
578+
- `padding_len = (PADBS - (SIVLEN + len(component)) % PADBS) % PADBS`
579+
- `keystream = keystream_xof.read(len(component) + padding_len)`
580+
- `padded_component = component concatenated with zeros(padding_len)`
581+
- `encrypted_part = padded_component XOR keystream`
582+
- `encrypted_output = encrypted_output concatenated with SIV concatenated with encrypted_part`
583+
584+
5. `base64_output = base64url_encode(encrypted_output)`
585585
6. If scheme is not empty: Return `scheme + base64_output`
586586
7. Else if original URI started with '/': Return `'/' + base64_output`
587587
8. Else: Return `base64_output`
@@ -599,14 +599,14 @@ Note: For path-only URIs (those starting with '/'), the output format is:
599599
Steps:
600600

601601
1. Split encrypted URI into scheme and base64 part
602-
2. `decoded = base64url_decode(base64_part)`. If decoding fails, return `error`.
602+
2. `decoded = base64url_decode(base64_part)` If decoding fails, return `error`
603603
3. Initialize XOF instances as described in {{xof-init}}
604604
4. `decrypted_components = empty list`
605605
5. `position = 0`
606606
6. While `position < len(decoded)`:
607-
- `SIV = decoded[position:position+SIVLEN]`. If not enough bytes, return `error`.
608-
- `keystream_xof = base_keystream_xof.clone()`.
609-
- `keystream_xof.update(SIV)`.
607+
- `SIV = decoded[position:position+SIVLEN]` If not enough bytes, return `error`
608+
- `keystream_xof = base_keystream_xof.clone()`
609+
- `keystream_xof.update(SIV)`
610610
- `component_start = position + SIVLEN`
611611
- `component = empty byte array`
612612
- `position = position + SIVLEN`
@@ -619,12 +619,12 @@ Steps:
619619
- `total_len = position - component_start`
620620
- `position = position + ((PADBS - ((SIVLEN + total_len) % PADBS)) % PADBS)`
621621
- Break inner loop
622-
- Update `components_xof` with `component`.
623-
- `expected_SIV = components_xof.clone().read(SIVLEN)`.
624-
- If `constant_time_compare(SIV, expected_SIV) == false`, return `error`.
625-
- `decrypted_components.append(component)`.
622+
- Update `components_xof` with `component`
623+
- `expected_SIV = components_xof.clone().read(SIVLEN)`
624+
- If `constant_time_compare(SIV, expected_SIV) == false`, return `error`
625+
- `decrypted_components.append(component)`
626626

627-
7. `decrypted_path = join(decrypted_components)`.
627+
7. `decrypted_path = join(decrypted_components)`
628628
8. Return `scheme + decrypted_path`
629629

630630
# Implementation Details

0 commit comments

Comments
 (0)