Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightweight ECDSA-Sig-Value DER #926

Open
npmccallum opened this issue Mar 11, 2025 · 2 comments
Open

Lightweight ECDSA-Sig-Value DER #926

npmccallum opened this issue Mar 11, 2025 · 2 comments

Comments

@npmccallum
Copy link
Contributor

I need the ECDSA-Sig-Value for der encoding. This currently lives in the ecdsa crate. However, there's no lightweight way to get this type. Attempting to depend on ecdsa with minimal features looks like this:

├── ecdsa v0.16.9
│   ├── der v0.7.9 (*)
│   ├── digest v0.10.7
│   │   ├── block-buffer v0.10.4
│   │   │   └── generic-array v0.14.7
│   │   │       ├── typenum v1.18.0
│   │   │       └── zeroize v1.8.1
│   │   │       [build-dependencies]
│   │   │       └── version_check v0.9.5
│   │   ├── const-oid v0.9.6
│   │   └── crypto-common v0.1.6
│   │       ├── generic-array v0.14.7 (*)
│   │       └── typenum v1.18.0
│   ├── elliptic-curve v0.13.8
│   │   ├── base16ct v0.2.0
│   │   ├── crypto-bigint v0.5.5
│   │   │   ├── generic-array v0.14.7 (*)
│   │   │   ├── rand_core v0.6.4
│   │   │   ├── subtle v2.6.1
│   │   │   └── zeroize v1.8.1
│   │   ├── digest v0.10.7 (*)
│   │   ├── generic-array v0.14.7 (*)
│   │   ├── rand_core v0.6.4
│   │   ├── sec1 v0.7.3
│   │   │   ├── base16ct v0.2.0
│   │   │   ├── der v0.7.9 (*)
│   │   │   ├── generic-array v0.14.7 (*)
│   │   │   ├── subtle v2.6.1
│   │   │   └── zeroize v1.8.1
│   │   ├── subtle v2.6.1
│   │   └── zeroize v1.8.1
│   └── signature v2.2.0
│       ├── digest v0.10.7 (*)
│       └── rand_core v0.6.4

That's quite a large dependency tree just for ECDSA-Sig-Value.

@tarcieri
Copy link
Member

It may be possible to make the digest crate optional, but the generics for curve-specific serialized sizes are all built around the elliptic-curve crate, so eliminating that would require some pretty major restructuring of how the ecdsa crate works which would likely incur negative usability impacts

@tarcieri
Copy link
Member

#927 should remove the default digest dependency (which makes little sense as we already have a digest feature)

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

No branches or pull requests

2 participants