SecretRotation

Trait SecretRotation 

Source
pub trait SecretRotation: Send + Sync {
    // Required method
    fn derive(
        &self,
        topic_hash: [u8; 32],
        unix_minute: u64,
        initial_secret_hash: [u8; 32],
    ) -> [u8; 32];
}
Expand description

Trait for deriving time-rotated encryption keys.

Implementations control how encryption keys rotate based on time, providing key isolation across time slots.

Required Methods§

Source

fn derive( &self, topic_hash: [u8; 32], unix_minute: u64, initial_secret_hash: [u8; 32], ) -> [u8; 32]

Derive an encryption key for a specific time slot.

§Arguments
  • topic_hash - 32-byte topic identifier
  • unix_minute - Time slot (minute precision)
  • initial_secret_hash - 32-byte hashed initial secret
§Returns

A 32-byte derived key unique to this topic/time combination.

Implementors§