Author Topic: [XISF] SHA3 checksumming not implemented?  (Read 5672 times)

Offline dghent

  • Newcomer
  • Posts: 9
    • Personal site
[XISF] SHA3 checksumming not implemented?
« on: 2019 December 21 19:56:40 »
Hi all,

I'm moving along with a small project to further improve XISF read/write support in NINA to include support for data block compression and checksumming. XISF 1.0 defines two hash levels of SHA3 as part of the standard; so I implemented those as an checksum method choice (in addition to the others) only to learn that PI (1.8.8-2) doesn't like them and refuses to load the file:

Code: [Select]
D:/Astro/SNAPSHOT/2019-12-21_22-36-06__35.00_1.00s.xisf
Loading image: w=4164 h=2796 n=1 Gray UInt16
*** Unknown/unsupported checksum algorithm 'sha3-512' (line=11 offset=2)
*** Error: The XSIF file contains no readable images.
*** Unable to open file: D:/Astro/SNAPSHOT/2019-12-21_22-36-06__35.00_1.00s.xisf
<* failed *>
** No files were loaded.

What would the recommendations from the PI team be in this case? Should I not bother implementing it and save it for when there is SHA3 support in PI?

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: [XISF] SHA3 checksumming not implemented?
« Reply #1 on: 2019 December 22 02:06:00 »
Hi,

SHA3 block checksums are still not supported by our XISF implementation. We plan on implementing them during the first half of 2020, where we'll implement also many more XISF standard features, as well as some important nonstandard features specific to the PixInsight core application.

Please save your implementation because we'll definitely implement SHA3 checksum support. For now, SHA1 and SHA2 checksums provide more than sufficient data integrity guarantees for all practical purposes.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline dghent

  • Newcomer
  • Posts: 9
    • Personal site
Re: [XISF] SHA3 checksumming not implemented?
« Reply #2 on: 2019 December 22 07:02:14 »
Thanks for the clarification, Juan. What I’ll do is still implement SHA3 for reading in files for things such as NINA’s Faming Assistant and camera simulator, but disable writing files with those hash types until PI gains support for them.

Offline dghent

  • Newcomer
  • Posts: 9
    • Personal site
Re: [XISF] SHA3 checksumming not implemented?
« Reply #3 on: 2020 January 25 20:43:30 »
Just closing the loop on this. NINA 1.10 build 54 will now produce XISF files (as it has always) but now with full compression and checksumming support as defined by the XISF 1.0 spec, including byte shuffling. It is able to read these format variants as well. While it will read in and verify the two SHA3 hash types (and burp up a warning if there is a mismatch), I've disabled writing files with them for now until PixInsight supports them.