Trace technique d’un flux Ezkey complet

Note technique · 5 octobre 2026

Tous les textes sur l’authentification forte promettent de la cryptographie. Plus rares sont ceux qui montrent, de façon lisible, où la cryptographie intervient vraiment, ce qui est signé, par quelle clé, et à quel moment le backend ou le mobile doivent décider de faire confiance.

Ezkey se prête assez bien à cet exercice, justement parce que le produit assume une posture backend-first. L'état utile reste côté serveur, les étapes importantes sont exposées par API, et le mobile ne se contente pas d'« afficher une demande »: il participe à une chaîne cryptographique explicite.

Ce qui suit n'est pas une visite produit grand public. C'est une trace technique commentée d'un flux complet validé sur stack local: enrôlement, association de l'appareil, récupération de branding signé, puis demande d'authentification approuvée. L'objectif n'est pas de publier un dump intégral de JSON, mais de montrer la structure du protocole sans perdre le lecteur dans les détails inutiles.

Pour qui est ce texte

Ce texte s'adresse à des lecteurs qui ont déjà le bon niveau de contexte pour l'apprécier:

Si vous découvrez Ezkey pour la première fois, ce n'est probablement pas la meilleure porte d'entrée. L'intention ici est différente: montrer un flux réel en résolution technique, pas résumer la proposition de valeur du produit.

Ce que cette trace montre, et ce qu'elle ne montre pas

Le scénario est volontairement sobre.

Un opérateur authentifié côté Admin API crée un enrôlement rattaché à une intégration. Un appareil simulé exécute ensuite les appels bind, verify, pending et respond contre l’Auth API, avec la Crypto API utilisée seulement comme oracle de laboratoire pour reconstruire les chaînes canoniques et vérifier les signatures.

Le cas d’usage retenu est lui aussi simple: un utilisateur approuve l'accès à une intégration. Pas de message métier riche, pas de validation de paiement, pas de storytelling supplémentaire. Le but est de laisser le protocole parler de lui-même.

Ne sont pas montrés ici:

Vue d’ensemble du flux

Le chemin complet tient en huit mouvements:

  1. l’opérateur crée un enrôlement en état pending;
  2. il récupère l’enrollmentProofToken et le défi associé;
  3. l’appareil appelle bind et vérifie la signature Ed25519 fournie par l’intégration;
  4. l’appareil génère sa paire de clés, signe la chaîne canonique de verify, puis active l’enrôlement;
  5. l’appareil récupère ensuite l’instance-info signé pour ne pas dépendre d’un branding non authentifié;
  6. l’opérateur crée une tentative d’authentification pour cet enrôlement;
  7. l’appareil réclame une fois le pending, vérifie la signature intégration, puis signe sa réponse;
  8. le backend confirme le résultat côté mobile et côté attente opérateur.

Le point important n’est pas seulement l’ordre des appels. C’est la continuité entre eux.

1. L’enrôlement n’est pas un simple enregistrement

Dans Ezkey, un enrôlement n’est pas un drapeau posé dans une base. C’est le début d’une relation cryptographique entre une intégration, un appareil et une suite de transitions d’état qui devront rester cohérentes plus tard.

L’opérateur crée d’abord la ligne d’enrôlement. Le backend renvoie un identifiant, un défi, puis, via une lecture administrative, le enrollmentProofToken dont l’appareil aura besoin ensuite.

Ce détail est important parce qu’il expose déjà une idée structurante d’Ezkey: le flux ne repose pas sur une simple possession de l’identifiant de ligne. Il faut aussi le bon matériau de preuve pour poursuivre.

2. bind: première ancre de confiance côté intégration

Quand l’appareil appelle bind, il n’obtient pas seulement un peu de contexte d’affichage. Il reçoit un paquet de données signé par l’intégration, avec notamment:

La charge canonique correspondante suit une logique simple et explicite:

<enrollmentProofToken>|<enrollmentId>|<integrationPublicKey>|ed25519|<integrationName>|<integrationDescription>|<enrollmentName>|<tenantId>|<tenantName>|<tenantDescription>|<isSystemIntegration>|<adminType>

Le lecteur n’a pas besoin de retenir chaque segment pour comprendre l’intérêt de cette forme: le mobile ne fait pas confiance à un JSON arbitraire. Il reconstruit une ligne UTF-8 déterministe, puis vérifie la signature Ed25519 avec la clé publique d’intégration reçue dans la même réponse.

Autrement dit, la confiance affichée au téléphone doit d’abord être une confiance vérifiée.

3. verify: l’appareil prouve qu’il possède bien sa clé

Après bind, l’appareil génère sa propre paire de clés ECDSA P-256. La suite du flux n’est plus seulement “l’intégration parle au mobile”, mais “le mobile prouve à son tour qu’il contrôle bien la clé qu’il présente”.

La chaîne canonique de verify est courte:

<enrollmentProofToken>|<enrollmentId>|<challengeResponse>|<devicePublicKey>

Elle est signée côté appareil, puis envoyée à l’Auth API. Si la vérification passe, le backend active l’enrôlement et retourne un résultat signé par l’intégration. La logique est symétrique: chaque acteur signe ce qui relève de sa responsabilité.

C’est l’un des traits les plus lisibles du produit. On n’a pas un backend qui “fait globalement confiance” à un appareil déclaré. On a une séquence où le mobile doit satisfaire un engagement cryptographique précis avant que l’état de l’enrôlement ne change.

4. L’instance-info signé évite un branding implicitement fiable

Une fois l’enrôlement activé, le mobile doit parfois afficher des informations d’instance: nom, description, URL associée, base URL Auth publique si elle existe. Ezkey prévoit ici un chemin signé pour les clients enrôlés.

La charge canonique ressemble à ceci:

<enrollmentProofToken>|<enrollmentId>|INSTANCE_INFO|<authApiPublicBaseUrl>|<instanceName>|<instanceDescription>|<aboutUrl>

Ce point mérite d’être souligné car il est facilement négligé dans d’autres systèmes: l’habillage ou le branding ne sont pas forcément “de simples détails UI”. Dès lors qu’un client enrôlé s’appuie sur ces valeurs, Ezkey choisit de leur donner aussi une voie d’authenticité.

5. pending: la demande d’authentification est elle aussi signée

Le backend crée ensuite une tentative d’authentification. Dans le scénario retenu ici, il s’agit d’un cas de base: l’utilisateur approuve l’accès à l’intégration, sans message métier complémentaire.

L’appareil ne reçoit pas directement la décision à signer. Il doit d’abord réclamer le pending avec un deviceProofToken frais, lui-même signé côté appareil. Si la requête est valide, l’Auth API renvoie le authAttemptProofToken ainsi qu’une signature d’intégration.

La charge canonique associée au pending reste simple:

<authAttemptProofToken>|<challengeRequired>|<contextTitle>|<contextMessage>

Dans le cas validé ici, contextTitle et contextMessage sont absents. C’est voulu. Le lecteur voit ainsi la forme la plus nue du protocole, sans emphase sur un décor métier qui n’est pas nécessaire pour comprendre la chaîne de confiance.

Le point clé est ailleurs: le pending est consommé une fois. Une lecture réussie fait passer la tentative dans un état qui empêche de traiter indéfiniment la même demande comme si elle était nouvelle. Le respond qui suit s’ancre donc sur un matériau déjà lié à cette réclamation précise.

6. respond: une décision minimale, mais liée exactement au bon flux

Une fois le pending vérifié, l’appareil signe sa réponse.

La chaîne canonique est volontairement minimale:

<authAttemptProofToken>|true

Dans le cas d’approbation, le backend reconstruit exactement cette ligne, vérifie la signature ECDSA de l’appareil, puis enregistre le résultat. La réponse HTTP du backend ne s’arrête pas à “ok, c’est approuvé”. Elle transporte à son tour un résultat signé par l’intégration.

Le résultat mobile exposé par l’Auth API est APPROVED. La surface d’attente côté opérateur, elle, résout le même cycle sous l’étiquette ACCEPTED.

Deux mots, une seule réalité: la tentative s’est refermée sur la branche de succès.

Pourquoi ce niveau de détail vaut la peine

Ce genre de trace intéresse peu de monde en dehors d’un public technique étroit. C’est normal. Mais pour ce public-là, elle dit quelque chose d’important sur le produit.

Elle montre que la valeur de sécurité revendiquée n’est pas posée comme un slogan. Elle est visible dans la structure du protocole:

Autrement dit, Ezkey reste fidèle à son intention produit: une MFA moderne, explicite, backend-first, compréhensible par une équipe qui lit des APIs, des états, et des garanties cryptographiques concrètes.

Où aller ensuite

Cette trace n’est probablement pas le dernier mot sur le sujet. Si elle remplit bien son rôle, plusieurs suites deviennent naturelles:

Mais comme point de départ public, un seul exemple proprement cadré est probablement suffisant: un flux complet, validé, lisible, et intentionnellement réservé à ceux qui viennent chercher ce degré de proximité avec le code.


← ezkey.org (français)

Transcript détaillé validé

Ce qui suit est la trace complète du run local validé. Les secrets, signatures, proof tokens et clés privées sont laissés visibles intentionnellement : ce run provenait d'un stack Docker local jetable, créé pour cette démonstration puis détruit.

Le transcript technique ci-dessous reste dans sa langue protocolaire d'origine afin de préserver l'alignement exact entre les endpoints, les noms de champs, les charges canoniques et les vérifications cryptographiques.

Administration — issuing enrollment credentials

The operator inserts a pending enrollment keyed to integrationId. The create handshake hands back identifiers and enrollment challenge. Bind consumes enrollmentProofToken; that nonce is ordinarily revealed through the administrative GET shown next, rather than echoed wholesale in create.

Illustrative captures often label enrollments using the familiar cryptographic roster personas (Alice, Bob, Carol, … with realistic surnames) so payloads resemble production roster imports without inventing lore.

POST /api/v1/enrollments (create)

{
  "method": "POST",
  "url": "http://localhost:9080/api/v1/enrollments",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Authorization": "Bearer ezkey_14c52717ab34444bb1cebcca5db71140",
    "Content-Type": "application/json",
    "Content-Length": "81"
  },
  "request_body": {
    "integrationId": 2,
    "name": "Alice Chen",
    "authAttemptChallengeRequired": false
  }
}
{
  "status_code": 201,
  "response_body": {
    "enrollmentId": 2,
    "enrollmentChallenge": 436767,
    "expiresAt": "2026-10-12T12:19:24.965206608Z"
  }
}

In create, integrationId scopes issuance to exactly one integration record; name survives into signed payloads with integration-facing title strings; authAttemptChallengeRequired pins whether MFA attempts may escalate to auxiliary short challenges downstream.


GET /api/v1/enrollments/:id

{
  "method": "GET",
  "url": "http://localhost:9080/api/v1/enrollments/2",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Authorization": "Bearer ezkey_14c52717ab34444bb1cebcca5db71140"
  },
  "request_body": null
}
{
  "status_code": 200,
  "response_body": {
    "enrollmentId": 2,
    "version": 0,
    "integrationId": 2,
    "enrollmentName": "Alice Chen",
    "enrollmentStatus": "CREATED",
    "enrollmentActive": false,
    "enrollmentChallenge": 436767,
    "enrollmentProofToken": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw",
    "authAttemptChallengeRequired": false,
    "integrationPublicKey": "o_g1NmS1Gm95e2Ftiq9e2UG31cZtE-sJYjn486I4g_o",
    "devicePublicKey": null,
    "devicePrivateKeyStorageTier": null,
    "verifiedAt": null,
    "expiresAt": "2026-10-12T12:19:24.965207Z",
    "createdAt": "2026-10-05T12:19:24.965207Z",
    "createdByAdminId": 1,
    "createdByAdminUsername": "admin.docker",
    "lastUsedAt": null,
    "contactEmail": null,
    "contactPhoneNumber": null,
    "userIdentifier": null,
    "deactivatedAt": null,
    "deactivatedByAdminId": null,
    "deactivatedByAdminUsername": null,
    "revokedAt": null,
    "revokedByAdminId": null,
    "revokedByAdminUsername": null,
    "integrationName": "Orbit Console",
    "tenantId": 1,
    "tenantName": "Ezkey System",
    "isSystemIntegration": false,
    "operational": false
  }
}

Bind prerequisite: enrollmentProofToken is mandatory. Many stacks omit returning it verbatim on POST create responses; authoritative retrieval for operators feeding QR or copy channels is GET on the enrollment identifier.


Device posture — bind, verify, then fetch signed instance branding

On bind, possessing enrollmentProofToken earns the handset integration-backed metadata bundles plus enrollmentBindPayloadSignedByIntegration. Clients rebuild the deterministic canonical bind line: a single UTF‑8 row with | between enrollment proof fragments, hashing aids, ed25519, integration and tenant copy, the isSystemIntegration boolean, and the optional adminType literal when the enrollment is administrator-linked. Ed25519 must validate against integrationPublicKey from the same envelope before any field becomes authoritative.

POST /api/v1/enrollments/bind

{
  "method": "POST",
  "url": "http://localhost:8080/api/v1/enrollments/bind",
  "request_headers": {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Content-Length": "113"
  },
  "request_body": {
    "enrollmentId": 2,
    "enrollmentProofToken": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw"
  }
}
{
  "status_code": 200,
  "response_body": {
    "enrollmentId": 2,
    "integrationPublicKey": "o_g1NmS1Gm95e2Ftiq9e2UG31cZtE-sJYjn486I4g_o",
    "integrationKeyAlgorithm": "ed25519",
    "enrollmentProofToken": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw",
    "integrationName": "Orbit Console",
    "integrationDescription": "Operator sign-in portal for the Europa relay team.",
    "enrollmentName": "Alice Chen",
    "tenantId": 1,
    "tenantName": "Ezkey System",
    "tenantDescription": "Ezkey MFA instance for your organization",
    "isSystemIntegration": false,
    "adminType": null,
    "enrollmentBindPayloadSignedByIntegration": "PCEpS7EHPl15MmVIJBoxBCwiivMg-xVMrEqd_6yArFUuSkj3ty1okCkXRc0Snq6oXUrMAkjkOQvLkIyhJB9dAw"
  }
}

The preceding JSON summarizes human-visible labels and PEM material. Integrity evidence is enrollmentBindPayloadSignedByIntegration. The paired Crypto excerpts below regenerate the canonical UTF‑8 substrate and certify Ed25519 against integrationPublicKey—matching how production SDKs wire their local crypto providers.

Crypto API — bind canonical line and Ed25519 verification

Helper usage: payload-helper with type enrollment-bind materializes the canonical string; verify-ed25519 pins that signature to the bind response’s integration public key and exact bytes.

{
  "method": "POST",
  "url": "http://localhost:9090/api/v1/crypto/payload-helper",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Content-Type": "application/json",
    "Content-Length": "546"
  },
  "request_body": {
    "type": "enrollment-bind",
    "proofToken": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw",
    "enrollmentId": 2,
    "integrationPublicKey": "o_g1NmS1Gm95e2Ftiq9e2UG31cZtE-sJYjn486I4g_o",
    "integrationKeyAlgorithm": "ed25519",
    "integrationName": "Orbit Console",
    "integrationDescription": "Operator sign-in portal for the Europa relay team.",
    "enrollmentName": "Alice Chen",
    "tenantId": 1,
    "tenantName": "Ezkey System",
    "tenantDescription": "Ezkey MFA instance for your organization",
    "isSystemIntegration": false,
    "adminType": null
  }
}
{
  "status_code": 200,
  "response_body": {
    "type": "enrollment-bind",
    "payload": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw|2|o_g1NmS1Gm95e2Ftiq9e2UG31cZtE-sJYjn486I4g_o|ed25519|Orbit Console|Operator sign-in portal for the Europa relay team.|Alice Chen|1|Ezkey System|Ezkey MFA instance for your organization|false|",
    "encoding": "UTF-8 + NFC where applicable"
  }
}
{
  "method": "POST",
  "url": "http://localhost:9090/api/v1/crypto/verify-ed25519",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Content-Type": "application/json",
    "Content-Length": "434"
  },
  "request_body": {
    "data": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw|2|o_g1NmS1Gm95e2Ftiq9e2UG31cZtE-sJYjn486I4g_o|ed25519|Orbit Console|Operator sign-in portal for the Europa relay team.|Alice Chen|1|Ezkey System|Ezkey MFA instance for your organization|false|",
    "signature": "PCEpS7EHPl15MmVIJBoxBCwiivMg-xVMrEqd_6yArFUuSkj3ty1okCkXRc0Snq6oXUrMAkjkOQvLkIyhJB9dAw",
    "publicKey": "o_g1NmS1Gm95e2Ftiq9e2UG31cZtE-sJYjn486I4g_o"
  }
}
{
  "status_code": 200,
  "response_body": {
    "valid": true,
    "message": "Signature is valid",
    "algorithm": "ED25519"
  }
}

Device keys and verify-device canonical line (enrollment-verify-device)

The handset provisions an EC P‑256 keypair (here via Crypto API GET /keypair; shipping apps use keystore / secure enclave surfaces). payload-helper type enrollment-verify-device concatenates enrollmentProofToken|enrollmentId|challengeResponse|devicePublicKey as one canonical UTF‑8 line. POST /crypto/sign produces ECDSA over that exact string; the signature populates enrollmentProofTokenSigned on POST /api/v1/enrollments/verify.

{
  "method": "GET",
  "url": "http://localhost:9090/api/v1/crypto/keypair",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive"
  },
  "request_body": null
}
{
  "status_code": 200,
  "response_body": {
    "privateKey": "MEECAQAwEwYHKoZIzj0CAQYIKoZIzj0DAQcEJzAlAgEBBCCfICmLZC9zocqwPE131NZ0dtwptE1xMOYLGeIHlahLgQ==",
    "publicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEqyRodVYHgW5WgeXGhFRivOdQhLMEnIevjm9Q7HIi5+hD3EZJTUpUDr6ZMAhS/PGWivFOpuhxzaSJQhRH0gAzA=="
  }
}
{
  "method": "POST",
  "url": "http://localhost:9090/api/v1/crypto/payload-helper",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Content-Type": "application/json",
    "Content-Length": "315"
  },
  "request_body": {
    "type": "enrollment-verify-device",
    "proofToken": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw",
    "enrollmentId": 2,
    "challengeResponse": 436767,
    "devicePublicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEqyRodVYHgW5WgeXGhFRivOdQhLMEnIevjm9Q7HIi5+hD3EZJTUpUDr6ZMAhS/PGWivFOpuhxzaSJQhRH0gAzA=="
  }
}
{
  "status_code": 200,
  "response_body": {
    "type": "enrollment-verify-device",
    "payload": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw|2|436767|MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEqyRodVYHgW5WgeXGhFRivOdQhLMEnIevjm9Q7HIi5+hD3EZJTUpUDr6ZMAhS/PGWivFOpuhxzaSJQhRH0gAzA==",
    "encoding": "UTF-8 + NFC where applicable"
  }
}
{
  "method": "POST",
  "url": "http://localhost:9090/api/v1/crypto/sign",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Content-Type": "application/json",
    "Content-Length": "322"
  },
  "request_body": {
    "data": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw|2|436767|MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEqyRodVYHgW5WgeXGhFRivOdQhLMEnIevjm9Q7HIi5+hD3EZJTUpUDr6ZMAhS/PGWivFOpuhxzaSJQhRH0gAzA==",
    "privateKey": "MEECAQAwEwYHKoZIzj0CAQYIKoZIzj0DAQcEJzAlAgEBBCCfICmLZC9zocqwPE131NZ0dtwptE1xMOYLGeIHlahLgQ=="
  }
}
{
  "status_code": 200,
  "response_body": {
    "signature": "MEUCIQDcJKYpIHKWNSw6Flp680DM6Qb988aENBSaLOn8D4cO9gIgehoHaKib88FLmhYrDz3kWh0f15piMR4DAR9W99EFVvQ=",
    "originalData": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw|2|436767|MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEqyRodVYHgW5WgeXGhFRivOdQhLMEnIevjm9Q7HIi5+hD3EZJTUpUDr6ZMAhS/PGWivFOpuhxzaSJQhRH0gAzA==",
    "algorithm": "EC_P256"
  }
}

POST /api/v1/enrollments/verify

Auth API validates ECDSA device evidence, activates enrollment consistent with tenancy policy, then returns enrollmentVerifyPayloadSignedByIntegration attesting integration approval over the canonical verify-result line.

{
  "method": "POST",
  "url": "http://localhost:8080/api/v1/enrollments/verify",
  "request_headers": {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Content-Length": "368"
  },
  "request_body": {
    "enrollmentId": 2,
    "challengeResponse": 436767,
    "devicePublicKey": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEqyRodVYHgW5WgeXGhFRivOdQhLMEnIevjm9Q7HIi5+hD3EZJTUpUDr6ZMAhS/PGWivFOpuhxzaSJQhRH0gAzA==",
    "enrollmentProofTokenSigned": "MEUCIQDcJKYpIHKWNSw6Flp680DM6Qb988aENBSaLOn8D4cO9gIgehoHaKib88FLmhYrDz3kWh0f15piMR4DAR9W99EFVvQ=",
    "devicePrivateKeyStorageTier": "STANDARD"
  }
}
{
  "status_code": 200,
  "response_body": {
    "active": true,
    "enrollmentVerifyMessage": "Enrollment verified successfully",
    "enrollmentVerifyPayloadSignedByIntegration": "EOmqg9APSLR7o9YxL3WWZzwAY400AkP94gSCjLeirpyFEWx67G_JHrQhRHsgPoUPNLvjxIsvbNT5P6vO8UdODA"
  }
}

Crypto API — verify-result integration signature

Rebuild the canonical verify-result line with the same tooling pattern as bind, then certify Ed25519 with the unchanged integration signing key surfaced earlier.

{
  "method": "POST",
  "url": "http://localhost:9090/api/v1/crypto/payload-helper",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Content-Type": "application/json",
    "Content-Length": "208"
  },
  "request_body": {
    "type": "enrollment-verify-result",
    "proofToken": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw",
    "enrollmentId": 2,
    "result": "VERIFIED",
    "message": "Enrollment verified successfully"
  }
}
{
  "status_code": 200,
  "response_body": {
    "type": "enrollment-verify-result",
    "payload": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw|2|VERIFIED|Enrollment verified successfully",
    "encoding": "UTF-8 + NFC where applicable"
  }
}
{
  "method": "POST",
  "url": "http://localhost:9090/api/v1/crypto/verify-ed25519",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Content-Type": "application/json",
    "Content-Length": "285"
  },
  "request_body": {
    "data": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw|2|VERIFIED|Enrollment verified successfully",
    "signature": "EOmqg9APSLR7o9YxL3WWZzwAY400AkP94gSCjLeirpyFEWx67G_JHrQhRHsgPoUPNLvjxIsvbNT5P6vO8UdODA",
    "publicKey": "o_g1NmS1Gm95e2Ftiq9e2UG31cZtE-sJYjn486I4g_o"
  }
}
{
  "status_code": 200,
  "response_body": {
    "valid": true,
    "message": "Signature is valid",
    "algorithm": "ED25519"
  }
}

POST /api/v1/enrollments/instance-info

Once enrollment is active, the official mobile path does not trust unsigned public branding. It calls enrolled instance-info with the same enrollmentProofToken used during bind/verify, receives deployment branding plus instanceInfoPayloadSignedByIntegration, and must verify that Ed25519 signature before applying authApiPublicBaseUrl, instanceName, instanceDescription, or aboutUrl.

{
  "method": "POST",
  "url": "http://localhost:8080/api/v1/enrollments/instance-info",
  "request_headers": {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Content-Length": "94"
  },
  "request_body": {
    "enrollmentProofToken": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw"
  }
}
{
  "status_code": 200,
  "response_body": {
    "enrollmentId": 2,
    "authApiPublicBaseUrl": "https://goateed-katalina-monsoonal.ngrok-free.dev",
    "instanceName": "Ezkey System",
    "instanceDescription": "Ezkey MFA instance for your organization",
    "aboutUrl": null,
    "instanceInfoPayloadSignedByIntegration": "B2NEtVQrO4ZpCnNRjlv8zB0thN2v0O5G-pHSw9rNIiO6Dsv3OW_YGvh9Pe6tnt4Y_M8RH1K0eIn4KvWv7LeNCw"
  }
}

Crypto API — enrolled instance-info integration signature

The lab oracle reconstructs the canonical line proofToken|enrollmentId|INSTANCE_INFO|authApiPublicBaseUrl|instanceName|instanceDescription|aboutUrl, then verifies the returned Ed25519 signature with the same integration key used for bind and verify-result.

{
  "method": "POST",
  "url": "http://localhost:9090/api/v1/crypto/payload-helper",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Content-Type": "application/json",
    "Content-Length": "333"
  },
  "request_body": {
    "type": "enrollment-instance-info",
    "proofToken": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw",
    "enrollmentId": 2,
    "authApiPublicBaseUrl": "https://goateed-katalina-monsoonal.ngrok-free.dev",
    "instanceName": "Ezkey System",
    "instanceDescription": "Ezkey MFA instance for your organization",
    "aboutUrl": null
  }
}
{
  "status_code": 200,
  "response_body": {
    "type": "enrollment-instance-info",
    "payload": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw|2|INSTANCE_INFO|https://goateed-katalina-monsoonal.ngrok-free.dev|Ezkey System|Ezkey MFA instance for your organization|",
    "encoding": "UTF-8 + NFC where applicable"
  }
}
{
  "method": "POST",
  "url": "http://localhost:9090/api/v1/crypto/verify-ed25519",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Content-Type": "application/json",
    "Content-Length": "362"
  },
  "request_body": {
    "data": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw|2|INSTANCE_INFO|https://goateed-katalina-monsoonal.ngrok-free.dev|Ezkey System|Ezkey MFA instance for your organization|",
    "signature": "B2NEtVQrO4ZpCnNRjlv8zB0thN2v0O5G-pHSw9rNIiO6Dsv3OW_YGvh9Pe6tnt4Y_M8RH1K0eIn4KvWv7LeNCw",
    "publicKey": "o_g1NmS1Gm95e2Ftiq9e2UG31cZtE-sJYjn486I4g_o"
  }
}
{
  "status_code": 200,
  "response_body": {
    "valid": true,
    "message": "Signature is valid",
    "algorithm": "ED25519"
  }
}

Administration — opening an MFA attempt

Authentication attempt TTL

After POST creating an MFA attempt the stack enforces timeoutSeconds with an absolute expiresAt. respond on the handset must conclude inside that horizon—TTL metadata for this capture fills the block below.

{
  "timeoutSeconds": 120,
  "expiresAt": "2026-10-05T12:21:25.576731583Z"
}

Opening an MFA authentication attempt for a verified enrollment yields attempt identifiers plus metadata echoed in transcripts. In this template the example remains intentionally plain: the handset is asked to approve access to the integration, not to authorize a richer business transaction. If contextTitle or contextMessage are present, they are still covered by the signed pending payload, but they should read as simple sign-in or access copy.

{
  "method": "POST",
  "url": "http://localhost:9080/api/v1/auth-attempts",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Authorization": "Bearer ezkey_14c52717ab34444bb1cebcca5db71140",
    "Content-Type": "application/json",
    "Content-Length": "48"
  },
  "request_body": {
    "enrollmentId": 2,
    "challengeRequested": false
  }
}
{
  "status_code": 201,
  "response_body": {
    "authAttemptId": 2,
    "authAttemptChallenge": null,
    "timeoutSeconds": 120,
    "expiresAt": "2026-10-05T12:21:25.576731583Z",
    "contextTitle": null,
    "contextMessage": null
  }
}

Device posture — pending then respond

MFA choreography reuses the disciplined pattern above: ECDSA-signed proof token, pending retrieval with authAttemptProofTokenSignedByIntegration requiring Ed25519 confirmation, ECDSA-signed respond, then authAttemptProofTokenResultSignedByIntegration validating the eventual integration stance over the respond-result canonical substrate.

Read-once pending and chaining respond

While an MFA attempt sits PENDING, callers may probe with fresh ephemeral deviceProofToken payloads until Ezkey validates one complete poll. That successful poll flips the attempt from PENDING to READ and returns the one proof token the handset needs for the next step. From that moment, the mobile side must verify the integration Ed25519 signature over the reconstructed pending canonical line before trusting the displayed title, message, or challenge posture. Only then can it sign the follow-up respond payload with the exact authAttemptProofToken it just received.

Cryptography snippets below occupy the same structural role handset firmware plays in deployment.

Crypto API — device proof token and ECDSA

Issue a fresh ephemeral deviceProofToken, ECDSA-signed with enrollment’s device private key—the signature rides pending as proof-of-handset.

{
  "method": "GET",
  "url": "http://localhost:9090/api/v1/crypto/prooftoken",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive"
  },
  "request_body": null
}
{
  "status_code": 200,
  "response_body": {
    "proofToken": "ie7WkkJwjKvbsy36__yconTf69JGw42BU0tzufznfpk.OGdDNT5oJNwFuRocXVpW2A"
  }
}
{
  "method": "POST",
  "url": "http://localhost:9090/api/v1/crypto/sign",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Content-Type": "application/json",
    "Content-Length": "188"
  },
  "request_body": {
    "data": "ie7WkkJwjKvbsy36__yconTf69JGw42BU0tzufznfpk.OGdDNT5oJNwFuRocXVpW2A",
    "privateKey": "MEECAQAwEwYHKoZIzj0CAQYIKoZIzj0DAQcEJzAlAgEBBCCfICmLZC9zocqwPE131NZ0dtwptE1xMOYLGeIHlahLgQ=="
  }
}
{
  "status_code": 200,
  "response_body": {
    "signature": "MEUCIQCx065Msmz+0ks2kKZEAFsxkA3GZvr7ZhPBmgihmRlm8AIgCoFepRI6G7C9h6NncH/tZMRwc9pdpiqIwSkEG9imjRU=",
    "originalData": "ie7WkkJwjKvbsy36__yconTf69JGw42BU0tzufznfpk.OGdDNT5oJNwFuRocXVpW2A",
    "algorithm": "EC_P256"
  }
}

POST /api/v1/auth-attempts/pending

Determine whether MFA state exists for handset plus enrollment linkage. 200 embeds authAttemptProofTokenSignedByIntegration; authenticate Ed25519 on the reconstructed pending canonical line exactly like bind before treating the MFA payload fields as authoritative. If the integration supplied a simple access title or short message, those strings are signed too; they are secondary to the protocol, but not outside it.

{
  "method": "POST",
  "url": "http://localhost:8080/api/v1/auth-attempts/pending",
  "request_headers": {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Content-Length": "329"
  },
  "request_body": {
    "enrollmentId": 2,
    "enrollmentProofToken": "zcVVTLjqNlftuLroSLK3UtM-YaUMf5qyc3G5GZkI8zA.dPiUqyB5iQGh6y9x1rgcXw",
    "deviceProofToken": "ie7WkkJwjKvbsy36__yconTf69JGw42BU0tzufznfpk.OGdDNT5oJNwFuRocXVpW2A",
    "deviceProofTokenSigned": "MEUCIQCx065Msmz+0ks2kKZEAFsxkA3GZvr7ZhPBmgihmRlm8AIgCoFepRI6G7C9h6NncH/tZMRwc9pdpiqIwSkEG9imjRU="
  }
}
{
  "status_code": 200,
  "response_body": {
    "authAttemptId": 2,
    "authAttemptProofToken": "k0mbnhwIeXbrRyGvaLX_itHjUU9SmxTj-u4NxnDEe2M.-6miqe4VXXVkFibCksc3tA",
    "authAttemptProofTokenSignedByIntegration": "wcA8__dnGLsL_Rrjoxq5vg8SMPDVeX58gIS58_bAEgLFUzl3RgaPIYa3OFyI0DU9-dl_fFsYBwkCajYaqYtCCA",
    "authAttemptChallengeRequired": false,
    "contextTitle": null,
    "contextMessage": null
  }
}

Crypto API — pending integration signature verification

{
  "method": "POST",
  "url": "http://localhost:9090/api/v1/crypto/payload-helper",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Content-Type": "application/json",
    "Content-Length": "173"
  },
  "request_body": {
    "type": "pending",
    "proofToken": "k0mbnhwIeXbrRyGvaLX_itHjUU9SmxTj-u4NxnDEe2M.-6miqe4VXXVkFibCksc3tA",
    "challengeRequired": false,
    "contextTitle": "",
    "contextMessage": ""
  }
}
{
  "status_code": 200,
  "response_body": {
    "type": "pending",
    "payload": "k0mbnhwIeXbrRyGvaLX_itHjUU9SmxTj-u4NxnDEe2M.-6miqe4VXXVkFibCksc3tA|false||",
    "encoding": "UTF-8 + NFC where applicable"
  }
}
{
  "method": "POST",
  "url": "http://localhost:9090/api/v1/crypto/verify-ed25519",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Content-Type": "application/json",
    "Content-Length": "249"
  },
  "request_body": {
    "data": "k0mbnhwIeXbrRyGvaLX_itHjUU9SmxTj-u4NxnDEe2M.-6miqe4VXXVkFibCksc3tA|false||",
    "signature": "wcA8__dnGLsL_Rrjoxq5vg8SMPDVeX58gIS58_bAEgLFUzl3RgaPIYa3OFyI0DU9-dl_fFsYBwkCajYaqYtCCA",
    "publicKey": "o_g1NmS1Gm95e2Ftiq9e2UG31cZtE-sJYjn486I4g_o"
  }
}
{
  "status_code": 200,
  "response_body": {
    "valid": true,
    "message": "Signature is valid",
    "algorithm": "ED25519"
  }
}

Respond canonical line (authAttemptProofToken|true|false)

The accept/deny decision reduces to an ECDSA commitment over authAttemptProofToken|accepted. On the acceptance branch, that means the handset signs authAttemptProofToken|true and the server recomputes the exact same two-segment line before recording the result.

{
  "method": "POST",
  "url": "http://localhost:9090/api/v1/crypto/sign",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Content-Type": "application/json",
    "Content-Length": "193"
  },
  "request_body": {
    "data": "k0mbnhwIeXbrRyGvaLX_itHjUU9SmxTj-u4NxnDEe2M.-6miqe4VXXVkFibCksc3tA|true",
    "privateKey": "MEECAQAwEwYHKoZIzj0CAQYIKoZIzj0DAQcEJzAlAgEBBCCfICmLZC9zocqwPE131NZ0dtwptE1xMOYLGeIHlahLgQ=="
  }
}
{
  "status_code": 200,
  "response_body": {
    "signature": "MEUCIQD7KYOGpwtP6tH/yakKXA8tazMiHkDbHRPPt/3M8rxThAIgGgdx9kFNlPMJUlpC8aiZvDcvA7WQrSCIT7mRdFfFMmM=",
    "originalData": "k0mbnhwIeXbrRyGvaLX_itHjUU9SmxTj-u4NxnDEe2M.-6miqe4VXXVkFibCksc3tA|true",
    "algorithm": "EC_P256"
  }
}

POST /api/v1/auth-attempts/respond

{
  "method": "POST",
  "url": "http://localhost:8080/api/v1/auth-attempts/respond",
  "request_headers": {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Content-Length": "223"
  },
  "request_body": {
    "authAttemptId": 2,
    "authAttemptAccepted": true,
    "authAttemptProofTokenSignedByDevice": "MEUCIQD7KYOGpwtP6tH/yakKXA8tazMiHkDbHRPPt/3M8rxThAIgGgdx9kFNlPMJUlpC8aiZvDcvA7WQrSCIT7mRdFfFMmM=",
    "authAttemptChallengeResponse": 0
  }
}
{
  "status_code": 200,
  "response_body": {
    "authAttemptId": 2,
    "authAttemptResult": "APPROVED",
    "authAttemptMessage": "Auth attempt completed",
    "authAttemptProofTokenResultSignedByIntegration": "f0dwir7hNNs20Reso2sXNqftLB0CmpiODNPzkfe2E2msEdk7Aa8ugGBV0VEG5rwipJfzefazQv6_jTCqOVTzAw"
  }
}

Crypto API — respond-result integration signature

The JSON embeds authAttemptProofTokenResultSignedByIntegration. Reproduce the respond-result canonical string using payload-helper type respond-result, then certify Ed25519—closing the MFA loop exactly as integrations signed earlier segments.

{
  "method": "POST",
  "url": "http://localhost:9090/api/v1/crypto/payload-helper",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Content-Type": "application/json",
    "Content-Length": "189"
  },
  "request_body": {
    "type": "respond-result",
    "proofToken": "k0mbnhwIeXbrRyGvaLX_itHjUU9SmxTj-u4NxnDEe2M.-6miqe4VXXVkFibCksc3tA",
    "authAttemptId": 2,
    "result": "APPROVED",
    "message": "Auth attempt completed"
  }
}
{
  "status_code": 200,
  "response_body": {
    "type": "respond-result",
    "payload": "k0mbnhwIeXbrRyGvaLX_itHjUU9SmxTj-u4NxnDEe2M.-6miqe4VXXVkFibCksc3tA|2|APPROVED|Auth attempt completed",
    "encoding": "UTF-8 + NFC where applicable"
  }
}
{
  "method": "POST",
  "url": "http://localhost:9090/api/v1/crypto/verify-ed25519",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Content-Type": "application/json",
    "Content-Length": "275"
  },
  "request_body": {
    "data": "k0mbnhwIeXbrRyGvaLX_itHjUU9SmxTj-u4NxnDEe2M.-6miqe4VXXVkFibCksc3tA|2|APPROVED|Auth attempt completed",
    "signature": "f0dwir7hNNs20Reso2sXNqftLB0CmpiODNPzkfe2E2msEdk7Aa8ugGBV0VEG5rwipJfzefazQv6_jTCqOVTzAw",
    "publicKey": "o_g1NmS1Gm95e2Ftiq9e2UG31cZtE-sJYjn486I4g_o"
  }
}
{
  "status_code": 200,
  "response_body": {
    "valid": true,
    "message": "Signature is valid",
    "algorithm": "ED25519"
  }
}

Administration — synchronous wait

When tooling chains admin /wait, transcripts include the blocking poll that observes Auth API attempt convergence—useful symmetry for backends that hinge UX on deterministic completion cues.

{
  "method": "GET",
  "url": "http://localhost:9080/api/v1/auth-attempts/2/wait",
  "request_headers": {
    "User-Agent": "python-requests/2.32.5",
    "Accept-Encoding": "gzip, deflate",
    "Accept": "application/json",
    "Connection": "keep-alive",
    "Authorization": "Bearer ezkey_14c52717ab34444bb1cebcca5db71140"
  },
  "request_body": null
}
{
  "status_code": 200,
  "response_body": {
    "authAttempt": {
      "authAttemptId": 2,
      "enrollmentId": 2,
      "authAttemptStatus": "ACCEPTED",
      "authAttemptChallenge": null,
      "authAttemptProofToken": "k0mbnhwIeXbrRyGvaLX_itHjUU9SmxTj-u4NxnDEe2M.-6miqe4VXXVkFibCksc3tA",
      "createdAt": "2026-10-05T12:19:25.576731Z",
      "expiresAt": "2026-10-05T12:21:25.576732Z",
      "contextTitle": null,
      "contextMessage": null,
      "integrationId": null,
      "integrationName": null,
      "enrollmentName": null,
      "tenantId": null,
      "tenantName": null
    },
    "status": "ACCEPTED",
    "completed": true,
    "timeoutReached": false,
    "waitDuration": 0,
    "completedAt": "2026-10-05T12:19:26.059614264Z"
  }
}

Closing

Ezkey concentrates trust in explicit canonical UTF‑8 scaffolding: integration Ed25519 for integration-issued payloads, ECDSA handset math for proofs and MFA decisions, and a read-once pending handshake that forces the device to bind its final decision to the exact attempt it claimed. In an access-login walkthrough like this one, any sign-in copy displayed to the user is inside the same signed envelope as the proof token and challenge posture. The Crypto API excerpts prove the strings mechanically; production mobiles implement the identical math locally without round-tripping through lab services.