-
Notifications
You must be signed in to change notification settings - Fork 87
Implement a cryptographic nonce manager with replay protection and bounded memory #373
Copy link
Copy link
Open
Labels
GrantFox OSSGrantFox Open Source Sponsorship program tagGrantFox Open Source Sponsorship program tagMaybe RewardedIssue may qualify for a reward upon successful completion per campaign rulesIssue may qualify for a reward upon successful completion per campaign rulesThird CampaignOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsadvancedAdvanced difficulty tasks requiring significant domain knowledge and implementation effortAdvanced difficulty tasks requiring significant domain knowledge and implementation effortbackendBackend services, application logic, persistence integration, and server-side functionalityBackend services, application logic, persistence integration, and server-side functionalityconsistencyPattern and convention standardization across the codebase for uniformityPattern and convention standardization across the codebase for uniformitysecuritySecurity-related fix, hardening, audit, or vulnerability remediationSecurity-related fix, hardening, audit, or vulnerability remediation
Description
Activity
Metadata
Metadata
Assignees
Labels
GrantFox OSSGrantFox Open Source Sponsorship program tagGrantFox Open Source Sponsorship program tagMaybe RewardedIssue may qualify for a reward upon successful completion per campaign rulesIssue may qualify for a reward upon successful completion per campaign rulesThird CampaignOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsadvancedAdvanced difficulty tasks requiring significant domain knowledge and implementation effortAdvanced difficulty tasks requiring significant domain knowledge and implementation effortbackendBackend services, application logic, persistence integration, and server-side functionalityBackend services, application logic, persistence integration, and server-side functionalityconsistencyPattern and convention standardization across the codebase for uniformityPattern and convention standardization across the codebase for uniformitysecuritySecurity-related fix, hardening, audit, or vulnerability remediationSecurity-related fix, hardening, audit, or vulnerability remediation
Difficulty: Advanced
Type: Feature
Recommended labels (if available in this repo): security, backend, consistency, advanced
Background
GuildPass will eventually perform signed operations where one-time challenges or nonces are useful for preventing replay. Before any specific wallet-signature or authentication flow exists, Core can establish a reusable nonce lifecycle primitive.
This issue introduces an in-memory nonce manager with explicit issuance, consumption and expiration semantics.
Problem
A nonce that can be reused defeats replay protection. At the same time, an in-memory nonce store that never removes expired records can grow without bound.
Core needs deterministic one-time-use semantics with secure nonce generation and bounded state.
Expected Outcome
Implement a framework-independent nonce manager that securely generates opaque nonces, tracks their validity and guarantees that a valid nonce can be consumed at most once.
Suggested Implementation
The module should:
Acceptance Criteria
pnpm typecheckpasses.pnpm buildpasses.pnpm testpasses.Likely Affected Files/Directories
Independence Requirement
This issue must be independently implementable from the current
mainbranch and must not rely on wallet authentication, Redis or any other campaign contribution.