Skip to content

tlock: harden hex helpers and add seal/open input validation #191

Description

@karagozemin

fromHex currently decodes each byte with parseInt(..., 16), which silently turns non-hex input into NaN-mangled bytes instead of failing. Add strict hex validation (and an exported isValidHex helper) so malformed hex fails loudly.

Also add guard clauses to sealBid (reject a non-positive Drand round) and openBid (reject an empty ciphertext) so callers get clear errors instead of obscure downstream failures.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions