Function precompile_decrypt
pub fn precompile_decrypt(
input: &Bytes,
gas_limit: u64,
) -> Result<PrecompileOutput, PrecompileErrors>
Expand description
§AES-256-GCM Decryption Precompile
Input Layout (mirrors encryption):
[0..32] : AES-256 key (32 bytes)
[32..44] : 12-byte nonce
[44.. ] : ciphertext + tag
We decrypt [44..]
using the key & nonce.
If the tag doesn’t match, decryption fails with an error.
Gas Model: Refer to the encryption file for further discussion.