Skip to content

Commit

Permalink
Add encryption key params as required property to encrypted secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
sisou committed Sep 24, 2024
1 parent f7c05fb commit 4a740c6
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 19 deletions.
8 changes: 8 additions & 0 deletions client/PublicRequestTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,12 @@ export interface SignedTransaction {
};
}

export interface EncryptionKeyParams {
kdf: string;
iterations: number;
keySize: number;
}

export interface MultisigInfo {
publicKeys: Bytes[];
numberOfSigners: number;
Expand All @@ -252,6 +258,7 @@ export interface MultisigInfo {
} | {
encryptedSecrets: Bytes[];
bScalar: Bytes;
keyParams: EncryptionKeyParams;
};
aggregatedCommitment: Bytes;
userName?: string;
Expand Down Expand Up @@ -613,6 +620,7 @@ export interface ConnectedAccount {
keyData: Uint8Array,
algorithm: { name: string, hash: string },
keyUsages: ['encrypt'],
keyParams: EncryptionKeyParams,
};
account: {
label: string;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@nimiq/electrum-client": "https://github.com/nimiq/electrum-client#build",
"@nimiq/fastspot-api": "^1.8.0",
"@nimiq/iqons": "^1.5.2",
"@nimiq/keyguard-client": "^1.6.0",
"@nimiq/keyguard-client": "https://gitpkg.now.sh/nimiq/keyguard?scripts.postinstall=cd%20client%20%26%26%20.%2Fbuild-gitpkg.sh&a62aa9f557e2ac4c0d7306828e423230f423a0f1",
"@nimiq/ledger-api": "^2.3.0",
"@nimiq/network-client": "^0.6.2",
"@nimiq/oasis-api": "^1.1.1",
Expand Down
8 changes: 8 additions & 0 deletions src/i18n/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ msgstr ""
msgid "All labels saved."
msgstr ""

#: src/views/ConnectAccount.vue:8
msgid "All private funds remain separate."
msgstr ""

#: src/components/CheckoutCardBitcoin.vue:30
#: src/components/CheckoutCardEthereum.vue:27
#: src/components/CheckoutCardNimiqExternal.vue:32
Expand Down Expand Up @@ -1270,6 +1274,10 @@ msgstr ""
msgid "Your {app} app is outdated. Please update your Ledger firmware and {app} app using Ledger Live."
msgstr ""

#: src/views/ConnectAccount.vue:7
msgid "Your account will be used for approving only."
msgstr ""

#: src/views/LoginSuccess.vue:194
#: src/views/SignupLedger.vue:106
msgid ""
Expand Down
1 change: 1 addition & 0 deletions src/lib/RequestParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,7 @@ export class RequestParser {
(bytes) => parseBytes(bytes),
),
bScalar: parseBytes(signMultisigTxRequest.multisigConfig.secret.bScalar),
keyParams: signMultisigTxRequest.multisigConfig.secret.keyParams,
},
aggregatedCommitment: parseBytes(signMultisigTxRequest.multisigConfig.aggregatedCommitment),
userName: signMultisigTxRequest.multisigConfig.userName,
Expand Down
5 changes: 5 additions & 0 deletions src/lib/RequestTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ export interface ParsedMultisigInfo {
} | {
encryptedSecrets: Uint8Array[];
bScalar: Uint8Array;
keyParams: {
kdf: string;
iterations: number;
keySize: number;
};
};
aggregatedCommitment: Uint8Array;
userName?: string;
Expand Down
21 changes: 3 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1978,11 +1978,6 @@
resolved "https://registry.yarnpkg.com/@nimiq/core-web/-/core-web-1.5.3.tgz#f0a4de59394f210f2c2d9cda8ee35c716847d40e"
integrity sha512-W66SS9n3ygYgD52r1GJr1WtYYOkcZsqdtMmDCEwDvkrmeARnHs2sAvj77Wt4PQG8JA7GwK5svIJr6rGccCaekw==

"@nimiq/[email protected]":
version "1.5.8"
resolved "https://registry.yarnpkg.com/@nimiq/core-web/-/core-web-1.5.8.tgz#da8abef84c6d293cbb9ca495a77f08daa08886b9"
integrity sha512-MNpFbGZetz2eZcHtJVa5tpmLjPf65mTcJBRQkOHS8kWE+f+Z++hdnwWUBQCEAph4oC6bsE5JSuU7VpwcogN7+w==

"@nimiq/core-web@^1.6.0", "@nimiq/core-web@^1.6.1":
version "1.6.1"
resolved "https://registry.yarnpkg.com/@nimiq/core-web/-/core-web-1.6.1.tgz#97cb5b43b257c7f6f6808ef603e9bf686377241f"
Expand Down Expand Up @@ -2033,14 +2028,9 @@
btoa "^1.1.2"
node-lmdb "^0.9.6"

"@nimiq/keyguard-client@^1.6.0":
version "1.6.0"
resolved "https://registry.yarnpkg.com/@nimiq/keyguard-client/-/keyguard-client-1.6.0.tgz#e2cb22c1af5ae68dac74e5ead9e69aeaba2ffc8b"
integrity sha512-DDi+PycBtiTJO5Jwk3mHZzBP2FHARNCIR+9C6+uhw6kRlT/pcDS+vE6GeTGOwZsRGOtowLG3d9n43xWoPOOcGQ==
dependencies:
"@nimiq/core-web" "1.5.8"
"@nimiq/rpc" "^0.3.0"
"@opengsn/common" "^2.2.5"
"@nimiq/keyguard-client@https://gitpkg.now.sh/nimiq/keyguard?scripts.postinstall=cd%20client%20%26%26%20.%2Fbuild-gitpkg.sh&a62aa9f557e2ac4c0d7306828e423230f423a0f1":
version "1.0.0"
resolved "https://gitpkg.now.sh/nimiq/keyguard?scripts.postinstall=cd%20client%20%26%26%20.%2Fbuild-gitpkg.sh&a62aa9f557e2ac4c0d7306828e423230f423a0f1#b821554c4e4751e93cd9e287cd3617812e2a3ea2"

"@nimiq/ledger-api@^2.3.0":
version "2.3.0"
Expand Down Expand Up @@ -2086,11 +2076,6 @@
resolved "https://registry.yarnpkg.com/@nimiq/rpc/-/rpc-0.1.5.tgz#53919b0a3a9abcdfebee0e865f4c663f72a8b8c2"
integrity sha512-oTRThXzpbQOY8jz8h+2KXucWzW40nVfYBWROKXKBrSozhTG0nR+rzCbEm4ZyTC26b4RnmB6y4nYabUXi7gNWcA==

"@nimiq/rpc@^0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@nimiq/rpc/-/rpc-0.3.0.tgz#654c05acccc193b7d79fb09b2faf2114945ff872"
integrity sha512-je7fv+wP4nLEgTcZwu3FaGre22qkZ9AYGbStglVaJAxOH+3CvDnnOIa9IjGFaCEhtRQKRaQEvFqa5vN4IVnH+Q==

"@nimiq/rpc@^0.4.1":
version "0.4.1"
resolved "https://registry.yarnpkg.com/@nimiq/rpc/-/rpc-0.4.1.tgz#d5df1e426793afcdd8c407a2968442bbee874dbd"
Expand Down

0 comments on commit 4a740c6

Please sign in to comment.