INNER CODE UNIT · Rust

new_megolm

matrix-org/vodozemac · src/cipher/mod.rs:133

    pub fn new_megolm(&key: &[u8; 128]) -> Self {
        let keys = CipherKeys::new_megolm(&key);

        Self { keys }
    }

    /// Creates a new [`Cipher`] from the given raw key. The key is expected to
    /// be 32 bytes in length, but we expect an unsized slice for
    /// compatibility with the libolm API.
    ///
    /// The key is deterministically expanded into a 32-byte AES key, a 32-byte
    /// MAC key, and a 16-byte initialization vector (IV) using HKDF, with
    /// the byte string "Pickle" used as the info during key derivation.
    ///
    /// This key derivation format is typically used for libolm-compatible
    /// encrypted pickle formats.
    #[allow(unreachable_pub)]
    pub fn new_pickle(key: &[u8]) -> Self {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…