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:
- backend partial GET
body[enc_byte_start..enc_byte_end_exclusive)plus the S4E6 fixed header (already cached in the sidecar’sSseChunkBinding, no extra fetch). - 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. - concatenate the decrypted plaintext, slice off
pre_encrypt_slice_start_in_concat..pre_encrypt_slice_end_in_concatto land at theRangePlan’sbyte_start..byte_end_exclusive(= pre-encrypt) range. - frame-parse + decompress + final slice via the existing
RangePlanmachinery.
Fields§
§chunk_idx_start: u32First S4E6 chunk that overlaps the requested pre-encrypt range (inclusive).
chunk_idx_last_inclusive: u32Last S4E6 chunk that overlaps the requested pre-encrypt range (inclusive).
enc_byte_start: u64Byte offset within the encrypted backend body where the
fetch starts (covers chunk chunk_idx_start’s tag + ciphertext).
enc_byte_end_exclusive: u64Byte offset (exclusive) within the encrypted backend body where
the fetch ends (covers through chunk chunk_idx_last_inclusive).
pre_encrypt_slice_start_in_concat: u64Offset 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: u64Offset within the decrypted-chunk concatenation where the pre-encrypt slice ends (exclusive).
Trait Implementations§
Source§impl Clone for EncryptedRangePlan
impl Clone for EncryptedRangePlan
Source§fn clone(&self) -> EncryptedRangePlan
fn clone(&self) -> EncryptedRangePlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EncryptedRangePlan
impl Debug for EncryptedRangePlan
impl Eq for EncryptedRangePlan
Source§impl PartialEq for EncryptedRangePlan
impl PartialEq for EncryptedRangePlan
Source§fn eq(&self, other: &EncryptedRangePlan) -> bool
fn eq(&self, other: &EncryptedRangePlan) -> bool
self and other values to be equal, and is used by ==.