---
title: The gen1 scheme
description: Derive a Class C identifier from a recipe's normalized fields, reproduce the published hash and read what it does and does not identify.
url: https://docs.intuition.systems/docs/identifier/gen1
markdown_url: https://docs.intuition.systems/docs/identifier/gen1.md
version: V2
llms_index: https://docs.intuition.systems/llms.txt
kind: reference
reader:
  - app
  - agent
  - plugin
packages:
  - '@0xintuition/iid@0.1.1'
  - '@0xintuition/iid-ladder@0.1.1'
---

`gen1` produces an identifier when no registry or natural key covers a thing. It hashes a small, fixed set of facts chosen by an entity type's recipe. **A `gen1` identifier does not identify an entity. It identifies the facts it was derived from.** Two films called *Inception* from 2010 would receive the same `gen1` IID, and that is intended. [IID spec §6.1](https://github.com/0xIntuition/intuition-identifier/blob/3e593247c0e7cb168b37368937167ed146d3868a/spec/06-gen1.md#61-purpose-and-honest-framing)

## Value format

A `gen1` IID looks like `int:gen1:movie:r4:fb681afe7d438cad73ae90a70f1cc55a`.

| Part | Example | Purpose |
| --- | --- | --- |
| `gen1` | `gen1` | Names the normalization and derivation version. A future `gen2` would coexist with it. |
| Slug | `movie` | The entity type. It namespaces the hash, so a movie and a book with the same title get different identifiers. |
| Rung tag | `r4` | The frozen recipe that fired. It shows which fields were used. |
| Hash | `fb681afe…cc55a` | The first 16 bytes of the Keccak-256 digest, as 32 lowercase hex characters. |

The value grammar is `slug ":" "r" tag ":" hash16`. The tag is a positive integer without leading zeros. [IID spec §6.2](https://github.com/0xIntuition/intuition-identifier/blob/3e593247c0e7cb168b37368937167ed146d3868a/spec/06-gen1.md#62-value-format)

## Derive an identifier

Follow the five steps exactly. Every implementation must produce the same bytes. [IID spec §6.3](https://github.com/0xIntuition/intuition-identifier/blob/3e593247c0e7cb168b37368937167ed146d3868a/spec/06-gen1.md#63-derivation)

1. **Resolve the recipe fields.** Collect every field the rung names. Fields are scalars. If any field is missing or empty after normalization, the rung does not fire and the ladder moves on.
2. **Normalize each value.** Apply [NORM-1](https://docs.intuition.systems/docs/identifier/normalization) to text. Format dates and numbers as NORM-1 specifies.
3. **Build the preimage.** Serialize `{"c":"<slug>","f":{...}}` as UTF-8. Put `c` before `f`. Sort the keys inside `f` by UTF-16 code units. Use no whitespace anywhere and RFC 8785 (JCS) string escaping. `f` contains only the rung's fields, and at least one.
4. **Hash.** Compute Keccak-256 of the preimage and keep the first 16 bytes, as lowercase hex without `0x`.
5. **Assemble.** Concatenate `int:gen1:`, the slug, `:r`, the tag, `:` and the hash. **The rung tag is not part of the preimage.**

## Worked example

The movie ladder's `r4` recipe uses `name` and `yearPublished`. For *Inception*, released in 2010, the preimage and result are shown below. [IID spec §6.5](https://github.com/0xIntuition/intuition-identifier/blob/3e593247c0e7cb168b37368937167ed146d3868a/spec/06-gen1.md#65-worked-example)

```text
name           "Inception"  → "inception"
yearPublished  2010         → "2010"

preimage   {"c":"movie","f":{"name":"inception","yearPublished":"2010"}}
keccak256  fb681afe7d438cad73ae90a70f1cc55a…   (first 16 bytes kept)
IID        int:gen1:movie:r4:fb681afe7d438cad73ae90a70f1cc55a
```

You can reproduce the hash with any Keccak-256 tool. With Foundry, `cast keccak '{"c":"movie","f":{"name":"inception","yearPublished":"2010"}}'` returns a digest beginning with `fb681afe7d438cad73ae90a70f1cc55a`. The film's director is not part of the recipe, because identity inputs must be intrinsic to the entity. [Tenet 3](https://github.com/0xIntuition/intuition-identifier/blob/3e593247c0e7cb168b37368937167ed146d3868a/spec/00-overview.md#tenet-3--identity-inputs-are-intrinsic-only)

**Prompt for your agent:** Implement gen1 and reproduce the worked example

```text
Goal: implement gen1 derivation and reproduce the published worked example exactly.
Read https://docs.intuition.systems/docs/identifier/gen1.md, https://docs.intuition.systems/docs/identifier/normalization.md and https://docs.intuition.systems/docs/identifier/entity-types.md.
Implement NORM-1 in its frozen step order, with full Unicode case folding instead of simple lowercasing.
Build the preimage exactly as specified: c before f, keys in f sorted by UTF-16 code units, no whitespace and JCS string escaping.
Hash with Keccak-256 and keep the first 16 bytes as lowercase hex. The rung tag is not part of the preimage.
Test that movie r4 with name Inception and yearPublished 2010 gives int:gen1:movie:r4:fb681afe7d438cad73ae90a70f1cc55a.
Add NORM-1 tests from the worked examples on the normalization page.
Report the checks you actually ran and anything you could not verify.
```

## Rung tags are frozen

A rung tag identifies a recipe permanently. It is not the rung's position in the ladder. A new recipe receives the next unused tag and existing tags are never renumbered, so tags can be non-contiguous or appear out of order. For example, the book ladder's fourth rung is tagged `r3`. Reordering a ladder therefore never changes an identifier that was already minted. [IID spec §6.4](https://github.com/0xIntuition/intuition-identifier/blob/3e593247c0e7cb168b37368937167ed146d3868a/spec/06-gen1.md#64-stable-rung-tags)

## Store gen1 atoms at P1

**A `gen1` identifier must not be minted as a bare P0 anchor.** Its atom payload must include the recipe fields, so that anyone can re-run the derivation and a reader can see which facts it stands for. See [Representation profiles](https://docs.intuition.systems/docs/concepts/representation-profiles). [IID spec §6.6](https://github.com/0xIntuition/intuition-identifier/blob/3e593247c0e7cb168b37368937167ed146d3868a/spec/06-gen1.md#66-mandatory-p1-representation)

## Collisions

Semantic collisions are common and intended: different entities that share the same recipe facts get one identifier. Cryptographic collisions are negligible, roughly 1 in 2^64 with 2^32 entities of one type. Implementations must not detect or repair semantic collisions by changing the identifier, for example by adding a timestamp. A stronger identifier contributed later separates the entities through an equivalence claim. [IID spec §6.7](https://github.com/0xIntuition/intuition-identifier/blob/3e593247c0e7cb168b37368937167ed146d3868a/spec/06-gen1.md#67-collision-characteristics)

## Validate a gen1 value

A validator can check only the shape of a `gen1` value. After trimming, it accepts a value matching `^[a-z0-9-]+:r[1-9][0-9]*:[0-9a-f]{32}$` and rejects uppercase hex rather than folding it. It cannot check the hash without the original facts, which is another reason the payload carries them. [gen1 scheme document](https://github.com/0xIntuition/intuition-identifier/blob/3e593247c0e7cb168b37368937167ed146d3868a/schemes/gen1.md)

`gen1` itself is frozen. An improved derivation would ship as NORM-2 and `gen2`, alongside `gen1`, bridged by equivalence claims. [IID spec §6.8](https://github.com/0xIntuition/intuition-identifier/blob/3e593247c0e7cb168b37368937167ed146d3868a/spec/06-gen1.md#68-versioning-gen1)

## Related

- [Entity types and identity ladders](https://docs.intuition.systems/docs/identifier/entity-types) lists the `gen1` recipes for every type.
- [The identity ladder](https://docs.intuition.systems/docs/concepts/identity-ladder) shows when a name-only recipe fires for a recording.
- [Derive IDs](https://docs.intuition.systems/docs/build/derive-ids) computes identifiers and atom IDs with the packages.

Applies to V2 · `@0xintuition/iid` 0.1.1 · `@0xintuition/iid-ladder` 0.1.1
