Skip to main content

TransactionInputDecrypter

Trait TransactionInputDecrypter 

Source
pub trait TransactionInputDecrypter: Send + Sync {
    // Required methods
    fn encryption_key<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<TransactionEncryptionKeyInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn decrypt_transaction_inputs<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ciphertext: &'life1 [u8],
        associated_data: &'life2 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Decryption counterpart to ValidatorSigner for the shared transaction encryption (submission) key.

Unlike the signing key, the key material behind an implementation must be identical across every validator in the set. This lets any validator unseal an encrypted submission, regardless of which validator attested the encryption key to the client.

The interface deliberately does not assume that secret key bytes exist in the validator process: an implementation may hold a local secret (see LocalX25519TransactionInputDecrypter) or delegate decryption to an external system such as a TEE that only exposes a decrypt operation.

Required Methods§

Source

fn encryption_key<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<TransactionEncryptionKeyInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the public metadata of the current encryption key.

Source

fn decrypt_transaction_inputs<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ciphertext: &'life1 [u8], associated_data: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Decrypts transaction inputs sealed against the current encryption key.

The ciphertext is a serialized SealedMessage.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§