Skip to content

Commit 2c2b4f1

Browse files
committed
chore: bump @noble/curves
1 parent e25685f commit 2c2b4f1

4 files changed

Lines changed: 17 additions & 10 deletions

File tree

packages/device-authenticity/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"prepublish": "yarn tsx ../../scripts/prepublish.js"
3333
},
3434
"dependencies": {
35-
"@noble/curves": "^1.9.7",
35+
"@noble/curves": "^2.0.1",
3636
"@trezor/crypto-utils": "workspace:*",
3737
"@trezor/protobuf": "workspace:*",
3838
"@trezor/schema-utils": "workspace:*",

suite-common/wallet-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"dependencies": {
1414
"@mobily/ts-belt": "^3.13.1",
15-
"@noble/curves": "^1.9.7",
15+
"@noble/curves": "^2.0.1",
1616
"@noble/hashes": "^1.6.1",
1717
"@reduxjs/toolkit": "2.10.1",
1818
"@suite-common/bluetooth": "workspace:*",

suite-common/wallet-core/src/device/delegatedIdentityKey/getProofOfDelegatedIdentity.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { p256 } from '@noble/curves/nist';
1+
import { p256 } from '@noble/curves/nist.js';
22
import { sha256 } from '@noble/hashes/sha2';
33

44
import { DelegatedIdentityKey } from '@suite-common/suite-types';
@@ -20,9 +20,7 @@ export const getProofOfDelegatedIdentity = ({
2020
]);
2121

2222
const messageDigest = sha256(prefixedMessageInBuffer);
23-
const signature = p256.sign(messageDigest, delegatedKey);
23+
const signature = p256.sign(messageDigest, Buffer.from(delegatedKey));
2424

25-
return asProofOfDelegatedIdentity(
26-
Buffer.from(signature.toBytes('compact').buffer).toString('hex'),
27-
);
25+
return asProofOfDelegatedIdentity(Buffer.from(signature.buffer).toString('hex'));
2826
};

yarn.lock

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6221,7 +6221,7 @@ __metadata:
62216221
languageName: node
62226222
linkType: hard
62236223

6224-
"@noble/curves@npm:^1.0.0, @noble/curves@npm:^1.6.0, @noble/curves@npm:^1.9.6, @noble/curves@npm:^1.9.7, @noble/curves@npm:~1.9.0":
6224+
"@noble/curves@npm:^1.0.0, @noble/curves@npm:^1.6.0, @noble/curves@npm:^1.9.6, @noble/curves@npm:~1.9.0":
62256225
version: 1.9.7
62266226
resolution: "@noble/curves@npm:1.9.7"
62276227
dependencies:
@@ -6230,6 +6230,15 @@ __metadata:
62306230
languageName: node
62316231
linkType: hard
62326232

6233+
"@noble/curves@npm:^2.0.1":
6234+
version: 2.0.1
6235+
resolution: "@noble/curves@npm:2.0.1"
6236+
dependencies:
6237+
"@noble/hashes": "npm:2.0.1"
6238+
checksum: 10/e826af523f40a671601a6d07f98df16c3afe1cbd0349c3ba4d7b31f6dba7dc743822719f260bd291716b6b42b8dc327f94a76b4852359aa85f79df461eb22bfc
6239+
languageName: node
6240+
linkType: hard
6241+
62336242
"@noble/hashes@npm:1.4.0, @noble/hashes@npm:~1.4.0":
62346243
version: 1.4.0
62356244
resolution: "@noble/hashes@npm:1.4.0"
@@ -10959,7 +10968,7 @@ __metadata:
1095910968
resolution: "@suite-common/wallet-core@workspace:suite-common/wallet-core"
1096010969
dependencies:
1096110970
"@mobily/ts-belt": "npm:^3.13.1"
10962-
"@noble/curves": "npm:^1.9.7"
10971+
"@noble/curves": "npm:^2.0.1"
1096310972
"@noble/hashes": "npm:^1.6.1"
1096410973
"@reduxjs/toolkit": "npm:2.10.1"
1096510974
"@suite-common/bluetooth": "workspace:*"
@@ -13964,7 +13973,7 @@ __metadata:
1396413973
version: 0.0.0-use.local
1396513974
resolution: "@trezor/device-authenticity@workspace:packages/device-authenticity"
1396613975
dependencies:
13967-
"@noble/curves": "npm:^1.9.7"
13976+
"@noble/curves": "npm:^2.0.1"
1396813977
"@trezor/crypto-utils": "workspace:*"
1396913978
"@trezor/protobuf": "workspace:*"
1397013979
"@trezor/schema-utils": "workspace:*"

0 commit comments

Comments
 (0)