Repository navigation
feat: verify CoinCover safe-root issuance proofs - #10317
Draft
davidkaplanbitgo wants to merge 1 commit into
Draft
davidkaplanbitgo wants to merge 1 commit into
davidkaplanbitgo wants to merge 1 commit into
Conversation
Add the shared verifier for the CoinCover root proof (guide v1.1 section 6), so the SDK can check an issued backup root itself instead of trusting wallet-platform. - verifyCoinCoverSafeRootProof: checks the signed field set, key id, enterprise and safe, the base64 DER P-256 signature over the exact received signed_payload bytes, and that the stored root pub encodes the signed public key (depth-0 xpub for secp256k1, 103-char base32 for ed25519). The payload is never re-serialised. - Attestation keys are pinned per environment next to hsmXpub and accept hex, base64 raw, base64 SPKI or PEM, because CoinCover has not published the encoding. They are empty until WCN-5246, so verification fails closed. Ticket: WCN-4832
Contributor
Contributor
|
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: WCN-4832
Adds the shared verifier for CoinCover's safe-root issuance proof (guide v1.1 §6), so the SDK can check an issued backup root itself instead of trusting wallet-platform.
What
verifyCoinCoverSafeRootProofinmodules/sdk-core/src/bitgo/safe/coincoverRootProof.ts:key_id, enterprise and safesigned_payloadbytes — the payload is never re-serialisedpubencodes the signed public key: depth-0 xpub for secp256k1 (pubkey ‖ chainCode), 103-char base32 for ed25519environments.ts, next tohsmXpub, as an array so rotation can overlap.Review notes
x||ypoint, base64 DER SPKI and PEM; anything else fails closed. Their illustrativecrypto.verify(...)call implies a NodeKeyObject/PEM, which is why SPKI and PEM are handled.coinCoverAttestationPublicKeysis empty for prod and test until the real keys arrive (WCN-5246). Verification fails closed, so enabling the WP flag before the keys are pinned turns every CoinCover safe creation into an archived safe.