- 21 Feb 2025
- 1 Minute à lire
- Impression
- SombreLumière
- PDF
Additional Configuration Options
- Mis à jour le 21 Feb 2025
- 1 Minute à lire
- Impression
- SombreLumière
- PDF
Rules Processing
Several Jigsaw features use a rule processing system to determine what is in scope. The rules are specified as a JSON array of strings, where the strings are processed from left to right, adding or subtracting values to the set. Rules support the following special characters:
Character | Description |
---|---|
! | Subtraction identifier to remove the given symbol from the set. Patterns that do not start with the exclamation mark are added to the set. |
* | Wildcard that matches anything. |
The following table demonstrates some example rule arrays:
Pattern | Outcome |
---|---|
["*"] | Add all available options to the set. |
[ "debug_*" ] | Add everything starting with debug_. |
[ "*", "!login" ] | Add everything except login. |
[ "secret" ] | Only add secret. |
[ "secret", "location" ] | Add secret and location. |
[ "login", "!*" ] | Add login but then remove everything, so you are left with nothing. |
[ "*", "!debug_*" ] | Add everything except symbols prefixed with debug_. |
Seed Value
Randomness is used to create diversity in protections and ensures that no two protections are the same. Several of the protection techniques use random values to vary code and/or data.
By default, each time you run Jigsaw, you get a different output, even for the same input binary. Sometimes, it can be useful to fix the output to a reproducible version, such as in a CI/CD pipeline that produces a test build to be released later. A fixed seed value can be added to the top-level configuration to force the same random values in subsequent protection runs. For example:
{
# Use a fixed random seed
"seed": 645261
# Other configurations:
...
}
Any assigned value is used as a seed for the random generator and, therefore, predetermines the output. No seed value (the default) results in the system random entropy being used to generate a random stream.
Protection Reports
Jigsaw can generate protection reports for each library it protects. This feature is enabled by adding the following property to the top-level JSON configuration:
{
# Turn on protection reports
"report": true
# Other configurations:
...
}
This creates an HTML report in the current working directory. The report includes high level protection statistics and a very detailed listing of all control flow call instructions redirected, which ones carry checksums, and the checksum ranges covered by each call.
For any sizeable library, these reports are likely to be several megabytes in size.