pub struct MasterKeySet {
pub k_tag: SecretKey,
pub k_val: SecretKey,
pub k_state: SecretKey,
pub k_srch: SecretKey,
}Expand description
The four secret keys that drive the entire RO(SE)² protocol. All four are derived deterministically from a user password + salt, so they can be re-derived on any device that knows the password.
Fields§
§k_tag: SecretKeyK_tag — derives EDB entry addresses (tags).
tag = HMAC-SHA256(k_tag, "tag:" || keyword || index || epoch)
k_val: SecretKeyK_val — encrypts document payloads stored in EDB entries.
val_key = HMAC-SHA256(k_val, "val:" || keyword || index || epoch)
k_state: SecretKeyK_state — encrypts the local ClientStateTable before persistence.
k_srch: SecretKeyK_srch — derives per-search blinding factors (used in SWiSSSE phase).
Implementations§
Source§impl MasterKeySet
impl MasterKeySet
Sourcepub fn derive(password: &str, salt: &[u8; 16]) -> Result<Self, VaultError>
pub fn derive(password: &str, salt: &[u8; 16]) -> Result<Self, VaultError>
Derive a full MasterKeySet from a UTF-8 password and a 16-byte salt.
The salt must be unique per vault and stored alongside the encrypted state. It does NOT need to be secret.
§Errors
Returns VaultError::Kdf if Argon2 parameters are rejected (internal).