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

feat: default to uncompressed keys #2165

Merged

Conversation

berendsliedrecht
Copy link
Contributor

@berendsliedrecht berendsliedrecht commented Jan 30, 2025

  • Default to uncompressed keys (for secp256r1, secp256k1, secp384r1 and secp521r1)
  • Do not rely on JS bn libraries, but on the native BigInt (available from ES2020 and in node.js + RN)
  • Rely less on Buffer and more on Uint8Array

TODO for future crypto changes:

  • Only use Buffer for base conversion, otherwise rely purely on Uint8Array

Copy link

changeset-bot bot commented Jan 30, 2025

🦋 Changeset detected

Latest commit: d7df917

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
Name Type
@credo-ts/anoncreds Minor
@credo-ts/askar Minor
@credo-ts/core Minor
@credo-ts/cheqd Minor
@credo-ts/indy-sdk-to-askar-migration Minor
@credo-ts/indy-vdr Minor
@credo-ts/action-menu Minor
@credo-ts/bbs-signatures Minor
@credo-ts/didcomm Minor
@credo-ts/drpc Minor
@credo-ts/node Minor
@credo-ts/openid4vc Minor
@credo-ts/question-answer Minor
@credo-ts/react-native Minor
@credo-ts/tenants Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@berendsliedrecht berendsliedrecht force-pushed the key-compression branch 2 times, most recently from 3a5b77f to 7075bbc Compare February 3, 2025 10:09
@berendsliedrecht berendsliedrecht marked this pull request as ready for review February 3, 2025 10:16
@berendsliedrecht berendsliedrecht requested a review from a team as a code owner February 3, 2025 10:16
Copy link
Contributor

@TimoGlastra TimoGlastra left a comment

Choose a reason for hiding this comment

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

Nice! Changes look good overall. Left multiple comments regarding changesets. Can you also add one for the general change of this pr?

…ative implementations

- By default rely on uncompressed keys instead of compressed (for P256, P384, P521 and K256)
- Utilze Uint8Array more instead of Buffer (i.e. for internally representing a key)

Signed-off-by: Berend Sliedrecht <[email protected]>
@berendsliedrecht berendsliedrecht force-pushed the key-compression branch 4 times, most recently from 7652bf8 to 0451302 Compare February 11, 2025 09:09
…key bytes representation

- Remove dependency on external Big Number libraries
- Default to use of uncompressed keys for Secp256k1, Secp256r1, Secp384r1 and Secp521r1

Signed-off-by: Berend Sliedrecht <[email protected]>
@berendsliedrecht berendsliedrecht enabled auto-merge (squash) February 11, 2025 09:42
@berendsliedrecht berendsliedrecht merged commit 297d209 into openwallet-foundation:main Feb 11, 2025
16 checks passed
auer-martin pushed a commit to auer-martin/aries-framework-javascript that referenced this pull request Feb 19, 2025
* feat: support A128CBC-HS256 encryption algorithm for JWE (openwallet-foundation#2174)

Signed-off-by: Timo Glastra <[email protected]>

* fix(cheqd): cheqd revocationRegistryDefinition resource name (openwallet-foundation#2139)

Signed-off-by: DaevMithran <[email protected]>

* refactor: split async `getData` method on x509 certificate (openwallet-foundation#2180)

* feat: default to uncompressed keys (openwallet-foundation#2165)

Signed-off-by: Berend Sliedrecht <[email protected]>

* chore: update @hyperledger/aries-askar to @openwallet-foundation/askar (openwallet-foundation#2188)

Signed-off-by: Berend Sliedrecht <[email protected]>

* fix: typo statefull -> stateful (openwallet-foundation#2189)

Signed-off-by: Timo Glastra <[email protected]>

* chore: update ec-compression (openwallet-foundation#2190)

Signed-off-by: Berend Sliedrecht <[email protected]>

* chore(mdoc): update dependency (openwallet-foundation#2191)

Signed-off-by: Berend Sliedrecht <[email protected]>
Co-authored-by: Timo Glastra <[email protected]>

* chore(mdoc): export DateOnly from @animo-id/mdoc (openwallet-foundation#2192)

Signed-off-by: Berend Sliedrecht <[email protected]>

* fix(askar): use compressed key as identifier (openwallet-foundation#2193)

Signed-off-by: Timo Glastra <[email protected]>

* add local packed files

Signed-off-by: Timo Glastra <[email protected]>

* feat: enable dcql selection

Signed-off-by: Timo Glastra <[email protected]>

* fix typing dcql selection

Signed-off-by: Timo Glastra <[email protected]>

* dc api session transcript options

Signed-off-by: Timo Glastra <[email protected]>

* fix: import

Signed-off-by: Timo Glastra <[email protected]>

* add binaries

Signed-off-by: Timo Glastra <[email protected]>

* remove binaries

Signed-off-by: Timo Glastra <[email protected]>

---------

Signed-off-by: Timo Glastra <[email protected]>
Signed-off-by: DaevMithran <[email protected]>
Signed-off-by: Berend Sliedrecht <[email protected]>
Co-authored-by: DaevMithran <[email protected]>
Co-authored-by: Berend Sliedrecht <[email protected]>
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