Logotipo de Micro Ecc Integration

Micro Ecc Integration

Comunidad
easyzoom
micro-ecc-integration

Use when integrating, porting, or debugging micro-ecc (uECC) ECDH, ECDSA, key generation, uECC_set_rng, signatures, curve selection, or key/signature byte formats on an MCU

Descripción general

Editoreasyzoom
Repositorioaix-skills
Nombre de la habilidadmicro-ecc-integration
Estrellas
39
Forks
5
Archivos incluidos
Solo instrucciones
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por easyzoom en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Micro Ecc Integration en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/easyzoom/aix-skills/tree/main/skills/micro-ecc-integration
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/easyzoom/aix-skills.git /tmp/aix-skills
mkdir -p .claude/skills
cp -r /tmp/aix-skills/skills/micro-ecc-integration .claude/skills/micro-ecc-integration
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Micro Ecc Integration en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Micro Ecc Integration automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Micro Ecc Integration no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

micro-ecc Integration

Overview

Use this skill to integrate micro-ecc (kmackay/micro-ecc, header uECC.h) by treating randomness, key storage, curve choice, and test vectors as security-critical. ECC that compiles but never called uECC_set_rng() or uses mismatched key byte formats is not working. The core key generation, signing, verification, and ECDH functions return 1 on success and 0 on failure (uECC_verify returns 1 only for a valid signature); the size-query helpers instead return a byte count, and uECC_compress/uECC_decompress return void.

When To Use

Use this skill when:

  • The user wants ECDH (uECC_shared_secret), ECDSA (uECC_sign/uECC_verify), or key generation (uECC_make_key) on an MCU using micro-ecc.
  • The issue involves uECC_make_key/uECC_sign returning 0, bad signatures, key mismatch, RNG, curve selection, endian/format mismatch, or slow scalar multiplication.
  • The project uses uECC.h, uECC.c, a uECC_Curve, or uECC_set_rng.

Do not use this skill for full TLS stacks. Use mbedtls-integration for TLS. For AES/SHA/HMAC primitives, use tinycrypt-integration.

First Questions

Ask for:

  • Curve and operation: uECC_secp160r1, uECC_secp192r1, uECC_secp224r1, uECC_secp256r1, or uECC_secp256k1; and ECDH vs ECDSA.
  • Target MCU, compiler, and whether a hardware TRNG/crypto peripheral exists.
  • The RNG source wired into uECC_set_rng() and the key storage policy.
  • Public/private key byte format and endian expectations of the peer (uECC_VLI_NATIVE_LITTLE_ENDIAN setting, compressed vs uncompressed).
  • Test vector, signature, or verification failure details, and the return code seen.

Integration Checklist

  1. Choose curve deliberately. Pick a uECC_Curve via uECC_secp256r1() (or the peer's curve) and enable it with the matching uECC_SUPPORTS_secp256r1 macro. Disable unused curves to save flash.

  2. Provide a real RNG first. Register uECC_set_rng(uECC_RNG_Function fn) where fn has signature int fn(uint8_t *dest, unsigned size) and returns 1 when dest is filled with good entropy, 0 otherwise. Without a valid RNG, both uECC_make_key and uECC_sign return 0. Only uECC_sign_deterministic (RFC 6979-style deterministic nonce, needs a uECC_HashContext) works without an RNG.

  3. Size every buffer from the curve. Always use uECC_curve_private_key_size(curve) and uECC_curve_public_key_size(curve) instead of hard-coded lengths or arithmetic on each other. The public key is x||y and equals uECC_curve_public_key_size(curve); the private key equals uECC_curve_private_key_size(curve). These are equal to 2x the field size and 1x the field size respectively for every curve EXCEPT secp160r1, where the private key is 21 bytes (the order needs an extra byte; the leading byte is often 0x00) while the public key is 40 bytes. Never derive public-key or signature length from the private-key length.

  4. Match key/signature byte format. Default is big-endian; public keys are raw x||y with NO 0x04 uncompressed prefix, so prepend 0x04 for SEC1/OpenSSL peers. If interop breaks, check uECC_VLI_NATIVE_LITTLE_ENDIAN matches both sides; keys/signatures across the two settings are incompatible. The signature is r||s and its length equals the public-key length (uECC_curve_public_key_size(curve)) -- for secp160r1 that is 40 bytes, not 2 * private_key_size (peers such as python-ecdsa may instead expect 42).

  5. Sign the hash, not the message. uECC_sign(private_key, hash, hash_size, signature, curve) and uECC_verify take a message digest plus hash_size; hash the message yourself (e.g. SHA-256) and pass the digest. A hash longer than the curve order is truncated internally.

  6. Handle compressed points if needed. With uECC_SUPPORT_COMPRESSED_POINT, use uECC_compress/uECC_decompress; a compressed point is one coordinate plus a leading parity byte, i.e. (uECC_curve_public_key_size(curve) / 2) + 1 bytes. Validate imported keys with uECC_valid_public_key.

  7. Protect secrets. Do not log private keys, the ECDSA nonce, or the shared secret from uECC_shared_secret.

Common Failures

  • uECC_set_rng() never called, so uECC_make_key/uECC_sign silently return 0.
  • RNG callback returns 0 (or returns success while producing weak/deterministic bytes) in production.
  • Public key sent with or expecting a 0x04 prefix; micro-ecc uses raw x||y without it.
  • secp160r1 private key allocated as 20 bytes instead of 21, corrupting adjacent memory or the key.
  • Deriving signature or public-key length from the private-key length; on secp160r1 this over-allocates (42 vs 40) and breaks interop.
  • uECC_VLI_NATIVE_LITTLE_ENDIAN mismatch between device and peer, so byte order flips and verify fails.
  • Passing the raw message to uECC_sign/uECC_verify instead of the digest, or hashing inconsistently between the two sides.
  • Curve mismatch: device built with uECC_secp256r1 but server uses secp256k1.

Verification

Before claiming micro-ecc works:

  • State the uECC_Curve, operation, key/signature byte layout, and the RNG registered via uECC_set_rng.
  • Confirm uECC_make_key returns 1 and buffers were sized with uECC_curve_public_key_size/uECC_curve_private_key_size (not derived from each other).
  • Confirm known test vectors pass: uECC_verify returns 1 for a valid signature and 0 for tampered data/hash.
  • For ECDH, confirm both peers derive the same uECC_shared_secret.
  • Confirm secrets are not logged and storage policy is explicit.

Example

User:

text
micro-ecc 签名服务器验不过。

Agent:

  1. Asks for the curve, whether the public key carries a 0x04 prefix, the hash input to uECC_sign, the RNG behind uECC_set_rng, and the uECC_VLI_NATIVE_LITTLE_ENDIAN setting on both sides.
  2. Checks endian and that a digest (not the raw message) is passed, and reconstructs the peer's SEC1 format by prepending 0x04 to the x||y public key.
  3. Verifies with a known vector via uECC_verify before changing protocol code.

Preguntas frecuentes

¿Qué hace la habilidad de IA Micro Ecc Integration?

Use when integrating, porting, or debugging micro-ecc (uECC) ECDH, ECDSA, key generation, uECC_set_rng, signatures, curve selection, or key/signature byte formats on an MCU

¿Por qué usar Micro Ecc Integration en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Micro Ecc Integration está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Micro Ecc Integration en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/easyzoom/aix-skills/tree/main/skills/micro-ecc-integration. TypingMind lee su archivo SKILL.md y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Micro Ecc Integration?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Micro Ecc Integration?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Micro Ecc Integration con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Micro Ecc Integration?

Sí. easyzoom la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇