-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Drum" word duping in generated SSKR shares #32
Comments
Hi @DmKoshelek , I think there may be a few problems here. One of these problems may be related to this issue: Note that the first 10 words of each SSKR share is a CBOR header plus metadata and this looks correct in all the shares you provided. The next 32 words is the share data and the last 4 words are a CRC checksum. From previous experience with similar issues the physical device seems to be operating differently to the emulator used for testing (Speculos). Previously CRC32 functionality was shown to be faulty on the physical devices but that was fixed by Ledger. I shall investigate further. |
I have tested v1.7.1 of the app installed from provider 4 on a physical Ledger Nano S. The meta data and share data for all shares seems to be generated correctly but the checksum is not. The checksums in your test on a Nano S+ and also the checksums in my test on a Nano S exhibit the same behaviour as this comment: The first 2 words of every checksum is always One possibility is that the app on provider 4 was built with a version of the SDK where CRC32 functionality is still broken. I will wait to get Ledger's or @lpascal-ledger opinion on this. A unit test for the CRC32 function in the SDK may help. |
I used the build from My Ledger provider 4 as it was suggested here #15 (reply in thread). I am not sure which SDK was used there to build the app |
Hi folks, Indeed the deployed version was buggy. It uses the correct SDK but the code uses the I'll redeploy the app with the commits of @xchapron-ledger. @aido could you confirm this changelog / version suits your constraints? |
Fine by me! |
While at it, you should now be able to drop this line https://github.com/aido/app-seed-tool/blob/develop/src/ux_common/onboarding_seed_sskr.c#L6 |
Yes, there is a PR currently a work in progress that adds the Stax UI but also removes that line:: So, line will be gone in next version after v1.7.2. |
@aido I take from your approval that we don't wait for another PR, we can merge & deploy, is that correct? |
Yes. Any other minor updates I need to make can be rolled into the Stax PR that is currently a work in progress. Thanks. |
v1.7.2 has been deployed on provider 4. |
I have installed v1.7.2 from provider 4 and all looks good. Shares and CRC32 seem correct .
If @DmKoshelek confirms same for Nano S+ then I will close this ticket. |
Hi guys, Today I tried to generate shares again but with my main seed phrase on Nano S+ and suddenly it doesn't work anyway. CRC32 part looks different compare to previous version, last 43-46 words are different for each phrase but data words (11-42) for 2-5 shares are still "drum" only |
Hi @DmKoshelek , Thanks for checking.
This is strange behaviour. Strange on two counts, Strange that the word The code for generating phrases on a Nano S is exactly the same as code for generating phrases on a Nano S+ except for one thing. So
All this evidence would seem to suggest that the Unfortunately I do not have a Nano S+ or Nano X device to perform my own hardware testing. Oh dear! |
Further investigation reveals that the The app is using a value of 0xA1 for this constant. However sandra-Ledger has informed me on Ledger's Discord channel that 0x02 would be a more appropriate value. I think the Second Montgomery only makes the multiplication more efficient rather than changing the actual result. But we shall see. I will try this recommended value and create a new PR for v1.7.3 |
Hi @DmKoshelek , v1.7.3 has now been deployed and hopefully fixes this issue. v1.7.3 changes the value of the Second Montgomery constant as suggested by @srasoamiaramanana-ledger. This constamt is used by the |
I have installed v1.7.3 from provider 4 and all looks good on a physical Nano S.
Note The Nano S does not use the |
Hi @aido, Thanks for the update! Today I checked the new version (1.7.3) and, unfortunately, it still doesn't work. First share is fine as previously but 2-6 shares now have repeated "toil" word instead of "drum" on data part of the shares (11-42 words) Also just for fun I tried two generate 2 shares with 2 shares threshold and both shares was invalid with this configuration and had "able" word on data word positions OS version: 1.1.1 |
Damn! 😢 @DmKoshelek Thanks a lor for testing. So, here's the situation:
@lpascal-ledger or @srasoamiaramanana-ledger I am loath to say that the above evidence would suggest that the I still find it strange that the first share on a Nano S+ seems fine but after that the rest are bad. I will investigate this and try figure out why some hardware devices are doing something different to Speculos. From a previous issue, when Speculos behaved differently to the hardware the syscall turned out to be the issue e.g. I may create a new PR for a v1.7.4 that replaces the |
Hi,
Could you try to call |
Thanks for investigating. I shall try what you suggested. I just don't have a physical Nano S+ to test on making this type of troubleshooting difficult. I had thought that overlapping the result variables with the inputs may possibly cause a problem but the documentation did not discourage it so I didn't think it would be an issue. But we'll see. I may create a v1.7.4.rc1 |
@aido Maybe I can run some test builds on a physical device if it helps to speed up the bug fixing. Just tell me what to run and how =) |
Thanks @DmKoshelek, I have created a pull request on the Ledger fork which removes the If by this process of elimination we find
We'll get there ... eventually! 😃 Have a great weekend. |
Hi @DmKoshelek, v1.7.4-rc.1 is now available on provider 4. |
Hi @aido Great news for you, looks like this update is working! I was able to generate 6 shares and recover back my BIP39 phrase using 3 of them. Tomorrow I will try to use 4-6 shares to recover BIP39 seed but I believe it will also work My congratulation! |
That is great news indeed. 🥳 This proves without doubt that the problem area is related to how the app is using the I shall now create a v1.7.4-rc.2 that ensures that in all calls to This hopefully will be the final pre-release of a v1.7.4 that should work on all devices without issue! 🤞 Thanks again @DmKoshelek for finding this bug and then helping troubleshoot it. |
Hi @DmKoshelek, v1.7.4-rc.2 is now available to install from provider 4. |
Hi @aido, I see only v1.7.4-rc.1 version on provider 4 right now =( So I couldn't test it |
hmm, strange. Update 6 hours ago @lpascal-ledger stated:
@DmKoshelek, I would imagine that if it was available for installation on Nano S it would also be available on the other devices at same time or very shortly thereafter. |
@DmKoshelek @aido It's probably because I deployed on the newest NanoS+ 1.2.0 OS version which is not fully distributed yet. |
Should be good now. |
Hi @DmKoshelek, Any luck installing v1.7.4-rc.2 on a Nano S+ with OS version 1.1.1? |
Hi @aido Sorry for the delay, I totally forgot to test the new version. I have just download it and it works fine as well, I was able to create shares and recover my seed phrase on my device! |
also I found one new issue during testing, I created a separate topic for it |
Thanks @DmKoshelek While I investigate the new issue can you can confirm if this issue is fixed for threshold values other than 1? |
@aido, yes, the issue is fixed, thanks again for fixing! |
That s excellent. I am quite happy that I can close this issue. I have also made a small bit of progress with the other issue. It does in fact seem to be happening when testing with Speculos. That will make testing and troubleshooting much much easier and quicker. The problem is most likely to be some edge case that needs to be caught. But we'll see. |
I tried to generate SSKR phrases with the app and they are looking weird. All of them except first one just contains repeated "Drum" word in positions from 11 to 42 (I believe other words just contains meta information and checksums). And for sure, I can't recover my bip39 phrase from this SSKR shares. My Seed phrace contains 24 words but to create this issue I generated a new one. I tried to use this shares to recover my seed phrase using seedtool-cli but for sure got error that shares are invalid
Steps to reproduce the behavior:
Device:
The text was updated successfully, but these errors were encountered: