Hi, I tried the above for my HMO 1002, wrote a key generator, but didn't have much luck. So, based on the information above more reverse-engineering was called for. Now, I should really know my way around e.g. Ghidra, but in actual fact I'm not that useful when it comes to actual work... However, my son is!
So combining our efforts, mostly his, we delved a bit deeper.
The first clue came straight from the user manual(!):
(See attached image, can't get it to show here...)
If one decrypts (using the 256 bit AES key above) the first three keys listed in the manual one gets (hex):
2f31c100 02000000 00000000 00000000
2f31c100 08000000 00000000 00000000
2f31c100 07000000 00000000 00000000
i.e. little endian 32 bit words, where first is serial number, second feature, and then zeroes. In this case the serial number of the scope used in the manual is: 012 661 039 decimal as listed by the scope (for complete test vectors).
It's of course amusing that information is leaked like this in the product manual.
Now, continuing the reversing we found that the file format for license keys is fairly straightforward: The license key file is a straight text file with one key per line. If the first character of the line is a '#' the rest of the line is ignored (i.e. a comment) and then the keys themselves are just 32 hex characters (case doesn't matter) and begun by "KEY:"
So the key in the example in the manual would be written:
KEY:fd907d5ba47... etc.
The only thing left to dig out was the actual features which obviously vary from scope model to model. We found that 0x11 erased all license (good to know for testing), and that the function that prints information about the licences write "Not available" (or words to that effect) and doesn't parse the license further if the feature is greater than 0x28.
So as the parsing routine doesn't abend when its given an invalid key, but just skips to the next, we didn't actually reverse which features correspond to which codes, we just generated a file with all possible features (except 0x11 of course) and just ran that. Which had the intended effect. (It's of course equally possible to generate one license file per feature to map them out, we didn't bother).
Since we reversed the license key file format, experimenting becomes much, much more tractable than having to enter them by hand (which is somewhat painful).
So, even if there is still much to do reversing-wise (we used the latest firmware and Ghidra even found an ELF in there) all the features have been cracked, and writing a key-generator is of course trivial given knowledge of the serial number. (I don't know about how you usually think about that, so I refrain from posting code.)
Many thanks to the people who posted the information earlier in the thread, standing on the shoulders of gigants and all that, continuing was much, much easier.