> For the complete documentation index, see [llms.txt](https://shinkalabs.gitbook.io/hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shinkalabs.gitbook.io/hub/andromeda/on-chain-programs/precompiles.md).

# Precompile validation

Every user signature that an Andromeda on-chain program acts on is verified by a Solana runtime precompile, inside the same transaction, before the program does anything with it. The program does not trust an off-chain claim that a signature is valid. This is the mechanical basis of [Zero attestor](/hub/andromeda/concepts/zero-attestor.md).

## How it works in a transaction

A transaction that performs a recovery or a policy action contains, at minimum:

1. a **precompile instruction** that checks a signature against a message and an expected public key, and
2. the **program instruction** that performs the action.

The Quasar program reads the precompile instruction's parameters out of the transaction, confirms they match what it expects (the right message, the right public key, the right position), and only then proceeds. If the signature did not verify, the transaction fails at the precompile step and the program never runs.

## Schemes available on-chain

| Scheme    | On-chain identifier            | Used for                                                                                                                             |
| --------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| Ed25519   | 32-byte public key             | primary owner, quorum members, owner signatures on admin changes; covers Solana, Sui, NEAR, Aptos, Cosmos ed25519, Substrate ed25519 |
| Secp256k1 | 20-byte Ethereum-style address | primary owner, quorum members; covers EVM, Bitcoin (BIP-137), Cosmos secp256k1, Substrate ECDSA                                      |
| Secp256r1 | 33-byte compressed P-256 key   | primary owner, quorum members; passkeys in compact raw form                                                                          |
| WebAuthn  | 33-byte compressed P-256 key   | quorum members only; a full WebAuthn assertion (clientDataJSON + authenticator data) validated inline                                |

## Why WebAuthn is quorum-only

A full WebAuthn assertion is large because it carries `clientDataJSON` and the authenticator data. It fits in a transaction when a single quorum member carries their own assertion in their own contribution transaction. For the primary owner slot, where the action is a single transaction that may already be near capacity, a passkey is used in its compact raw-P-256 form (Secp256r1) instead. So: passkey-as-Secp256r1 anywhere; full WebAuthn for quorum members.

## What is deliberately not on-chain

There are no runtime precompiles for sr25519, Ristretto, or pure Bitcoin Taproot signatures. Bridging them would require an off-chain attestor, which would reintroduce a single point of failure. Instead, Substrate users enroll recovery owners with Ed25519 or Secp256k1 (both natively supported by Substrate), and Bitcoin users prove ownership via BIP-137 message signing (Secp256k1). This is a conscious trade: a smaller set of high-assurance primitives, no attestor. See [Known limitations](/hub/andromeda/reference/limitations.md).

## Strict challenge handling

For schemes that carry a challenge field (notably WebAuthn), the program pattern-matches the field strictly rather than parsing it loosely, so a malformed or replayed assertion does not slip through. The challenge itself is domain-separated; see [Domain-separated challenges](/hub/andromeda/on-chain-programs/challenges.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shinkalabs.gitbook.io/hub/andromeda/on-chain-programs/precompiles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
