~/bend-docscommunity

src/crypto/aesgcm.bend checks

raw source on the hub · import 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/aesgcm.bend as Aesgcm

2 imports
import Base
import ./aes/gcm.bend as G

Definitions

def aes128_gcm_encrypt source · line 12 · raw

@+key:List<&2, U32> -> @+nonce:List<&2, U32> -> @+aad:List<&2, U32> -> @+pt:List<&2, U32> -> Maybe<&2, List<&2, U32>>

AES-128-GCM: a 16-byte key. Returns ciphertext || tag.

def aes128_gcm_decrypt source · line 16 · raw

@+key:List<&2, U32> -> @+nonce:List<&2, U32> -> @+aad:List<&2, U32> -> @+ct:List<&2, U32> -> Maybe<&2, List<&2, U32>>

The plaintext of ciphertext || tag, or None.

def aes256_gcm_encrypt source · line 20 · raw

@+key:List<&2, U32> -> @+nonce:List<&2, U32> -> @+aad:List<&2, U32> -> @+pt:List<&2, U32> -> Maybe<&2, List<&2, U32>>

AES-256-GCM: a 32-byte key.

def aes256_gcm_decrypt source · line 23 · raw

@+key:List<&2, U32> -> @+nonce:List<&2, U32> -> @+aad:List<&2, U32> -> @+ct:List<&2, U32> -> Maybe<&2, List<&2, U32>>