HomePhabricator
Diffusion Comm 3f690be08196

[native] Expose verifySignature function via JSI

Description

[native] Expose verifySignature function via JSI

Summary: This function is needed to verify device list signatures. It was already there in CryptoModule but not yet exposed via JSI.

Test Plan:

await commCoreModule.initializeCryptoAccount();
const pubKey = await getContentSigningKey();
const signature = await commCoreModule.signMessage('hello');

try {
  await commCoreModule.verifySignature(pubKey, 'hello', signature);
  console.log('OK');
} catch (err) {
  console.warn(err);
}

Changing the message or signature returns BAD_MESSAGE_MAC

Reviewers: kamil, marcin

Reviewed By: kamil, marcin

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D11905

Details

Provenance
bartekAuthored on May 6 2024, 7:10 AM
Reviewer
kamil
Differential Revision
D11905: [native] Expose verifySignature function via JSI
Parents
rCOMMd666dc9bfd54: [native] Sign device list during QR auth
Branches
Unknown
Tags
Unknown