Skip to content

[Zig] Add high-level AES-GCM API #363

@roninjin10

Description

@roninjin10

Summary

Add high-level AES-GCM API in Zig to match TypeScript's user-friendly interface.

TS High-Level API

  • generateKey - Generate random AES key
  • importKey - Import key from bytes
  • exportKey - Export key to bytes
  • encrypt - Simple encrypt with auto nonce
  • decrypt - Simple decrypt
  • generateNonce - Generate random nonce
  • deriveKey - Derive key from password (PBKDF2)

Current State

Zig has low-level functions only:

  • encrypt128, decrypt128
  • encrypt256, decrypt256

Users must manage nonces, key generation manually.

Goal

Provide both low-level (current) and high-level (new) APIs.

Note: Issue created by Claude AI assistant, not @roninjin10 or @fucory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions