Logo : Auditing Randomness And Nonce Quality

Auditing Randomness And Nonce Quality

Organisation
UnboundCompute
auditing-randomness-and-nonce-quality

Auditez les valeurs sensibles pour la sécurité afin de repérer les aléas insuffisants : un générateur non cryptographique, une graine prévisible ou constante, un nonce ou vecteur d’initialisation réutilisé, ou une sortie trop courte pour résister aux tentatives de devinette, produisant une valeur dont l’unique protection repose sur son imprévisibilité. Cela concerne les tokens de session et d’authentification, les liens de réinitialisation de mot de passe et de vérification, les tokens de requête intersites et les codes à usage unique, ainsi que les nonces et vecteurs d’initialisation cryptographiques générés par un générateur statistique plutôt que cryptographique, initialisés à partir d’un horodatage ou d’une constante, réutilisés pour plusieurs messages avec une même clé ou tronqués au point de pouvoir être forcés par brute force. Cette analyse porte uniquement sur l’aléa, la graine, le cycle de vie du nonce et la longueur de l’entropie, et non sur le choix du chiffrement, du mode ou du hachage, traité par une compétence distincte. À utiliser lorsqu’une valeur générée contrôle l’accès ou protège un message. Le générateur est la source, la valeur sensible pour la sécurité est la destination, et la prévisibilité entre les deux constitue la faille.

Présentation

ÉditeurUnboundCompute
Dépôtsecurity-agent-skills
Nom de la compétenceauditing-randomness-and-nonce-quality
Étoiles
27
Forks
8
Fichiers inclus
Instructions uniquement
LicenceMIT
Liens
  • Instructions en Markdown

    Un fichier SKILL.md que le modèle charge à la demande : il ne consomme donc des tokens que lorsqu’une demande correspond réellement à la compétence.

  • Compatible avec tous les LLM

    Les compétences IA sont rédigées en Markdown et non sous forme de code propre à un fournisseur. Elles fonctionnent donc avec GPT, Claude, Gemini, Grok ou un modèle local.

  • Tout dans les instructions

    Tout ce dont le modèle a besoin se trouve dans les instructions : aucun fichier supplémentaire à synchroniser.

  • Open source

    Publiée par UnboundCompute sur GitHub. Consultez les sources avant de l’installer.

Installation

Installez la compétence IA Auditing Randomness And Nonce Quality dans TypingMind pour l’utiliser avec n’importe quel LLM, ou ajoutez-la à un autre agent capable de lire SKILL.md.

1

Installer dans TypingMind

TypingMind installe une compétence directement depuis son dossier GitHub : l’application lit SKILL.md, regroupe les fichiers de ressources et enregistre le tout localement.

  1. Ouvrez l’application et accédez à Plugins → Compétences.
  2. Choisissez « Installer depuis GitHub ».
  3. Copiez l’URL ci-dessous, qui pointe vers le dossier de la compétence, puis collez-la et confirmez.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-randomness-and-nonce-quality
  4. Activez la compétence dans chaque discussion où vous souhaitez pouvoir l’utiliser.
Plugins → Compétences → Ajouter une compétence → Via une URL GitHub, puis collez l’URL du dossier et appuyez sur Continuer.
2

Installer dans un autre agent

Tout agent capable de lire le format Agent Skills peut utiliser cette compétence : copiez le dossier dans le répertoire des compétences de cet agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UnboundCompute/security-agent-skills.git /tmp/security-agent-skills
mkdir -p .claude/skills
cp -r /tmp/security-agent-skills/skills/auditing-randomness-and-nonce-quality .claude/skills/auditing-randomness-and-nonce-quality
Redémarrez Claude Code après la copie pour que la nouvelle compétence soit prise en compte.

Utilisez cette compétence dans TypingMind

Activez Auditing Randomness And Nonce Quality dans n’importe quelle discussion TypingMind et le modèle s’occupe du reste. Le nom et la description de la compétence figurent dans le prompt système. Dès qu’une demande correspond, le modèle charge lui-même l’intégralité des instructions : vous n’avez jamais à l’invoquer manuellement, et elle ne consomme aucun token tant qu’elle n’est pas utilisée.

Le modèle charge automatiquement Auditing Randomness And Nonce Quality dès qu’une demande correspond à cette compétence.

Compatible avec tous les modèles IA

Les compétences IA sont de simples instructions Markdown, et non du code propre à un fournisseur. Ainsi, la compétence Auditing Randomness And Nonce Quality n’est pas liée au modèle pour lequel elle a été conçue. Installez-la une seule fois dans TypingMind et utilisez-la avec GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou un modèle local que vous exécutez vous-même, le tout avec vos propres clés API.

  • Chargée uniquement en cas de besoin

    Le prompt système ne contient que le nom et la description. Les instructions sont récupérées à la première demande correspondante : une compétence inutilisée ne coûte donc rien.

  • Changez de modèle en cours de discussion

    La compétence étant constituée d’instructions et non de code, elle reste fonctionnelle lorsque vous changez de modèle : le nouveau modèle lit le même fichier SKILL.md.

Instructions de la compétence

Voici le contenu de SKILL.md que le modèle charge. Lisez-le avant l’installation : une compétence contient des instructions que votre modèle suivra.

Auditing randomness and nonce quality: when the secret is guessable by construction

A whole class of secrets is broken not by a flaw in the algorithm around them but by where their bytes came from. A password-reset token from a statistical generator can be reconstructed from a few prior outputs. A generator seeded from the clock produces the same token twice. A nonce reused across two messages under one key can collapse a mode's confidentiality or leak its authentication key. A token that is unpredictable but only thirty-two bits long is brute-forceable anyway. In every case the cipher, mode, and hash can be perfectly chosen; the value is guessable because of the randomness, the seed, the nonce lifecycle, or the length. You find these by tracing each security-sensitive value back to the generator that produced it and asking whether an attacker can predict or repeat it.

When to use

  • A generated value is the only thing standing between an attacker and an account, a message, or a request.
  • Tokens, links, codes, session identifiers, nonces, or initialization vectors are produced somewhere in the code.
  • You want to separate a value that is unpredictable by construction from one that only looks random.

Scope check

Assess randomness only in code you own or are authorized to review, and reproduce predictability only against test data. Demonstrating that a real token is guessable can expose live accounts, so treat a confirmed finding as sensitive and coordinate. If you can't name the authorization, stop.

The loop

  1. Map security-sensitive values to their generator. Inventory the values whose security property is unpredictability: session and authentication tokens, password-reset and email-verification links, cross-site-request tokens, one-time and device codes, API keys, and cryptographic nonces, salts, and initialization vectors. For each, trace back to the call that produced its bytes. The trace, not the variable name, tells you what the value actually is.

  2. Find non-cryptographic generators feeding a secret. Flag any security-sensitive value whose bytes come from a statistical or linear-congruential generator, the kind meant for simulation and sampling, rather than a cryptographic random source. These generators are deterministic from an internal state that a handful of outputs can reconstruct, so their tokens are predictable to anyone who has seen a few.

  3. Find predictable or constant seeds. Flag a generator explicitly seeded from a timestamp, a process identifier, a counter, a constant, or any value an attacker can derive. A seeded generator produces a reproducible stream, and seeding even a cryptographic generator from a low-entropy source reintroduces the predictability the generator was meant to remove.

  4. Find nonce and initialization-vector reuse. Flag a nonce or initialization vector that is a constant, is derived deterministically from the message, or is not regenerated for every message under a given key. Reuse under one key is catastrophic for stream and counter constructions and can leak an authentication key outright, and here the defect is the nonce lifecycle, not the cipher or mode around it.

  5. Find insufficient entropy and predictable identifiers. Flag a value that is generated correctly but truncated into a small space, a short numeric token used as a security token without a compensating throttle and expiry, or a sequential, time-based, or otherwise guessable identifier used where unguessability is required. Correct source, too few bits, is still brute-forceable.

  6. Confirm and record. Confirm by reading the generator's source to establish it is non-cryptographic, seeded, reused, or too short, and by tracing the value to a sink that depends on unpredictability; where feasible, predict or collide a value from observed outputs on test data. Kill the lead if the generator is a cryptographic source behind an unfamiliar name, the value is not security-sensitive, or a short code is genuinely defended in depth by a strict throttle and short expiry. Record the generator, the sink, and the predictability shown.

Where randomness leaks

  • The variable name lies; the generator tells the truth. A value called a token can come from a simulation generator, and a plain-looking string can be cryptographic bytes. Read the source of the call.
  • A statistical generator is reconstructable, not just biased. Its whole future and past follow from a few outputs, so one leaked token can predict the next.
  • Seeding is the back door into a good generator. A cryptographic source seeded from the clock is as predictable as the clock. Never manually seed what is meant to seed itself.
  • A nonce is a lifecycle, not a value. Freshness per message under a key is the property; a constant or a reset counter breaks it even when every other choice is correct.
  • Unpredictable and long are different requirements. A perfectly random thirty-two-bit token is still brute-forceable; entropy length is its own axis.

Worked example (a confirm and a kill)

Confirm. A password-reset token is built from a statistical generator's output, stored, and emailed as a link. The generator is non-cryptographic and unseeded per request, so its state is recoverable from a few tokens an attacker requests for their own account, and the victim's token is then predictable within the reset window. Confirmed predictable password-reset token, critical, remediation = generate the token from a cryptographic random source with at least a hundred and twenty-eight bits, and bind it to a short expiry and single use.

Kill. A helper with an unremarkable name returns a token that, read to its source, is a base-encoded block of bytes from the platform's cryptographic random source; a short numeric code elsewhere is cryptographically generated, single-use, expires in minutes, and is rate-limited to a few attempts. No value traces to a statistical generator, a fixed seed, or a reused nonce. Killed, kill_reason = "security-sensitive values derive from a cryptographic source with adequate length; the short code is defended by a strict throttle and short expiry; no reuse or predictable seed on any path."

Rationalizations to reject

  • "It looks random to me." -> Looking random and being unpredictable are different. A statistical generator's output looks random and is fully predictable from a few samples.
  • "It is only used for a token, not encryption." -> A token is exactly a value whose security is unpredictability. A weak generator there is an account-takeover primitive.
  • "We seed it so it is different each run." -> Seeding from the clock or a constant makes the stream reproducible. A cryptographic source needs no manual seed and is weakened by one.
  • "The nonce is generated, so it is fine." -> Generated once and reused across messages under one key is the bug. Confirm it is fresh per message inside the encryption path.
  • "The code is random and short is convenient." -> Short is brute-forceable unless a strict throttle and a short expiry carry the weight the length does not.

Executing this in practice

You need the set of security-sensitive generated values, the exact generator call behind each, any seed passed to it, the per-message path for nonces and initialization vectors, and the length of each output. For each value, decide whether an attacker can predict it from prior outputs, repeat it, or brute-force its space. Reading the generator's source settles what kind of randomness it is; tracing the value to its sink settles whether unpredictability is the property that matters there.

Related

  • finding-crypto-misuse - the sibling scoped to cipher, mode, and hash selection; this skill deliberately covers the orthogonal axis of where the random bytes came from and how the nonce is used.
  • auditing-webauthn-and-passkey-flows - relies on unguessable challenges; a weak generator there is a randomness finding this skill names.
  • auditing-device-code-and-pkce-flows - a weak user code or authorization code is a grant bug rooted in the entropy this skill assesses.
  • FINDING-SCHEMA.md - source = the generator, sink = the security-sensitive value, evidence = the predicted, repeated, or brute-forced value from observed outputs.

Foire aux questions

À quoi sert la compétence IA Auditing Randomness And Nonce Quality ?

Auditez les valeurs sensibles pour la sécurité afin de repérer les aléas insuffisants : un générateur non cryptographique, une graine prévisible ou constante, un nonce ou vecteur d’initialisation réutilisé, ou une sortie trop courte pour résister aux tentatives de devinette, produisant une valeur dont l’unique protection repose sur son imprévisibilité. Cela concerne les tokens de session et d’authentification, les liens de réinitialisation de mot de passe et de vérification, les tokens de requête intersites et les codes à usage unique, ainsi que les nonces et vecteurs d’initialisation crypt...

Pourquoi utiliser Auditing Randomness And Nonce Quality sur TypingMind ?

Parce que vous l’installez une seule fois pour l’utiliser avec n’importe quel modèle. Auditing Randomness And Nonce Quality se compose de simples instructions en Markdown plutôt que de code propre à un fournisseur. La même compétence fonctionne donc avec GPT-5, Claude, Gemini, Grok ou un modèle local, et vous pouvez changer de modèle en cours de discussion sans perturber son fonctionnement. TypingMind utilise vos propres clés API : vous payez donc directement les fournisseurs plutôt qu’un abonnement par siège, et vos compétences et discussions restent dans votre propre espace de stockage.

Comment installer Auditing Randomness And Nonce Quality dans TypingMind ?

Dans TypingMind, ouvrez Plugins → Compétences → Installer depuis GitHub et collez https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-randomness-and-nonce-quality. TypingMind lit le fichier SKILL.md et l’installe sous forme de compétence que vous pouvez activer pour chaque discussion.

Quels modèles d’IA peuvent utiliser Auditing Randomness And Nonce Quality ?

N’importe quel modèle que vous connectez dans TypingMind. Les compétences IA sont de simples instructions en Markdown, et non du code propre à un fournisseur. GPT, Claude, Gemini, Grok et les modèles locaux peuvent donc tous charger cette compétence lorsqu’une demande lui correspond.

Combien de modèles d’IA puis-je utiliser avec Auditing Randomness And Nonce Quality ?

Autant que vous le souhaitez. Vous pouvez utiliser Auditing Randomness And Nonce Quality avec tout modèle qui prend en charge les compétences : GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama et bien d’autres, le tout dans TypingMind avec vos propres clés API.

La compétence IA Auditing Randomness And Nonce Quality est-elle gratuite ?

Oui. Cette compétence est publiée sur GitHub par UnboundCompute sous licence MIT. Vous ne payez que votre propre fournisseur d’IA pour les tokens utilisés.

Que sont les compétences IA ?

Une compétence IA est un ensemble d’instructions réutilisables qui apprend à un modèle d’IA à accomplir une tâche précise. Elle suit le format ouvert Agent Skills : un fichier SKILL.md contenant un nom et une description, ainsi que les éventuels scripts, gabarits ou fichiers de référence dont le modèle peut avoir besoin. Le modèle ne lit les instructions que lorsque votre demande correspond à la compétence. Une compétence installée ne coûte donc rien tant qu’elle n’est pas utilisée.

En quoi les compétences IA diffèrent-elles des plugins ou des serveurs MCP ?

Un plugin ou un serveur MCP fournit au modèle de nouveaux outils à appeler : du code qui s’exécute quelque part et renvoie un résultat. Une compétence IA lui apporte plutôt des connaissances et une méthode : comment aborder une tâche, quelles étapes suivre et à quoi ressemble un bon résultat. Les compétences sont de simples instructions en Markdown. Elles ne nécessitent donc ni serveur, ni clé API, ni environnement d’exécution, et fonctionnent avec n’importe quel modèle.

Tout voir

Créez votre propre espace de travail IA dès maintenant

Abonnez-vous à notre newsletter pour être informé des nouvelles fonctionnalités et des prochains cadeaux à gagner 👇