Skip to content

Optimize IsOnCurve and upgrade edwards25519#390

Merged
HealthyBuilder merged 2 commits intosolana-foundation:mainfrom
gojuukaze:upgrade_edwards
Apr 16, 2026
Merged

Optimize IsOnCurve and upgrade edwards25519#390
HealthyBuilder merged 2 commits intosolana-foundation:mainfrom
gojuukaze:upgrade_edwards

Conversation

@gojuukaze
Copy link
Copy Markdown

@gojuukaze gojuukaze commented Apr 13, 2026

1. Optimize IsOnCurve implementation

The original implementation relied on:

new(edwards25519.Point).SetBytes(b)

to determine whether a public key lies on the Ed25519 curve. However, SetBytes performs additional computations after deriving wasSquare, which are unnecessary for this validation use case.

This PR inlines the relevant logic from SetBytes and removes the redundant steps, resulting in a more efficient IsOnCurve check without changing its behavior.

2. Upgrade filippo.io/edwards25519 to v1.2.0

Upgraded from v1.1.0 to v1.2.0 to address a known vulnerability: CVE-2026-26958

Although this issue does not directly impact solana-go, upgrading ensures better security hygiene and avoids potential future risks.

@HealthyBuilder
Copy link
Copy Markdown
Collaborator

Nice optimization + CVE fix. Merging. Thanks @gojuukaze!

@HealthyBuilder HealthyBuilder merged commit 6d277b6 into solana-foundation:main Apr 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants