SPB Git

Repository Public

THREAT_MODEL.md 62.0 KB 848 lines markdown

1# QYVORA threat model23Status: draft for version 1, 2026-12-04. This document describes a design and a code base that are still4being built. Statements about the engine modules were checked against the sources at that date; statements5about the vault, the identity, the cold mode, the Quantum Shield and the application layer describe the6design of version 1 and are marked *design* or *planned* where the code does not exist yet.7`docs/STATUS.md` is the register of what is implemented and tested.89**The cryptographic engine of QYVORA is written from scratch, is not audited and is not certified.** Until10an independent audit is recorded, the application operates on test networks only (Bitcoin Testnet and11Signet, Ethereum Sepolia). The gate is `MainnetPolicy.auditCompleted` in `Sources/QyvoraCore/Networks.swift`,12which is `false`.1314---1516## 1. System summary1718QYVORA is a non-custodial iOS wallet for Bitcoin and Ethereum (ether and ERC-20 tokens). Keys are generated19and kept on the device. There is no QYVORA server, no account and no telemetry: the only network traffic is20the wallet querying public blockchain endpoints (Esplora-compatible REST servers for Bitcoin, JSON-RPC21nodes and a Blockscout-compatible indexer for Ethereum, a price API), all of which the user can replace22with their own.2324Three families of keys exist and must not be confused:2526| Family | Algorithms | Purpose | Who decides the algorithm |27|---|---|---|---|28| Transaction keys | secp256k1 ECDSA (Bitcoin, Litecoin, Dogecoin, Bitcoin Cash, Ethereum and the other EVM networks, TRON), BIP-340 Schnorr (Bitcoin Taproot), Ed25519 (Solana) | Authorise spending on chain | The blockchain consensus rules. QYVORA cannot change them. |29| Vault keys | 256-bit symmetric keys, AES-256-GCM, HKDF, Argon2id, PBKDF2 | Protect secrets at rest on the device and in backup files | QYVORA |30| Quantum Identity keys | ML-DSA-87 (optionally SLH-DSA-SHAKE-256f), ML-KEM-1024 | Sign and encrypt device-to-device transfers and backups between the user's own devices | QYVORA |3132The Quantum Identity never signs a blockchain transaction and is never derived from, or mixed with, the33recovery phrase of the transaction keys.3435**Multi-chain upgrade (2026-12-05).** The wallet now also covers six more EVM networks (Base, Arbitrum,36Optimism, Polygon, BNB Chain, Avalanche), three more UTXO coins (Litecoin, Dogecoin, Bitcoin Cash), Solana37and TRON, each with its test network. The sections written for Bitcoin and Ethereum apply to them unless38section 5.14 says otherwise; section 5.14 lists what is specific to each family. The upgrade added one more39from-scratch primitive, **Ed25519** (field arithmetic modulo 2^255 − 19, the Edwards group, scalar40arithmetic, RFC 8032 signing, strict verification, SLIP-0010 derivation), and from-scratch encoders and41decoders for Solana messages, TRON protobuf transactions, CashAddr and the legacy and fork-id signature42hashes. All of it is unaudited by an independent party, like the rest of the engine.4344## 2. Assets4546| # | Asset | Confidentiality | Integrity | Availability |47|---|---|---|---|---|48| A1 | Recovery phrase (BIP-39 entropy) and optional BIP-39 passphrase | Critical: disclosure is loss of all funds | Critical | Critical: loss without a backup is loss of funds |49| A2 | Derived private keys and BIP-32 chain codes (in memory while signing) | Critical | Critical | Recomputable from A1 |50| A3 | Vault master key and its wrapping slots | Critical | Critical | Critical |51| A4 | Master password, PIN | High | — | Loss of every slot at once means recovery from A1 only |52| A5 | Quantum Identity private keys | High | High | Regenerable (a new identity) |53| A6 | Extended public keys, addresses, balances, history, labels | Privacy; an extended public key also matters for quantum exposure (section 5.4) | Medium | Recomputable |54| A7 | Transaction intent: recipient, amount, fee, calldata, chain | — | Critical | — |55| A8 | Backup files and transfer payloads | Protect A1, A3, A5 | Critical | High |56| A9 | The application binary and its build chain | — | Critical | — |57| A10 | Endpoint configuration | — | High | Medium |5859## 3. Trust boundaries60611. **Device hardware and iOS.** The Secure Enclave, the Keychain, Data Protection, the system random62   generator, the system cryptography used for the vault AEAD and for PBKDF2, the biometric subsystem and63   the app sandbox are trusted. QYVORA cannot defend against a failure of this layer (section 5.2).642. **The QYVORA process.** Everything inside the process is trusted with secrets while the vault is65   unlocked. The from-scratch engine runs inside this boundary on the application processor.663. **The network.** Nothing received from the network is trusted. Endpoints are untrusted data sources and67   untrusted relays.684. **Other applications and the user interface surface.** The pasteboard, the screen, the camera input69   (QR codes), notifications, the share sheet and files handed to other applications cross the process70   boundary.715. **The build chain.** Source repository, compiler, signing identity and distribution channel.726. **Other devices of the user.** A second device taking part in a transfer, or acting as the offline73   signer in cold mode, is a distinct trust domain reached through an authenticated channel (QR codes or74   files).7576## 4. Adversaries7778| Adversary | Capabilities assumed |79|---|---|80| T — thief or finder | Physical possession of a locked or briefly unlocked phone; no knowledge of the secrets |81| F — forensic attacker | Physical possession, laboratory tools, exploits against the device, time |82| M — malware / compromised OS | Code execution on the device at the same or a higher privilege than QYVORA |83| N — network attacker | Observes or alters traffic; controls DNS or a network path |84| E — malicious endpoint | Operates an Esplora server, a JSON-RPC node, an indexer or the price API that the wallet queries |85| Q — quantum attacker | A future fault-tolerant quantum computer large enough to run Shor's algorithm against 256-bit elliptic curves; may have recorded ciphertexts and public data earlier |86| C — cryptanalyst | Classical cryptanalysis of the primitives; exploitation of implementation bugs |87| S — supply-chain attacker | Tampers with source, toolchain, signing or distribution |88| O — observer | Sees the screen (shoulder surfing, camera) |89| X — coercer | Forces the user to unlock or to sign |9091---9293## 5. Threats9495Each threat gives a description, the impact, the mitigations in QYVORA and the residual risk.9697### 5.1 Stolen or lost iPhone (T, F)9899**Description.** The attacker holds the device. It may be locked, or unlocked for a short time (snatched in100use).101102**Impact.** Disclosure of A1–A5 means theft of funds. Loss of the device without a backup of the recovery103phrase means loss of funds.104105**Mitigations (design of the vault, version 1).**106107- Secrets are stored only as vault records sealed with AES-256-GCM under subkeys derived from a random108  256-bit master key. The master key is never stored in clear; it is wrapped in independent slots:109  - *Master password slot.* The key-encryption key is110    $\mathrm{KEK} = \mathrm{HKDF}\big(\mathrm{Argon2id}_{\text{engine}}(pw, salt) \,\Vert\, \mathrm{PBKDF2\text{-}HMAC\text{-}SHA512}_{\text{system}}(pw, salt)\big)$.111    An offline guess costs at least one memory-hard Argon2id evaluation and one PBKDF2 evaluation.112  - *Device slot.* A random key held in the iOS Keychain with113    `kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly` and an access control bound to the current biometric114    set (`biometryCurrentSet`): it is released only on this device, only while a passcode is set, only after115    a successful biometric match, and it is invalidated when the enrolled biometrics change. It is not116    included in device backups and does not synchronise. Optionally the key is wrapped once more by a117    P-256 key that never leaves the Secure Enclave.118  - *PIN slot.* A PIN has too little entropy to resist an offline search, so it never derives a key on its119    own: it unlocks only in combination with a device-bound Keychain secret, with an attempt counter and120    escalating delays.121- Auto-lock after inactivity and when the application goes to the background; re-authentication before122  every signature and before any export of a secret; the app-switcher snapshot is masked.123- Secrets are zeroized after use (`SecureMemory.zero`, built on `memset_s`).124125**Residual risk.**126127- A weak master password remains searchable offline by an attacker who extracted the vault file. The128  combiner raises the cost per guess; it does not create entropy.129- The device slot is exactly as strong as the Keychain, the Secure Enclave and the device passcode. An130  attacker who knows or guesses the device passcode can, on iOS, enrol new biometrics; `biometryCurrentSet`131  then invalidates the item (the slot is lost, not opened), but other passcode-level attacks on the132  operating system are outside QYVORA's control.133- The PIN attempt counter is enforced by application code. An attacker with code execution on the device134  (5.2) can bypass a software counter; the remaining barrier is then the device-bound Keychain secret.135- A phone snatched while the vault is unlocked exposes whatever the session allows until auto-lock.136  Re-authentication before signing and export limits this to information disclosure (balances, addresses).137- The optional Secure Enclave wrap uses P-256, which is not quantum-resistant. It is an additional layer138  around a key that already requires the Keychain; it does not weaken the slot, and it is not counted as139  post-quantum protection.140141### 5.2 Compromised operating system, jailbreak, malware (M, F)142143**Description.** The attacker executes code with the privileges of QYVORA or of the kernel: a jailbroken144device, a kernel exploit, a malicious configuration profile combined with an exploit, a compromised145toolchain on the device.146147**Impact.** Total. While the vault is unlocked the master key and decrypted secrets are in process memory;148the attacker can read them, read the screen, inject touches, replace the recipient before display and149defeat every application-level counter.150151**Mitigations.** Limited by nature.152153- Minimised exposure window: secrets are decrypted on demand and zeroized; the vault auto-locks.154- No secret is written to logs, analytics, crash metadata or the pasteboard by the application (design155  rule; the engine modules never print key material).156- *Planned:* a best-effort integrity warning when common signs of a jailbreak are present. Such checks are157  heuristics that a capable attacker bypasses; they inform the user and are not a security control.158- Cold mode (5.12) keeps signing keys on a device that never connects to a network, which removes the159  remote part of this threat for that device.160161**Residual risk.** **Not defended.** A wallet running on a compromised operating system cannot protect its162keys. This is stated in section 6.163164### 5.3 Network attackers and malicious or lying endpoints (N, E)165166**Description.** Endpoints supply everything the wallet does not compute: balances, unspent outputs,167history, nonces, fee estimates, token metadata, prices; and they relay signed transactions. An endpoint or168a network path can lie, withhold or delay.169170| Attack | Impact |171|---|---|172| Wrong balance or history (inflated, hidden, stale) | The user is misled: accepts a payment that did not happen, or believes funds are gone |173| Fabricated unspent outputs | Transactions that cannot confirm; with a wrong input amount, fee overpayment (5.12) |174| Censored or silently dropped broadcast | Payment not made while the wallet reports success |175| Fee manipulation | Overpayment, or a transaction stuck by an underestimated fee |176| Wrong chain (mainnet answer for a testnet wallet, or a fork) | Signature valid on an unintended chain; misleading state |177| Wrong nonce (Ethereum) | Stuck transaction, or replacement of a pending one |178| Wrong token metadata (decimals, symbol) | Amount displayed with the wrong scale |179| Traffic observation | The endpoint learns which addresses belong together and the client IP address |180181**Mitigations in the code today (`Sources/QyvoraNetworking`).**182183- Transport: HTTPS is required; cleartext HTTP is accepted only for hosts that look local or private or184  for `.onion` hosts (`EndpointConfiguration.isAcceptable`). The session is ephemeral, without cookies,185  cache or stored credentials, sends no identifier, and does not follow redirects (`URLSessionTransport`).186- **Transactions are built, hashed and signed locally.** An endpoint never sees a private key and cannot187  change what is signed. The chain id is part of the signed EIP-1559 payload, so a signature is not valid188  on another chain. The transaction hash is computed locally and compared with what the endpoint returns.189- Ethereum chain check: `EthereumRPC.verifyChain` asks every configured endpoint for `eth_chainId`; all190  those that answer must agree with each other and with the expected constant. The same agreement rule191  (`quorum`) is used for the account nonce.192- Bitcoin chain identity: `EsploraClient.verifyChain` fetches the hash of block 0 from every configured193  endpoint and compares it with the constant of the expected network (`BitcoinNetwork.genesisHash`);194  an endpoint serving another chain is an error.195- Broadcast goes to every configured endpoint, and succeeds if at least one accepts the transaction or196  already knows it.197- Fee data from Ethereum endpoints is bounded: a base fee or a priority fee above 10 000 gwei is rejected198  as invalid. Bitcoin fee estimates that are not finite and positive are discarded.199- ERC-20 token decimals are read on chain before a token is used, and token balances reported by the200  indexer are re-read on chain before display (design rule stated in the sources).201- Strict parsers: RLP rejects non-canonical encodings and trailing bytes; addresses must carry a valid202  checksum (Base58Check, Bech32/Bech32m, mixed-case EIP-55).203- Every endpoint is user-editable, so a user can point the wallet at their own node.204205**Limits of these mitigations, stated precisely.**206207- The agreement rule is lenient: endpoints that fail to answer are ignored, so if only one answers, that208  one decides. Agreement between endpoints that answer is not a proof: several endpoints can share one209  backend or be operated by one party.210- Balances, unspent outputs, history, gas estimates and fee data are taken from the **first endpoint that211  answers**, not from an agreement between endpoints. QYVORA is not a light client: it does not verify212  block headers, proof of work, Merkle inclusion proofs or Ethereum state proofs.213- The comparison of the Bitcoin genesis hash with the expected constant exists in the test suite; the214  application-level check when an endpoint is configured is *planned*.215- A cap on Bitcoin fee rates and a confirmation prompt on unusually high fees are *planned* in the216  transaction builder.217- Cleartext HTTP is allowed only for `localhost`, `.local`, `.onion` and IPv4 literals in the loopback and218  private ranges; the host must parse as an IPv4 literal, so a public name that merely begins with such a219  prefix is refused. A local network attacker can still observe or alter that cleartext traffic.220221**Residual risk.** A lying endpoint can mislead the user about state (balances, confirmations) and can222censor. It cannot forge a signature, change the recipient or the amount of a transaction the user223reviewed, or move funds. Users who need verified state must run their own node. Network privacy (address224clustering, IP address) is not protected unless the user routes traffic through their own node or Tor.225226### 5.4 Quantum attackers (Q)227228Detailed analysis is in `docs/QUANTUM_RESISTANCE.md`. Summary:229230| Attack | Target | Impact | Mitigation in QYVORA | Residual risk |231|---|---|---|---|---|232| Harvest now, decrypt later | Backup files, device-to-device transfers recorded today | Later recovery of A1 | Backups are protected by symmetric cryptography under a password-derived key (no public-key step). Transfers use a hybrid KEM: X25519 and ML-KEM-1024, both shared secrets fed to HKDF; they are signed with ML-DSA-87 | A weak backup password stays weak. ML-KEM is young and the implementation is unaudited; the hybrid protects against a classical break of either component, and against a quantum attacker only through ML-KEM |233| Shor against secp256k1 and Ed25519 | Any public key that has been revealed: on chain, in the mempool, through an extended public key, through a signed message. **A Solana address is the Ed25519 public key itself, and an account-based address (EVM, TRON) reveals its key at the first outgoing transaction**: for these families there is no "unexposed" state to preserve | Recovery of the private key, theft of funds | None at the cryptographic level: the signature scheme is fixed by the chains. QYVORA reduces **exposure**: fresh addresses, no address reuse, hashed output types for long-term funds, exposure metrics, migration guidance | **Not defended** once a key is exposed and a sufficiently large quantum computer exists. The window between broadcast and confirmation cannot be closed by a wallet |234| Grover against symmetric keys and hashes | AES-256, HKDF/HMAC-SHA-256, SHA-256, Keccak, Argon2id/PBKDF2 outputs | Quadratic speed-up of exhaustive search | 256-bit keys throughout; 256-bit or longer hash outputs for security-relevant uses | Considered adequate. HASH160 (160 bits) is fixed by Bitcoin and has a smaller margin |235236An extended public key (A6) deserves a specific note: with a BIP-32 extended public key an attacker can237derive every non-hardened child public key without any on-chain exposure. A quantum attacker holding an238extended public key therefore sees all public keys of that account. QYVORA queries endpoints by address,239not by extended public key, and treats the export of an extended public key as a sensitive action.240241### 5.5 Classical cryptanalysis and implementation bugs in unaudited code (C)242243**Description.** Either a primitive is weaker than believed, or — far more likely — the from-scratch244implementation is wrong: an arithmetic bug at a rare carry, a missing validation, a wrong constant, a245parsing flaw, a non-constant-time path.246247**Impact.** From wrong addresses (funds sent to an unspendable destination) to key recovery (biased248nonces, faulty signatures) to loss of confidentiality of the vault.249250**Mitigations.**251252- Conformance testing against published vectors: NIST ACVP vectors for ML-KEM, ML-DSA, SLH-DSA, SHA-2,253  SHA-3/SHAKE and AES-GCM; RFC vectors for HMAC, HKDF, PBKDF2, Argon2, ChaCha20-Poly1305, RFC 6979; the BIP254  vectors for BIP-32, BIP-39, BIP-173/350, BIP-340. Differential tests against independent implementations255  (CryptoKit is used in tests only, as an oracle). Negative tests: malformed keys, ciphertexts and256  signatures must be rejected without a crash. Results are reported in `docs/STATUS.md`, not here.257- **Defence in depth for the vault.** The secrets at rest are not protected by the unaudited code alone:258  - the default AEAD for vault records is the system AES-256-GCM (CryptoKit); the engine's AES-256-GCM is259    the same algorithm and is cross-checked against it at start-up; a mismatch stops the application260    before any secret is processed;261  - the password slot combines the engine's Argon2id with the system PBKDF2-HMAC-SHA512, so a flaw that262    makes the engine's Argon2id cheap or predictable leaves the cost of a guess at least at the system263    PBKDF2;264  - randomness comes only from the system generator.265- Ed25519 (added 2026-12-05, signs Solana transactions): RFC 8032 and SLIP-0010 vectors, Wycheproof, the266  ed25519-speccheck edge cases, byte-identical keys and signatures against libsodium, OpenSSL, ed25519-dalek267  and an integer transcription of RFC 8032, verification verdicts identical to ed25519-dalek `verify_strict`268  (the rule Solana validators apply) on adversarial inputs, field, scalar and group arithmetic against Python269  integers. Its nonce is deterministic and every signature is verified before it is returned.270- Deterministic nonces: ECDSA uses RFC 6979; BIP-340 signing derives its nonce from the key, the message271  and auxiliary randomness as the BIP specifies, and verifies each signature before returning it.272  ML-DSA and SLH-DSA default to the hedged variants of their standards, which remain secure if the273  additional randomness is weak.274- Strict input validation on every decoder; no `fatalError` on attacker-controlled input is a rule of the275  code base.276- The mainnet gate (section 7).277278**Residual risk.** High until an independent audit. Tests show the absence of the bugs that were tested279for. There is no defence in depth for transaction signatures: a faulty secp256k1 or Ed25519 implementation280has no second line (the design mitigations are RFC 6979, low-s normalisation, verification after signing for281Schnorr, and differential tests). The combiner does not help against a flaw that *leaks* the password282(for example through a side channel), only against one that weakens the derived key.283284### 5.6 Memory extraction (F, M)285286**Description.** Secrets are recovered from where they transiently live rather than from the vault: RAM287(cold boot, hardware probing, debugger), crash dumps, logs, swap, screenshots and screen recordings, the288app-switcher snapshot, the pasteboard, keyboard caches, notifications, backups of application data.289290**Impact.** Disclosure of A1–A5.291292**Mitigations.**293294- Temporary secrets in the engine are overwritten with `memset_s` (`SecureMemory.zero`); the ML-DSA295  workspace that holds secret polynomials is wiped in its destructor; sponge states that absorbed secrets296  expose `wipe()`; Argon2 erases its memory matrix before returning.297- No key material is logged or printed (rule of the code base).298- The app-switcher snapshot is masked; the vault locks when the application goes to the background299  (*design*).300- Implemented (2026-12-04): the recovery words and a password shown in clear are hidden while the screen is301  being captured or mirrored, and a screenshot of the phrase is reported after the fact; the recovery phrase302  is never placed on the pasteboard; every value copied by the user (addresses included) is placed on the303  pasteboard as a local-only item with an expiry; secret entry fields disable autocorrection, and keyboard304  extensions are refused for the whole application.305306**Residual risk.**307308- **Zeroization in Swift is best effort.** `Array` is a copy-on-write value type: a mutation of a shared309  buffer, a reallocation on growth, a temporary created by an expression such as `a + b`, or bridging to310  `String`/`Data` can leave copies that the code cannot reach. Value types on the stack and in registers311  (for example the 256-bit integers of the secp256k1 code) are not wiped. The recovery phrase is shown to312  the user as text, which implies `String` storage and rendering buffers outside the application's control.313- iOS offers no supported way to prevent the user from taking a screenshot; the application can only react314  after the fact.315- An attacker with physical access to a running, unlocked device and suitable hardware, or with kernel316  privileges, can read process memory. Not defended (5.2).317- Crash reports generated by the operating system contain register and stack contents at the time of the318  crash. QYVORA sends none itself; whether the system shares them depends on the user's device settings.319320### 5.7 Side channels (F, M, co-located code)321322**Description.** Timing, cache access patterns, power consumption and electromagnetic emanation leak323information about secret-dependent computation.324325**Impact.** Recovery of private keys or of the vault key.326327**What the code does.** The engine follows a source-level constant-time discipline for secret data:328329- secp256k1: complete addition and doubling formulas without exceptional cases; scalar multiplication by330  double-and-add-always over a fixed 256 iterations with a masked selection; Montgomery field arithmetic331  with masked final subtraction; no table indexed by a secret.332- ML-KEM: no branch or memory index on secret coefficients; compression by multiplication and shift333  instead of a division instruction; branch-free implicit rejection (masked selection between $K'$ and334  $\bar K$). The compiled decapsulation path (K-PKE decryption and re-encryption, comparison, selection,335  transforms, sampling, encodings, Keccak) is in the machine-code check with a reviewed number of336  conditional branches per function; the only data-dependent ones test bytes expanded from the public337  seed (rejection sampling of the matrix).338- ML-DSA: norm checks accumulate over all coefficients without early exit; branches in the rejection loop339  depend only on rejected candidates, which is the argument of the standard.340- AES: no lookup table; the S-box is computed algebraically on eight bytes in parallel. GHASH reads its341  whole table in a fixed order with masks. ChaCha20 uses only additions, rotations and XORs; Poly1305 uses342  masked final reduction.343- Tag and hash comparisons use a constant-time equality.344- Ed25519 (Solana): field and scalar arithmetic with carries computed by bit arithmetic, complete unified345  addition, fixed 4-bit windows with a table read entirely under a mask, deterministic nonce (RFC 8032),346  verification of each signature before it is returned. The compiled functions of the secret path are in the347  machine-code check; every one of their conditional branches was read in the disassembly (two compiler348  versions) and tests a public value. Since finding QYV-AUD-006 the multiplication of the base point never349  adds the neutral element: with a plain table, scalars whose windows are zero were measurably350  distinguishable by their duration although neither the source nor the machine code had a secret-dependent351  branch or index.352353**What constant-time discipline in Swift can guarantee.** Only that the *source* has no secret-dependent354branch, memory index or variable-time operation that the authors are aware of.355356**What it cannot guarantee.**357358- The Swift compiler and LLVM give no constant-time guarantee. An optimiser may turn a masked selection359  into a conditional branch, and the choice may change with the compiler version or the optimisation level.360- The duration of some CPU instructions can depend on operand values on some processors. Since 2026-12-04361  the engine sets the processor's data-independent-timing flag (PSTATE.DIT) around its operations on secrets362  and restores it afterwards (`DataIndependentTiming`, a forty-line C shim, finding QYV-CRY-004). The flag363  covers the instructions ARM and Apple list for it and nothing else; it was verified on Apple silicon Macs364  and is not read back on an iPhone by any test. The measurements of 2026-12-05 show that the flag matters:365  with the flag clear, the duration of Ed25519 field operations depends on their operands on an M5 Max core,366  and that of the scalar multiplication on an M4 Max core; with the flag set neither is detected367  (`security/audit/review/ed25519-timing-2026-12-05.json`). On a processor without the flag368  (`hw.optional.arm.FEAT_DIT` = 0) the engine cannot set it and nothing was measured.369- Bounds checks, reference counting, allocation and copy-on-write add data-independent but370  hard-to-characterise behaviour; memory allocation patterns are not controlled.371- Argon2id is data-dependent in its second half by design (that is the "d" part of Argon2id).372- Signature verification and the handling of public data are deliberately not constant-time.373- **No countermeasure against power or electromagnetic analysis or fault injection** (no masking, no374  blinding of scalars, no redundancy beyond verify-after-sign for Schnorr).375376**Residual risk.** Remote timing attacks are unlikely to be practical for a wallet that signs on explicit377user action and exposes no signing oracle to the network. A local attacker running code on the device, or378with physical measurement equipment, is not defended. No binary-level constant-time verification has been379done; it is part of the audit scope.380381### 5.8 Failed or biased randomness382383**Description.** The random generator returns predictable, repeated or biased output.384385**Impact.** Predictable recovery phrase or master key (total loss); repeated AES-GCM nonce under one key386(loss of confidentiality and authenticity for the affected records); biased signature nonces (key387recovery).388389**Mitigations.**390391- A single entropy source: the operating system generator (`SecRandomCopyBytes`), through392  `SystemRandom.bytes`. QYVORA implements no generator of its own, and the program stops if the system393  generator reports an error rather than continue with weak randomness.394- Signature nonces do not depend on fresh randomness: RFC 6979 for ECDSA; BIP-340 nonces remain safe with395  zero auxiliary randomness; ML-DSA and SLH-DSA are hedged.396- GCM nonces are 96 random bits per record; a subkey protects far fewer records than the bound of397  SP 800-38D for random nonces ($2^{32}$ invocations per key).398399**Residual risk.** A silently defective system generator at the time the recovery phrase or the master key400is created is **not detectable** by the application and is not defended. No statistical health test in an401application can establish that a generator is unpredictable.402403### 5.9 Vault corruption404405**Description.** The vault file is damaged: interrupted write, storage fault, a bug in the application, a406partial restore, or deliberate tampering.407408**Impact.** Loss of access to funds if no recovery phrase backup exists (availability); with tampering,409attempts to roll back or splice records (integrity).410411**Mitigations (design).**412413- Versioned file format; every record is sealed with AES-256-GCM and its header (format version, record414  identifier, type, creation time) is authenticated as associated data, so a record cannot be moved to415  another identity or type without detection; a whole-file integrity tag detects truncation and the removal416  or reordering of records.417- Atomic writes (write to a temporary file, flush, rename) and a copy of the previous version kept for418  recovery.419- Independent wrapping slots: the loss of one slot (for example the Keychain item after a biometric change)420  does not lose the vault if another slot remains.421- Key rotation: a password change re-wraps the master key; a master-key rotation re-encrypts every record.422- The recovery phrase written on paper remains the ultimate recovery path, and the application insists on423  its verification at creation.424425**Residual risk.** Rollback to the kept previous version is possible for an attacker who can write the426application container (which already implies 5.2). Simultaneous loss of the current and previous files427without a backup is loss of the vault. A user without a recovery phrase backup has no recourse; QYVORA has428no server and cannot help.429430### 5.10 Backup compromise431432**Description.** An exported backup file, or the paper copy of the recovery phrase, falls into other hands:433cloud storage, e-mail, a stolen computer, a photograph of the paper.434435**Impact.** Offline attack on the backup password; with the paper phrase, immediate loss of funds.436437**Mitigations.**438439- Exported backups are encrypted under a key derived from a backup password by the same combiner as the440  master password slot (engine Argon2id and system PBKDF2-HMAC-SHA512 into HKDF), then AES-256-GCM with an441  authenticated header. No public-key cryptography is involved, so there is nothing for Shor's algorithm to442  attack; a recorded backup is exposed to password guessing only.443- Device-to-device transfer uses a hybrid KEM (system X25519 and engine ML-KEM-1024, both shared secrets444  into HKDF) and is signed by the sending wallet's Quantum Identity (ML-DSA-87, optionally also445  SLH-DSA-SHAKE-256f). The receiving user compares identity fingerprints on both screens.446- The device slot and the PIN slot are bound to the device and are never part of an exported backup.447448**Residual risk.** The strength of an exported backup is the strength of its password. The paper recovery449phrase has no cryptographic protection unless the user sets a BIP-39 passphrase; its physical security is450the user's responsibility. If fingerprints are not compared during a transfer, an active attacker in the451channel can substitute their own identity.452453### 5.11 Software supply chain (S)454455**Description.** Malicious code enters through a dependency, the toolchain, the build machine, the signing456identity or the distribution channel.457458**Impact.** Total: a malicious build can exfiltrate keys.459460**Mitigations.**461462- **Zero third-party dependency.** `Package.swift` declares no external package; `Sources/` uses only the463  Swift standard library and system frameworks (`Security` for randomness in the engine; system464  cryptography where the vault design calls for it). Reference implementations appear only in tests.465- Source history in a single repository with reviewed, atomic commits; secret scanning before publication.466- The build machines never see user secrets: every user key is generated on the user's device from the467  system generator, and nothing is provisioned at build time.468- Distribution through the App Store with Apple code signing.469- Test vectors are committed with their source, revision and licence.470471**Residual risk.** The Swift toolchain, Xcode, the iOS SDK and Apple's signing and distribution472infrastructure are trusted. A user cannot check that an App Store binary corresponds to the published473source: App Store binaries are re-signed and encrypted by Apple, and bit-for-bit reproducibility of the474build is a *planned* objective for the unsigned archive only, not a property of version 1. A compromised475developer signing identity or developer machine is not defended beyond ordinary operational security.476477### 5.12 Transaction manipulation478479**Description.** The user signs something other than what they intend.480481| Attack | Mechanism |482|---|---|483| Address substitution | A look-alike address supplied by a web page, a message or malware |484| Clipboard hijack | Another application replaces the copied address before it is pasted |485| QR substitution | A printed or displayed QR code is replaced; a QR code carries a different amount or chain |486| Blind signing of calldata | The user approves contract calldata they cannot interpret (an unlimited token approval, for instance) |487| PSBT tampering in cold mode | The online device, or whoever controls the channel, alters outputs, amounts, change or input data before the offline device signs |488| Change redirection | The change output goes to an address that is not the wallet's |489| Fee inflation | Input amounts are understated or outputs dropped so that the difference is paid as fee |490491**Impact.** Irreversible loss of the amount sent, or of a token balance through an approval.492493**Mitigations.**494495- Local construction and local review: the confirmation screen is rendered from the exact bytes that will496  be signed (recipient, amount, fee, maximum total cost, network), never from what an endpoint or a QR code497  claimed. `EIP1559Transaction.maximumCost` gives the upper bound of what a transaction can spend.498- Address validation by checksum: Base58Check, Bech32 for witness version 0 and Bech32m for version 1 and499  later, EIP-55 for mixed-case Ethereum addresses; an address for the wrong network is rejected.500- Calldata: version 1 builds only ether transfers, ERC-20 `transfer` and ERC-20 `approve`. The decoder501  (`ERC20.decodeCall`) recognises exactly those two calls, rejects malformed encodings and flags the502  unlimited allowance value $2^{256}-1$. QYVORA 1.0 does not create contracts. Calldata that the decoder503  does not recognise is shown as such, and signing it is refused or requires an explicit warning (*design*).504- Cold mode (*design*): the offline device decodes the unsigned transaction itself505  (`EIP1559Transaction.decodeUnsigned` for Ethereum, PSBT for Bitcoin), recomputes which outputs belong to506  the wallet from its own keys, and displays recipient, amount, change and fee from that decoding. For507  Bitcoin inputs it requires data that binds the input amounts: the full previous transaction for508  pre-Taproot inputs, or Taproot inputs whose signature hash commits to all input amounts (BIP-341). The509  signed result returns by QR code.510- Re-authentication before every signature.511512**Residual risk.**513514- Checksums detect typing and transmission errors, not a deliberately substituted valid address. If the515  user does not compare the recipient shown on the confirmation screen with an independent source, a516  substituted address is signed. EIP-55 is optional in practice: an all-lower-case Ethereum address has no517  checksum and is accepted.518- QYVORA does not simulate contract execution. An `approve` or `transfer` to a malicious or broken token519  contract does what the contract code does.520- Cold mode does not help if the offline device itself is compromised, or if the user confirms without521  reading.522- Address poisoning (look-alike addresses planted in the history through dust or zero-value transfers) is523  mitigated only by never proposing recipients from history without full display (*planned*).524525### 5.13 Shoulder surfing and coercion (O, X)526527**Description.** Someone watches the screen while the recovery phrase, the password or the PIN is shown or528typed; or someone forces the user to unlock and sign.529530**Impact.** Disclosure of A1 or A4; forced transfer.531532**Mitigations.** The recovery phrase is shown only on explicit request after re-authentication, with a533warning; secret fields are masked; the app-switcher snapshot is masked; *planned:* concealment while the534screen is captured or mirrored.535536**Residual risk.** Observation by a person or a camera while a secret is displayed is **not defended**.537Coercion is **out of scope**: version 1 has no duress PIN, no decoy wallet and no plausible deniability.538A BIP-39 passphrase gives a separate wallet under the same words, but QYVORA does not present it as a539defence against coercion and makes no claim about it. Biometric unlocking can be compelled physically.540541### 5.14 Threats specific to the chains added on 2026-12-05542543Source: the review registers `security/audit/review/multichain-*.json` and `ed25519.json` (entries with file and544line, what one lying endpoint can do, replay protection), written by the audit extension of 2026-12-05. The545findings quoted are in `security/audit/findings/`. This is an internal review.546547**Common to every family.** The mainnet gate (build declaration and user switch) is one rule applied at every548entry point of every family, and leaving the test networks needs a fresh authentication (QYV-SVC-080). Every549main network has a value ceiling and a fee ceiling for an unaudited build; they are applied when a payment is550prepared and again when it is signed, on the bytes to be signed, and review objects cannot be built or altered551outside the service. A dollar ceiling allows `ceiling / price` units, so a price that is too low lifts it: no552single source decides that price any more (QYV-SVC-087, corrected on 2026-12-05). A built-in dollar-pegged553token is valued at no less than 0.90 USD and refused outside 0.50–2.00; every other token and every native coin554with a dollar ceiling needs two independent sources agreeing within 5 %, the higher being used, and native555coins keep their floors (QYV-SVC-082). Not covered: both sources lying low together about a token that is not556pegged; a wrapped asset quoted at parity while worthless. Transactions are built locally; no557family signs bytes or identifiers supplied by a server. Reads (balances, history, token descriptions, fee558figures) are one endpoint's word in every family: a lying endpoint can mislead and censor; what it can make559the wallet sign is bounded as described below.560561**EVM networks (Base, Arbitrum, OP Mainnet, Polygon, BNB Smart Chain, Avalanche and their test networks).**562One secp256k1 account serves the fourteen networks. A transaction is bound to its network by the EIP-155563chain identifier inside the signed type-2 payload, taken from the wallet's table and never from an endpoint;564legacy transactions are not produced. Before use, every endpoint of a network must answer its chain565identifier. A lying endpoint can show wrong balances, history and token descriptions, deny service, and raise566fee figures up to fixed bounds (and up to the per-transaction fee ceiling on an unaudited mainnet build); it567cannot change what is signed after review. On OP-Stack networks the L1 data fee is charged by the network568outside the signed transaction: the wallet shows a quote with a margin of one quarter, counts it in its569ceilings, refuses to proceed when the quote cannot be read, and cannot bound what the network finally charges570(the interface must present the figure as an estimate, QYV-APP-082). A chain that reused a supported chain571identifier could not be told apart.572573**UTXO coins (Litecoin, Dogecoin, Bitcoin Cash).** *Indexers.* The wallet reads these chains through public574Esplora, Blockbook and Bitcore instances. Each must serve the chain's identity block (genesis; block 661648575for Bitcoin Cash, whose genesis is Bitcoin's). After that, one indexer — the one announcing the highest tip —576decides what is displayed: a lying or compromised endpoint can show a payment that does not exist, hide one,577or report false confirmations (QYV-APP-061, open). It cannot obtain a signature the user did not review,578cannot burn fees and cannot exceed the fee ceilings. *Amounts.* Dogecoin signatures do not commit to the579amounts spent: before signing, every coin is checked against the raw transaction that created it (identifier580recomputed); without that transaction nothing is signed (QYV-SVC-064). Bitcoin Cash (fork id) and Litecoin581P2WPKH (BIP-143) signatures commit to the amount. *Replay.* Bitcoin Cash signatures carry SIGHASH_FORKID and582are invalid on Bitcoin; Bitcoin SV and eCash share that fork id, so a payment of coins older than their583splits (2018-11-15, 2020-11-15) can be replayed there. Since 2026-12-05 the wallet adds a coin created after584the split when it holds one, which makes the transaction invalid on those chains; otherwise it warns and the585service requires the acknowledgement (QYV-APP-062). Not covered: heights are the indexer's, and the ancestry586of a coin is not examined. Litecoin and Dogecoin signatures are bound to outpoints that exist on one chain only; each coin has its587own derivation path on main networks (test networks share coin type 1). *Addresses.* A legacy Base58 Bitcoin588Cash address is also a Bitcoin address: accepted with a critical warning (QYV-SVC-065, QYV-APP-060);589Litecoin's former `3…` P2SH form is refused; SegWit addresses are refused on Dogecoin and Bitcoin Cash.590*Not covered.* Litecoin MWEB (not parsed, QYV-SVC-067); Schnorr signatures on Bitcoin Cash (never produced,591reported unsupported); cold signing for these coins (not offered).592593**Solana.** A Solana address is the Ed25519 public key of the account: the key is public as soon as the594address is shared, and Ed25519 gives no protection against a quantum adversary. Nothing in QYVORA makes Solana595transactions post-quantum. Addresses have no checksum; a substituted or mistyped address is almost always596valid, and addresses that are not curve points (program-derived: token accounts, program state) are valid597too. The engine refuses known programs and recipients that exist and are not wallets, and warns on off-curve,598new and first-time recipients; the comparison by the user is the control (QYV-APP-020, open). A transaction599carries no cluster identifier and the account is the same key on mainnet-beta, devnet and testnet: its recent600blockhash alone ties it to a cluster. A test endpoint that supplied a mainnet blockhash could obtain a601mainnet-valid signature, past the mainnet gate and the limits; the wallet now asks mainnet-beta whether it602knows the blockhash before a test transaction is prepared, signed or relayed, and an offline cold device can603only warn (QYV-SVC-022). A signed transaction stays executable for about 150 blocks; the wallet signs a review604once, re-sends the same bytes, refuses the same payment while one is pending, and declares expiry only on the605unanimous answer of its endpoints (QYV-SVC-021, residual QYV-SVC-025). Endpoints are untrusted for the606integrity of what is signed (transaction built locally, review checked against the decoded bytes,607TransferChecked pins mint and decimals, rent and priority-fee ceilings of 0.01 SOL, limits computed from the608bytes) but trusted, one at a time, for what is displayed, for availability, and for the list of Token-2022609extensions of a mint (a hidden transfer fee or hook can make the recipient receive less than shown).610Transactions the wallet cannot decode entirely (unknown program, lookup tables, durable nonce) are blind:611refused by default on a cold device and always on an unaudited mainnet build. The signatures come from the612from-scratch Ed25519 of section 5.5; its side-channel status is in section 5.7.613614**TRON.** A TRON transaction carries no chain identifier, and the wallet's TRON account is the same secp256k1615key on mainnet, Nile and Shasta. What ties a transaction to one network is its reference block (16 bits of616height and 64 bits of block hash) and its expiration.6176181. *A node supplies the reference block.* A test-network node that hands out a main-network block would619   obtain a signature valid on mainnet. The wallet takes the reference from the agreement of every answering620   node and, on a test network, asks the main-network nodes whether they would accept it, when preparing and621   before signing. It signs nothing valid for more than 65 minutes (QYV-SVC-040, QYV-SVC-041). Not covered: a622   single reachable node; main-network and test endpoints lying together. An offline device cannot make the623   check at all: while the build is unaudited it reviews a test-network TRON or Solana transaction but does624   not sign it (QYV-APP-040, corrected on 2026-12-05); a device that is online signs after the check.6252. *Server-built transactions.* The wallet never signs bytes or an identifier from a node: raw_data is encoded626   locally and the identifier is SHA-256 of those bytes. A received payload must be the canonical encoding of627   what it decodes to.6283. *Fee griefing.* Energy and price figures come from one node; the signed fee limit is capped at 100 TRX at629   prepare and at sign, so a lying node can make a transfer fail and burn at most its fee limit.6304. *Single-answer reads.* Balances, account state, TRC-20 metadata of custom tokens, status and history are631   one node's (or the TronGrid index's) word (QYV-SVC-044, open).6325. *Cross-family addresses.* The 20 bytes of a TRON address are a valid EVM address; the wallet accepts the633   Base58Check form only and refuses the hexadecimal and 0x forms, the zero address and the mainnet burn634   address.6356. *Blind signing.* Only TRX transfers and TRC-20 transfer/approve are decoded; anything else needs an636   explicit flag and is refused on an unaudited mainnet.6377. *TronGrid API key.* Kept in the vault, sent as a header to trongrid.io over https only; never in a URL, a638   log, the profile or a snapshot (tests and three static rules).639640**Shared wallet machinery.** In cold mode the cold device decodes what it shows from the payload alone; Solana641and TRON payloads name no network, so their network label is the online device's word — which is why an642offline device of an unaudited build does not sign them. Every critical warning of a review, hot or cold, must643be acknowledged by its identifier or the service does not sign (QYV-APP-102). The watch-only package is public644and unauthenticated: a substituted package makes the companion show another party's addresses, and deposits645are lost. Both devices now show the code of the package and the first address of each account, and the import646requires the last group of the code as the signing device shows it; the service refuses a code that is not the647package's (QYV-APP-080, corrected on 2026-12-05). What remains is the user's comparison: sixteen bits are648typed, sixty-four are compared by eye, and the package is still not signed. A payment request (QR code, link)649is attacker-controlled: it is parsed with bounds, refused as a whole when the wallet cannot honour it, bound to650the network and asset it names, and it only ever fills the visible form (QYV-APP-101). The profile file is not authenticated; the vault's account binding651(version 2: every family) repairs replaced account data at unlock and is what signatures are checked against.652Persisted chain snapshots are display data, validated and tied to account, network and endpoints; payments653re-read chain state (QYV-SVC-084).654655**Entry points added with the application screens.** (1) *Persisted coin synchronization*656(`utxo-sync-<network>.json`): unauthenticated public data; a local writer can forge a self-consistent record.657It is validated like an indexer answer against the account's own addresses, displayed flagged as the previous658session's, and never used to prepare or sign; no other session state comes from it (QYV-SVC-100). (2) *Sweep659of exposed coins* (Litecoin, Dogecoin, Bitcoin Cash): destination derived by the service on the internal chain660and verified again before signing (QYV-SVC-101); subject to the ceilings of an unaudited build as a whole — no661partial sweep. (3) *Fee quotes*: estimates from one endpoint, behind the mainnet gate, never trusted by a662later step. (4) *Token descriptions*: symbol and decimals of a payment come from the wallet's list or from663what this session read on chain, on every family (QYV-SVC-084, 102, 103); values passed by the interface are664not used. (5) *Profile indices*: bounded at decode (QYV-SVC-104); the profile remains unauthenticated665(QYV-SVC-011). (6) *`acceptUnverifiedAmounts`*: a consent the interface must collect separately (QYV-APP-100);666it lifts no ceiling and nothing on an unaudited mainnet build.667668---669670## 6. Out of scope / not defended671672QYVORA does **not** defend against the following, and no documentation or interface text may suggest673otherwise:6746751. A compromised operating system, a jailbroken device, kernel-level malware, or a malicious keyboard or676   accessibility tool with access to the application's input and screen.6772. Hardware attacks on an unlocked or running device, fault injection, power and electromagnetic analysis.6783. Flaws in iOS, the Secure Enclave, the Keychain, the system random generator or the system cryptography.6794. A quantum attack on a secp256k1 public key that has been exposed. The Bitcoin and Ethereum networks are680   not quantum-resistant, and no wallet can make them so.6815. Loss of the recovery phrase, of every unlock credential, or of the device without a backup. There is no682   server-side recovery.6836. Theft or copying of the paper recovery phrase.6847. A weak master or backup password.6858. Lying endpoints as far as *displayed state* is concerned: QYVORA is not a light client and verifies no686   block or state proof.6879. Network-level privacy: endpoints see the queried addresses and the client IP address.68810. Malicious or defective smart contracts and tokens; phishing sites; social engineering; a recipient689    address the user did not verify.69011. Coercion, and observation of the screen while secrets are displayed.69112. Compromise of the build toolchain, of Apple's signing and distribution, or of the developer's signing692    identity.69313. Blockchain-level events: reorganisations, consensus failures, protocol changes, fee market behaviour.69414. Errors in the unaudited from-scratch engine that the test suite did not reveal. This is the reason for695    section 7.696697## 7. Audit before mainnet698699The engine implements more than twenty primitives from their specifications. Passing the published test700vectors is necessary and is not sufficient: vectors do not exercise rare arithmetic paths, do not measure701side channels and do not review design.702703**Policy.** `MainnetPolicy.auditCompleted` is `false`; `mainnetEnabled` derives from it; while it is false704the application offers only Bitcoin Testnet, Bitcoin Signet and Ethereum Sepolia. The flag may be set only705by a release that documents a completed independent audit.706707**Scope expected of that audit.**7087091. Correctness of every primitive against its specification, including the paths that vectors rarely710   reach (carries and reductions in the 256-bit and lattice arithmetic, rejection branches, boundary711   lengths, counter wrap in the stream ciphers and modes).7122. Validation of every untrusted input: public keys, signatures, ciphertexts, addresses, RLP, transactions,713   PSBT, QR payloads, backup files, endpoint responses.7143. Constant-time behaviour at the level of the compiled binary for the supported compiler versions and715   devices, and the question of data-independent timing on Apple silicon.7164. Zeroization and the lifetime of secrets in memory.7175. The vault: file format, key hierarchy, the password combiner and its parameters, slot semantics, nonce718   management, rollback behaviour, the start-up cross-check.7196. Transaction construction and signature hashing for every supported script and transaction type,720   including cold-mode flows.7217. The hybrid KEM, the transfer protocol and the use of the Quantum Identity.7228. Use of platform security: Keychain attributes, access control flags, Secure Enclave usage, file723   protection, pasteboard and screen handling.7249. The networking layer as an untrusted-input surface.725726**After the audit.** Findings and their resolution are published; the audited commit is identified; the727flag changes in a tagged release. An audit reduces risk and is not a certification: QYVORA holds no728FIPS 140 validation and claims none, and the use of algorithms standardised in FIPS 203, 204 and 205 does729not make the implementation a validated module.730731<!-- BEGIN AUDIT STATUS — section maintained with the security audit engine (security/). Numbers live in732     security/reports/, never here. -->733734## 8. Audit status and residual risks735736> **State on 2026-12-05, after the multi-chain upgrade.** The last committed full run (below) was made on737> commit `36bfa4c`, before the upgrade. The audit engine was then extended to the new code (Ed25519, Solana,738> TRON, Litecoin / Dogecoin / Bitcoin Cash, the EVM networks, the multi-chain service): vectors, differential739> tests against independent libraries, property tests, 43 more fuzz targets, timing and machine-code checks740> for Ed25519, framework items with evidence. That work found and fixed defects (among them a cross-network741> replay on Solana and on TRON, dollar ceilings lifted by a price near zero, a timing difference in the742> Ed25519 base-point multiplication, an expanded key left in a hash state) and first left two high findings743> open — QYV-SVC-087 (token ceilings rested on one price) and QYV-APP-080 (unauthenticated watch-only744> package). Both were corrected in the code on the same day, and the application screens of the new chains,745> which no area of the audit had read, were reviewed: that review found and corrected two more defects746> (QYV-APP-101, payment requests; QYV-APP-102, critical warnings not acknowledged on the cold device) and747> turned the acknowledgement of critical warnings and the comparison of the watch-only package into rules of748> the service, with static checks that run at every audit. Two low findings of the service stay open749> (QYV-SVC-025, QYV-SVC-044). **None of this is an audit result yet**: the reports below are regenerated by750> the next full run on the merged application; until then they describe `36bfa4c`.751752*Section added on 2026-12-04 with the permanent audit engine. It records what kind of audit exists, where753its results are, and which risks remain whatever its results. It contains no test count and no result:754those are generated by a run and belong to the reports.*755756### 8.1 What exists757758An **internal, automated technical audit** lives in `security/` and re-runs with one command,759`./Scripts/security-audit.sh` (`security/README.md` describes it). It combines static analysis (Semgrep760with project rules, mobsfscan, Gitleaks on the tree and on the history, Dontrust), analysis of the compiled761application (MobSF run locally, binary checks), a cryptographic audit (official vectors, Wycheproof,762differential tests against independent implementations, property tests, fuzzing, statistical timing763tests) and three assessments against public references (Coinspect Wallet Security Framework, OWASP MASVS764v2 with the MASTG iOS tests, and the wallet audit of the owner's brief).765766It is **not** the independent audit that section 7 requires:767768- it was written and run by the same project that wrote the code;769- it is not a certification, and no certification is claimed;770- no independent cryptographic review has taken place yet.771772`MainnetPolicy.auditCompleted` therefore stays `false`. Section 7 is unchanged, with one amendment decided773by the owner on 2026-12-04: an internal TestFlight build may declare `QYInternalMainnet`, and the user of774that build may then switch mainnet on, to test with small amounts under per-transaction limits775(`MainnetPolicy.limits`). A public build does not offer mainnet.776777<!-- BEGIN LAST AUDIT RUN (generated by security/audit/report/generate.py from SECURITY_AUDIT_RESULTS.json — do not edit by hand) -->778**Last committed audit run.** 2026-12-05T14:31:23Z · QYVORA 1.0.0 (build 3) · commit `b60686dbecb2` · full run on MacBookPro-de-simon-pierre-2.local · release gate: **passed** (0 blocking condition(s), 6 warning(s)) · findings: 16 open (0 critical, 0 high), 76 fixed, 13 accepted risk. Internal automated technical audit — not an independent certification; no independent cryptographic review yet. Details: [`security/reports/SECURITY_AUDIT_REPORT.md`](../security/reports/SECURITY_AUDIT_REPORT.md).779<!-- END LAST AUDIT RUN -->780781### 8.2 Where the results are782783| Document | Content |784|---|---|785| `security/reports/SECURITY_AUDIT_RESULTS.json` | Machine-readable results of the last committed run: version, commit, date, tool versions and status (RUN / NOT RUN / FAILED), test counts, findings. |786| `security/reports/SECURITY_AUDIT_REPORT.md` · `.html` · `.pdf` | The audit report: methodology, scope and real coverage, results, findings by severity, fixes, residual risks, limits, recommendations. |787| `security/reports/CRYPTOGRAPHIC_VALIDATION_REPORT.pdf` | Vector, differential, property, fuzzing and timing results per algorithm and parameter set. |788| `security/audit/findings/` | The findings register, one file per finding (root cause, impact, severity, CVSS where applicable, status, fix commit, regression test). |789| `security/policies/` | Severity policy, release gate, framework assessments with their evidence. |790| `SECURITY.md` | How to report a vulnerability; supported versions; the status in plain words. |791792Every figure in those reports comes from the JSON written by the run. A tool that could not run is793reported as NOT RUN with the reason.794795### 8.3 Residual risks that no result of this audit removes796797These follow from the threats of section 5 and from the assessments in `security/policies/`. Open findings798and their current status are in the register; this list is the standing part.7998001. **Unreviewed cryptography on the signing path (5.5).** Vectors, differential tests and fuzzing find801   many defects and prove the absence of none. Until an independent review, a defect in secp256k1802   arithmetic, nonce derivation, BIP-32 or address encoding could cost funds. The vault is better placed803   (system AEAD by default, two independent key-derivation implementations combined).8042. **Side channels (5.7).** Swift gives no constant-time guarantee. The processor's data-independent-timing805   flag is set around operations on secrets and the compiled code is checked for new branches at every audit;806   the audit's timing tests remain statistical evidence on particular machines and compiler versions, not807   proof, and a difference they report may come from the measurement rather than from the engine (QYV-AUD-005808   was such a case: the harness was corrected and a control now watches for it); there is no power or809   electromagnetic analysis.8103. **Secrets in memory (5.6).** On the signing path the phrase, the seed and the derived keys are bytes811   erased in place after each signature. Passwords, PINs, the recovery words where they are displayed or812   typed, the scalars of secp256k1 on the stack and the scratch of the hash functions still pass through813   values that the language may copy and that cannot be wiped (QYV-CRY-003, open).8144. **Compromised device (5.2).** The application warns when it sees the files of a jailbreak or an attached815   debugger, before a recovery phrase is shown or typed; it has no tamper resistance and the checks can be816   hidden from it. On such a device the unlocked master key and the Keychain items are exposed, and the PIN817   then protects only as much as an offline search over its digits.8185. **Local authentication policy (5.1).** The password is the root of the vault and of a backup file:819   its strength decides what an attacker holding the file can do; the service refuses the weakest ones820   (ten characters, a "fair" estimate) and cannot measure real guessing entropy. Sensitive actions are tied821   to a credential verified in the last two minutes, and the auto-lock (fifteen minutes at most, no822   "never") is applied by the application; in the background iOS suspends the process, so an expired delay823   is applied when the application returns.8246. **Endpoints (5.3).** No certificate pinning, by design: there is no QYVORA server and the endpoints825   are public services or the user's own nodes. A lying endpoint cannot change what is signed; it can lie826   about balances, history, fee levels within the hard caps and prices, and it learns the wallet's827   addresses and the device's IP address.8287. **Quantum attackers (5.4).** Post-quantum algorithms protect the transfer of the vault between829   devices and authenticate backups and identities; the vault and backup files rest on 256-bit symmetric830   cryptography. **None of this makes Bitcoin or Ethereum transactions quantum-resistant**: they are831   authorised by secp256k1 signatures, and an output whose public key is known is exposed to an adversary832   able to break that curve, whatever the wallet does. Bitcoin transactions also carry no chain833   identifier (no replay protection across a fork sharing its rules); Ethereum transactions carry the834   chain id (EIP-155 semantics inside type-2 payloads).8358. **Coverage of the audit itself.** Static rules for Swift are limited; no dynamic analysis on a836   device was performed (no runtime instrumentation, no traffic interception); fuzzing is837   mutation-based where the toolchain offers no coverage guidance; the framework assessments are838   self-assessments. The reports state these limits next to each result.839840### 8.4 Before any recommendation to use real funds841842A working application; conclusive cryptographic tests; a complete automated audit on the final commit;843no unresolved critical or high finding; reproducible reports; **and an independent cryptographic review**.844Until the last item exists, QYVORA is experimental software and must not hold funds its user cannot845afford to lose.846847<!-- END AUDIT STATUS -->848
Files main
Menu

Theme