Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@joncinque
Copy link
Collaborator

Problem

The libsecp256k1 crate used by the secp256k1-program is unmaintained, but its types appear in the public API of the crate, so we can't upgrade or change the library without breaking users.

Summary of changes

Abstract away the usage of libsecp256k1 by introducing new generic functions that simply take in byte arrays.

@joncinque joncinque requested a review from samkim-crypto April 1, 2025 23:14
@joncinque joncinque changed the title secp256k1: Remove libsecp256k1 from public interface secp256k1: Deprecate libsecp256k1 from public interface Apr 1, 2025
Copy link
Contributor

@samkim-crypto samkim-crypto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay on this one. The API changes make a lot of sense to me. I double checked the pubkey serialization/indexing. I went through the doc changes and did not find anything. Everything looks fine to me!

#### Problem

The libsecp256k1 crate used by the secp256k1-program is unmaintained,
but its types appear in the public API of the crate, so we can't upgrade
or change the library without breaking users.

#### Summary of changes

Abstract away the usage of libsecp256k1 by introducing new generic
functions that simply take in byte arrays.
@joncinque joncinque enabled auto-merge (squash) April 4, 2025 09:59
@joncinque joncinque merged commit 13d4868 into anza-xyz:master Apr 4, 2025
22 checks passed
@joncinque joncinque deleted the nolibsecp branch April 4, 2025 11:12
joncinque added a commit to joncinque/solana-sdk that referenced this pull request Apr 4, 2025
#### Problem

This is anza-xyz#114, but for secp256r1 instead, removing external types from
the public interface.

#### Summary of changes

This one was a bit more complicated because it uses openssl types, which
aren't as straightforward as simple bytes, so it uses bytes encoded in
DER as the interface. This seemed like the most standard format from
simple web searching, but I'm certainly no expert in this area.

There seemed to also be a lot of vecs in the new instruction
implementation, which shouldn't be necessary, so I changed those to
arrays.
joncinque added a commit that referenced this pull request Apr 9, 2025
* secp256r1: Deprecate openssl types in public API

#### Problem

This is #114, but for secp256r1 instead, removing external types from
the public interface.

#### Summary of changes

This one was a bit more complicated because it uses openssl types, which
aren't as straightforward as simple bytes, so it uses bytes encoded in
DER as the interface. This seemed like the most standard format from
simple web searching, but I'm certainly no expert in this area.

There seemed to also be a lot of vecs in the new instruction
implementation, which shouldn't be necessary, so I changed those to
arrays.

* Rename variable
febo pushed a commit to febo/solana-sdk that referenced this pull request Sep 21, 2025
* secp256r1: Deprecate openssl types in public API

#### Problem

This is anza-xyz#114, but for secp256r1 instead, removing external types from
the public interface.

#### Summary of changes

This one was a bit more complicated because it uses openssl types, which
aren't as straightforward as simple bytes, so it uses bytes encoded in
DER as the interface. This seemed like the most standard format from
simple web searching, but I'm certainly no expert in this area.

There seemed to also be a lot of vecs in the new instruction
implementation, which shouldn't be necessary, so I changed those to
arrays.

* Rename variable
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