Skip to content

miniproto_native::crypto::aes_256_gcm_decrypt

  • Crate: miniproto_native
  • Rust visibility: restricted
  • Source: rust/miniproto/src/crypto.rs
  • Python exposure: miniproto._native.aes_256_gcm_decrypt (confirmed from adjacent PyO3 attributes)
fn aes_256_gcm_decrypt(py: _, ciphertext_and_tag: _, key: _, nonce: _, associated_data: _) -> _
  • py: The acquired GIL token used to detach large authenticated-decryption work.
  • ciphertext_and_tag: GCM ciphertext followed by its authentication tag.
  • key: The 32-byte AES-256 key.
  • nonce: The 12-byte GCM nonce.
  • associated_data: Authenticated bytes that are not encrypted.
fn aes_256_gcm_decrypt(py: Python<'_>, ciphertext_and_tag: Vec<u8>, key: Vec<u8>, nonce: Vec<u8>, associated_data: Vec<u8>) -> PyResult<Vec<u8>>

Defined in rust/miniproto/src/crypto.rs:412-423

Authenticated-decrypts Python aes_256_gcm_decrypt ciphertext-and-tag bytes.

Returns plaintext or ValueError for invalid key/nonce material or authentication failure; large work releases the GIL.

  • py: The acquired GIL token used to detach large authenticated-decryption work.
  • ciphertext_and_tag: GCM ciphertext followed by its authentication tag.
  • key: The 32-byte AES-256 key.
  • nonce: The 12-byte GCM nonce.
  • associated_data: Authenticated bytes that are not encrypted.