# xyz.quasigod.lab.letta.encryptionWrap

> Published by [quasigod.spaces-alpha.bsky.network](https://lexicon.garden/identity/did:plc:7pezv7mb4agwyktraauhl26g)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7pezv7mb4agwyktraauhl26g/xyz.quasigod.lab.letta.encryptionWrap)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7pezv7mb4agwyktraauhl26g/xyz.quasigod.lab.letta.encryptionWrap/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7pezv7mb4agwyktraauhl26g/xyz.quasigod.lab.letta.encryptionWrap/examples)

## Definitions

### `xyz.quasigod.lab.letta.encryptionWrap`

**Type**: `record`

**Key**: `literal:self`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `alg` | `string` | Yes | AEAD algorithm used to wrap the master key |
| `kdf` | `string` | Yes | Key derivation function used to derive the wrapping key from the passphrase |
| `salt` | `string` | Yes | Random 16-byte KDF salt, base64url. Public; losing it makes unwrap impossible. |
| `kdfLanes` | `integer` | No | Argon2id parallelism |
| `createdAt` | `string` (datetime) | Yes |  |
| `kdfMemory` | `integer` | No | Argon2id memory cost in KiB |
| `wrappedMek` | `string` | Yes | The 32-byte master encryption key sealed with the passphrase-derived key, base64url |
| `kdfIterations` | `integer` | No | Argon2id iteration count |

## Raw Schema

```json
{
  "id": "xyz.quasigod.lab.letta.encryptionWrap",
  "defs": {
    "main": {
      "key": "literal:self",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "kdf",
          "salt",
          "wrappedMek",
          "alg",
          "createdAt"
        ],
        "properties": {
          "alg": {
            "type": "string",
            "description": "AEAD algorithm used to wrap the master key",
            "knownValues": [
              "A256GCM"
            ]
          },
          "kdf": {
            "type": "string",
            "description": "Key derivation function used to derive the wrapping key from the passphrase",
            "knownValues": [
              "argon2id"
            ]
          },
          "salt": {
            "type": "string",
            "description": "Random 16-byte KDF salt, base64url. Public; losing it makes unwrap impossible."
          },
          "kdfLanes": {
            "type": "integer",
            "description": "Argon2id parallelism"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "kdfMemory": {
            "type": "integer",
            "description": "Argon2id memory cost in KiB"
          },
          "wrappedMek": {
            "type": "string",
            "description": "The 32-byte master encryption key sealed with the passphrase-derived key, base64url"
          },
          "kdfIterations": {
            "type": "integer",
            "description": "Argon2id iteration count"
          }
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
