Skip to content

Commit

Permalink
Move doc
Browse files Browse the repository at this point in the history
  • Loading branch information
MatMaul committed Sep 5, 2024
1 parent d564768 commit 6caeb65
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions src/pk_encryption.rs
Original file line number Diff line number Diff line change
@@ -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},
Expand All @@ -33,7 +22,16 @@ pub struct Message {
ephemeral_key: Vec<u8>,
}

/// 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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 6caeb65

Please sign in to comment.