Do par2 files have inner redundancy for bitrot on recovery blocks?
I just found a wonderful looking tool named par2. It can generate error correction blocks for any file I want and use those to later recover corrupted data. I started to wonder if there is any redundancy on the par2 generated recovery block files themselves? I.e. does par2 recognize corruption on its own recovery files before trying to correct bit errors on the target data files? How does corruption of those par files affect the recovery process of data and is there any redundancy in this manner?
Each PAR2 file contains 0 or more blocks of recovery data. Each block has a checksum. Only the good blocks are used.
(The first PAR2 file of a set usually doesn't have any blocks. It just contains meta-data about the whole set of files.)
Additonally the PAR2 files also contain checksums for the blocks in the actual data-file(s). That is how the PAR program determines which blocks in the data-file(s) need repair.
You can read up on that in the the par2 file-specification. Although the actual algorithm to calculate the PAR data is quite complex, the file-format itself is fairly straight-forward.
(I wrote my own parser for PAR-files a few years ago, just for the heck of it.)
Please note: Try MultiPar. It is the fastest PAR2 software around (can use GPU acelleration as well) and is still actively developed by Yutaka Sawada, the guy who invented PAR.