Skip to main content

EncryptedRangePlan

Struct EncryptedRangePlan 

Source
pub struct EncryptedRangePlan {
    pub chunk_idx_start: u32,
    pub chunk_idx_last_inclusive: u32,
    pub enc_byte_start: u64,
    pub enc_byte_end_exclusive: u64,
    pub pre_encrypt_slice_start_in_concat: u64,
    pub pre_encrypt_slice_end_in_concat: u64,
}
Expand description

v0.9 #106: encrypted partial-fetch plan for the SSE-S4 chunked (S4E6) Range GET fast-path. Given a RangePlan (which describes the pre-encrypt byte range to fetch) plus the per-object SSE binding, computes the actual encrypted byte range to send the backend, the S4E6 chunk index range to walk, and where the pre-encrypt byte range lands inside the decrypted chunk concatenation.

Caller workflow:

  1. backend partial GET body[enc_byte_start..enc_byte_end_exclusive) plus the S4E6 fixed header (already cached in the sidecar’s SseChunkBinding, no extra fetch).
  2. for chunk_idx in chunk_idx_start..=chunk_idx_last_inclusive, decrypt_chunk(chunk_idx, &body[..]) — the sidecar’s salt + key_id provide the AAD / nonce material.
  3. concatenate the decrypted plaintext, slice off pre_encrypt_slice_start_in_concat..pre_encrypt_slice_end_in_concat to land at the RangePlan’s byte_start..byte_end_exclusive (= pre-encrypt) range.
  4. frame-parse + decompress + final slice via the existing RangePlan machinery.

Fields§

§chunk_idx_start: u32

First S4E6 chunk that overlaps the requested pre-encrypt range (inclusive).

§chunk_idx_last_inclusive: u32

Last S4E6 chunk that overlaps the requested pre-encrypt range (inclusive).

§enc_byte_start: u64

Byte offset within the encrypted backend body where the fetch starts (covers chunk chunk_idx_start’s tag + ciphertext).

§enc_byte_end_exclusive: u64

Byte offset (exclusive) within the encrypted backend body where the fetch ends (covers through chunk chunk_idx_last_inclusive).

§pre_encrypt_slice_start_in_concat: u64

Offset within the decrypted-chunk concatenation where the pre-encrypt slice starts (= RangePlan.byte_start - chunk_idx_start * enc_chunk_size).

§pre_encrypt_slice_end_in_concat: u64

Offset within the decrypted-chunk concatenation where the pre-encrypt slice ends (exclusive).

Trait Implementations§

Source§

impl Clone for EncryptedRangePlan

Source§

fn clone(&self) -> EncryptedRangePlan

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EncryptedRangePlan

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for EncryptedRangePlan

Source§

impl PartialEq for EncryptedRangePlan

Source§

fn eq(&self, other: &EncryptedRangePlan) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for EncryptedRangePlan

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.