From 6caeb650366543b8bdca426f43e3dd79f5d082ad Mon Sep 17 00:00:00 2001 From: Mathieu Velten Date: Thu, 5 Sep 2024 12:10:19 +0200 Subject: [PATCH] Move doc --- src/pk_encryption.rs | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/src/pk_encryption.rs b/src/pk_encryption.rs index e5252d7..5f3798d 100644 --- a/src/pk_encryption.rs +++ b/src/pk_encryption.rs @@ -1,14 +1,3 @@ -//! ☣️ Compat support for libolm's PkEncryption and PkDecryption -//! -//! This implements the `m.megolm_backup.v1.curve25519-aes-sha2` described in -//! the Matrix [spec]. This is a asymmetric encryption scheme based on -//! Curve25519. -//! -//! **Warning**: Please note the algorithm contains a critical flaw and does not -//! provide authentication of the ciphertext. -//! -//! [spec]: https://spec.matrix.org/v1.11/client-server-api/#backup-algorithm-mmegolm_backupv1curve25519-aes-sha2 - use pyo3::{ pyclass, pymethods, types::{PyBytes, PyType}, @@ -33,7 +22,16 @@ pub struct Message { ephemeral_key: Vec, } -/// The decryption component of the PkEncryption support. +/// ☣️ Compat support for libolm's PkDecryption. +/// +/// This implements the `m.megolm_backup.v1.curve25519-aes-sha2` described in +/// the Matrix [spec]. This is a asymmetric encryption scheme based on +/// Curve25519. +/// +/// **Warning**: Please note the algorithm contains a critical flaw and does not +/// provide authentication of the ciphertext. +/// +/// [spec]: https://spec.matrix.org/v1.11/client-server-api/#backup-algorithm-mmegolm_backupv1curve25519-aes-sha2 #[pyclass] pub struct PkDecryption { inner: vodozemac::pk_encryption::PkDecryption, @@ -95,7 +93,16 @@ impl PkDecryption { } } -/// The encryption component of PkEncryption support. +/// ☣️ Compat support for libolm's PkEncryption. +/// +/// This implements the `m.megolm_backup.v1.curve25519-aes-sha2` described in +/// the Matrix [spec]. This is a asymmetric encryption scheme based on +/// Curve25519. +/// +/// **Warning**: Please note the algorithm contains a critical flaw and does not +/// provide authentication of the ciphertext. +/// +/// [spec]: https://spec.matrix.org/v1.11/client-server-api/#backup-algorithm-mmegolm_backupv1curve25519-aes-sha2 #[pyclass] pub struct PkEncryption { inner: vodozemac::pk_encryption::PkEncryption,