Skip to content

Commit a983bda

Browse files
committed
up
1 parent a8cde6a commit a983bda

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

draft-denis-uricrypt.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ For each encrypted component, the decryption process is:
469469
3. Decrypt bytes incrementally to determine component boundaries:
470470
- Generate keystream bytes one at a time from the XOF
471471
- XOR each encrypted byte with its corresponding keystream byte
472-
- Check each decrypted byte for component terminators ('/', '?', '#')
472+
- Check each decrypted byte for component terminators (`'/'`, `'?'`, `'#'`)
473473
- When a terminator is found, the component is complete.
474474
- Skip any padding bytes (null bytes) after the component
475475
4. Update `components_xof` with the complete plaintext component (including terminator)
@@ -481,7 +481,7 @@ For each encrypted component, the decryption process is:
481481

482482
During decryption, component boundaries are discovered dynamically by examining the decrypted plaintext:
483483

484-
- Each component (except possibly the last) ends with a terminator character ('/', '?', or '#')
484+
- Each component (except possibly the last) ends with a terminator character (`'/'`, `'?'`, or `'#'`)
485485
- When a terminator is encountered, we know the component is complete
486486
- After finding the terminator, we skip padding bytes to align to the next 3-byte boundary.
487487
- The padding length can be calculated: `padding = (3 - ((SIV_size + bytes_read) % 3)) % 3`
@@ -538,7 +538,7 @@ the algorithms:
538538

539539
* `remove_padding(data)`: Removes trailing zero bytes from a byte sequence to recover the original data length.
540540

541-
* `join(components)`: Combines multiple path components into a single path string, preserving the terminator characters ('/', '?', '#') that are included in each component.
541+
* `join(components)`: Combines multiple path components into a single path string, preserving the terminator characters (`'/'`, `'?'`, `'#'`) that are included in each component.
542542

543543
## Encryption Algorithm
544544

@@ -595,7 +595,7 @@ Steps:
595595
- `position = position + 1`
596596
- If `decrypted_byte == 0x00`: continue (skip padding)
597597
- `component.append(decrypted_byte)`
598-
- If `decrypted_byte` is '/', '?', or '#':
598+
- If `decrypted_byte` is `'/'`, `'?'`, or `'#'`:
599599
- `total_len = position - component_start`
600600
- `position = position + ((3 - ((SIVLEN + total_len) % 3)) % 3)`
601601
- Break inner loop

0 commit comments

Comments
 (0)