SPB Git

Repository Public

QYV-APP-007.json 4.2 KB 32 lines json

1{2  "id": "QYV-APP-007",3  "title": "Transaction signing relies on cryptography written from scratch that has no independent review",4  "severity": "medium",5  "cvss_vector": "",6  "cvss_score": null,7  "cwe": "CWE-1240",8  "masvs": "MASVS-CRYPTO-1",9  "area": "crypto",10  "location": "Sources/QyvoraCore/Networks.swift:90",11  "tool": "manual-review",12  "rule": "",13  "status": "open",14  "fix_commit": "",15  "regression_test": "QyvoraCryptoTests.EngineTests.selfTestPasses; QyvoraSecp256k1Tests (RFC 6979 vectors, Wycheproof in the audit package)",16  "description": "Root cause: a design decision of the project: every primitive is implemented in this repository. The local vault is defended in depth (system AEAD by default, key stretching combined with CommonCrypto's PBKDF2), but secp256k1 (ECDSA with RFC 6979, Schnorr), BIP-32 derivation, Keccak-256, RIPEMD-160 and the address encodings have no second implementation in the signing path. Swift gives no constant-time guarantee. Impact: an undiscovered defect in scalar arithmetic, nonce generation or derivation could expose a private key or send funds to an unspendable address. The internal audit (official vectors, differential tests against independent implementations, property tests, fuzzing, statistical timing tests) lowers this risk and does not remove it.",17  "recommendation": "Keep the mainnet gate and the per-transaction limits until an independent cryptographic review is completed; publish the audit reports with their limits; do not recommend the wallet for significant funds before that review. Not a defect that a code change closes.",18  "evidence": "public static let auditCompleted = false",19  "fingerprint": "65dc1da48e54",20  "frameworks": [21    "WSC-7.2",22    "MASVS-CRYPTO-1"23  ],24  "reported": "2026-12-04",25  "owner": "integrator",26  "open_note": "Standing limitation: not a defect that a code change closes. Defence in depth added on 2026-12-04: (1) `Secp256k1.sign` verifies every ECDSA signature it produces against the public key recomputed from the private key before returning it (b806c00; Schnorr already did); (2) the start-up self-test now includes an ECDSA signing known answer (RFC 6979, key 1, 'Satoshi Nakamoto'), its verification, the refusal of a modified digest and public-key recovery (2401ef7); (3) confirmed in the current service: before any signature the key derived from the vault is compared with the stored account (BIP-84 account xpub for Bitcoin, address for Ethereum), every Bitcoin signature is verified by `BitcoinVerifier` and the txid compared with the reviewed plan, every Ethereum transaction is decoded again, its sender recovered and its content compared with what was reviewed; (4) the processor's DIT flag is set around operations on secrets (QYV-CRY-004).",27  "proposed_disposition": "Keep open until an independent cryptographic review is completed; keep the mainnet gate and the per-transaction ceilings (value and, since QYV-SVC-009, fees). Owner decision required for any other disposition.",28  "updated": "2026-12-04",29  "mitigation_commit": "b806c00, 2401ef7",30  "resolution_note": "Still open. Standing limitation: not a defect that a code change closes. Defence in depth added on 2026-12-04: (1) `Secp256k1.sign` verifies every ECDSA signature it produces against the public key recomputed from the private key before returning it (b806c00; Schnorr already did); (2) the start-up self-test now includes an ECDSA signing known answer (RFC 6979, key 1, 'Satoshi Nakamoto'), its verification, the refusal of a modified digest and public-key recovery (2401ef7); (3) confirmed in the current service: before any signature the key derived from the vault is compared with the stored account (BIP-84 account xpub for Bitcoin, address for Ethereum), every Bitcoin signature is verified by `BitcoinVerifier` and the txid compared with the reviewed plan, every Ethereum transaction is decoded again, its sender recovered and its content compared with what was reviewed; (4) the processor's DIT flag is set around operations on secrets (QYV-CRY-004). Proposed disposition: Keep open until an independent cryptographic review is completed; keep the mainnet gate and the per-transaction ceilings (value and, since QYV-SVC-009, fees). Owner decision required for any other disposition."31}32
Files main
Menu

Theme