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 Nov 23, 2023
1 parent e2c1040 commit 67c44cd
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 @@ -23,7 +23,7 @@
"@nimiq/electrum-client": "https://github.com/nimiq/electrum-client#build",
"@nimiq/fastspot-api": "^1.7.0",
"@nimiq/iqons": "^1.5.2",
"@nimiq/keyguard-client": "^1.5.3",
"@nimiq/keyguard-client": "https://gitpkg.now.sh/nimiq/keyguard?scripts.postinstall=cd%20client%20%26%26%20.%2Fbuild-gitpkg.sh&58a01c6c46a0bbd934a89c83dfc44f9de3630a5a",
"@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 @@ -92,6 +92,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 @@ -1262,6 +1266,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 @@ -1558,11 +1558,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 @@ -1613,14 +1608,9 @@
btoa "^1.1.2"
node-lmdb "^0.9.6"

"@nimiq/keyguard-client@^1.5.3":
version "1.5.3"
resolved "https://registry.yarnpkg.com/@nimiq/keyguard-client/-/keyguard-client-1.5.3.tgz#b245e5cd0a5ed4c4846b8a38f80f115e20b0b258"
integrity sha512-xEG8dQwUZqSjeD0kVkWcr6ypqpEzNrewAH2wQEq20eJAUluP7TsWRH1ui+gEDD+78g01V7UO/JG26ytim2uz5Q==
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&58a01c6c46a0bbd934a89c83dfc44f9de3630a5a":
version "1.0.0"
resolved "https://gitpkg.now.sh/nimiq/keyguard?scripts.postinstall=cd%20client%20%26%26%20.%2Fbuild-gitpkg.sh&58a01c6c46a0bbd934a89c83dfc44f9de3630a5a#313126b1916879302177f3dce947be9f99d03d81"

"@nimiq/ledger-api@^2.3.0":
version "2.3.0"
Expand Down Expand Up @@ -1666,11 +1656,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 67c44cd

Please sign in to comment.