modify the existing generateAndGetPrekey function to return signed content and notif prekeys (prekey + signature)
Details
Details
- Reviewers
marcin atul - Commits
- rCOMM58a033c26d1b: [native] get signed prekeys
console logged generateAndGetPrekeys from account-selectors.js and got the following:
LOG {"contentPrekey": "{\"curve25519\":{\"AAAAAg\":\"9QT6LlKsgI+badfNPLMhlWon5GZjCBjFVTur/W/qRkY\"}}", "contentPrekeySignature": "T64w13LqXgw0M7F6d19qL5pQyfE+c86CdgNlckIPIQwiI+INDttUjxSNVaa9Vv0AMIqNC+2tq2NvzqTTPESCAg", "notifPrekey": "{\"curve25519\":{\"AAAAAg\":\"9cN8Gem9icUP869ydpukc9LkGXFj89ZZ1JT5IPma234\"}}", "notifPrekeySignature": "+CjQcbt4qKAMp2zQlAzg+zpJZ++OsLUjeMh9NuJVVoPNhPt7DEpPa1WEsYmH3hCEd8QqSxQM4lqH1mVvr3O3BA"}
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | ||
---|---|---|
570–578 ↗ | (On Diff #30764) | Is it possible to sign the entire prekey JSON: { "contentPrekey": ."..", "notifPrekey": .".." } instead of signing both keys separately? When it comes to public keys we sign the entire payload of curve25519 and ed25519 for both content and notifs at once. What is the reason behind signing prekeys separately? |
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp | ||
---|---|---|
542–543 ↗ | (On Diff #30871) | I think those two should also but inside try{}catch{} since they might also fails as they are using the same methods of CryptoModule class under the hood. We are not doing so in other places but we probably should be. |