Incorrect length of block during import


Status
Not open for further replies.

NetByMatt

New member
Jul 10, 2018
3
0
After hearing Steve talk about the development of SQRL for years, I finally downloaded the Windows client and created my identity. After testing things out for a little while, I went to import my identity into my phone. I've used the QR code method with password+rescue code option. When importing that code into this client the following error pops up after reading the QR code, and I am returned to the welcome screen.

Incorrect length of block offset 133 len 73 input len 205

The message changes slightly if I use only the rescue code option
Incorrect length of block offset 8 len 73 input len 80

Thanks for the client!
 

kalaspuffar

Well-known member
May 19, 2018
296
106
Sweden
coderinsights.com
Hi NetByMatt

Thank you for using the client. The current version have a pretty hacky way to import identity or QR read function.

I analyze the data and pick a good part of it for the identity. Seems like your identity got clipped/truncated for some reason

8 header + 125 identity = 133 offset
133 offset + 73 rescue = 206 which is not equal to 205
8 header + 73 rescue = 81 which is not equal to 80

So there is a missing byte somewhere.

In the latest version (not released) I've changed this to a more robust function.

Sadly to get the current version to work with your identity you need to do text input, which is not available for your first identity, but I've added it to todo.

The funny part is that no one got this problem before, at my estimate it's about a 1/256 chance of happening :)

Best regards
Daniel
 

NetByMatt

New member
Jul 10, 2018
3
0
Thanks for the explanation. Short of providing my identity, let me know if there are any other details that I can provide to help you out.
 

kalaspuffar

Well-known member
May 19, 2018
296
106
Sweden
coderinsights.com
Hi NetByMatt

Thank you for your patience. If I may please save that identity close so you can verify that we have solved the problem.

I had social engagements both yesterday and today. (50 years party + Ed Sheeran concert)

So the first time I can build a new version is tomorrow.

If you feel confidant with building Android applications you can get the full source-code from github build it and test.

Hope this helps
Best regards
Daniel
 

kalaspuffar

Well-known member
May 19, 2018
296
106
Sweden
coderinsights.com
Hi again NetByMatt.

I've now built a new version with the source code in the repository.

Hopefully, this will solve your issue, and I'm happy you actually got this issue so we could test it and remove a nasty bug for the future. I knew my code was not good for reading QRCodes but I didn't do anything about it as it usually worked.

Thank you for your time and support.
 
Status
Not open for further replies.