I hacked away since yesterday evening and now I can finaly log in and see the tabs of other computers using the new storage format 4 and a sync-key upgraded from an existing v3 passphrase.
J-PAKE does not exist yet and QR-codes are never to be implemented in firefox, so I guess I'll have to add a way to enter new syncKeys by (on screen) keyboard.
Hmac-computation again is a problem. It works but produces the wrong results.
I am still not sure about the new key-storage. Getting the default key is straightforward but correctly handling multiple keys is not obvious.
I'll keep on hacking tomorrow.