Source-linked AI summary
Global and Local Entropy Tests for STL Files Under IEEE-754 Validity Constraints
Tonislav Troev, Borislav Stoyanov
TL;DR
Conventional entropy references assume independent uniform bytes, although valid STL floats impose nonuniform byte probabilities and dependence between exponent bytes. The paper derives VSTL-specific entropy moments and tests; the resulting references differ enough to leave conventional acceptance intervals at practical file sizes.
Problem
Conventional entropy tests use independent-uniform-byte references, while valid STL float constraints create nonuniform byte probabilities and dependence between exponent bytes.
Source: §1 · pp. 2–3Method
The paper derives exact global and local entropy moments under VSTL, uses second-order expansions for large-file global references, and adapts the local block size with the capacity energy criterion.
Source: §1 · p. 3Results
The VSTL global limit is 7.99991479609 bits, and conventional 95% bounds are crossed from 7,495 triangles globally and 715 blocks locally at 1,936 bytes.
Source: §6 · pp. 56–57Takeaways & Limitations
The authors recommend evaluating STL ciphers against VSTL-specific references; entropy-test acceptance indicates consistency with the null model, not cryptographic security.
Source: §6 · p. 57The analysis covers triangle records but excludes file metadata, and entropy-test acceptance does not establish cryptographic security.
Source: §2.3 · p. 4, §6 · p. 57
Abstract
from arXiv · showhide
Shannon entropy is a standard measure of ciphertext randomness, evaluated either globally over the byte histogram of the entire ciphertext or locally as the average over non-overlapping blocks of ?xed size. While the global statistic captures only the overall byte distribution, the local statistic is also sensitive to non-randomness that is con?ned to parts of the ciphertext. Both measures are commonly assessed against reference values derived under the assumption of independent uniform bytes. However, STL encodes most numerical data as single-precision IEEE-754 ?oats, and format validity requires them to be ?nite, causing nonuniform byte probabilities and dependence between the two bytes of each exponent pair. We derive the exact mean and variance of entropy under the valid-STL (VSTL) distribution, which assigns equal probability to every admissible sequence of triangle records, and provide second-order expansions that keep the global reference values practical to compute at large ?le sizes. Using these expansions, we establish a two-sided hypothesis test for the global entropy statistic, whose limiting value is lowered from 8 to 7.99991479609 bits. The format constraints also change the local entropy reference: applying the capacity energy criterion to triangle records selects a block size of 1950 bytes instead of 1936 bytes, with an exact reference mean of 7.903106732975 rather than 7.902469316647 bits. Although small, these shifts are su?cient to place the VSTL reference means outside the conventional 95% acceptance intervals at practical ?le sizes, making unadjusted entropy tests prone to falsely rejecting ideal VSTL ciphertexts. Monte-Carlo simulations con?rm all reference values within sampling error. We therefore recommend using the format-speci?c reference values derived here to evaluate STL ciphers.
1. Introduction
Entropy tests for STL ciphers need references that reflect valid encodings, not the independent-uniform-byte model. This paper derives VSTL-specific moments and acceptance bounds for global and local entropy tests.
1. Introduction
- STL geometry protection matters in additive manufacturing because design data can disclose proprietary information and technical-data theft is a principal threat.STL remains a common exchange format in this workflow.Source: §1 · p. 2
- Global entropy values near 8 bits alone do not establish consistency with the null model; a two-sided test also rejects values that are unusually high or low.The conventional reference uses the theoretical maximum without specifying sample-size-specific acceptance bounds.Source: §1 · p. 2
- Valid floats exclude NaN and ±∞, making byte probabilities nonuniform and coupling the exponent bytes, so uniform-byte entropy references do not match valid STL ciphertexts.The conventional global and local references assume independent uniform bytes.Source: §1 · pp. 2–3
- The paper derives exact VSTL entropy moments, uses second-order expansions for efficient large-file global references, and adapts the local block size using the capacity energy criterion.Normal approximations provide two-sided acceptance bounds for both tests.Source: §1 · p. 3
- Although the validity-induced shifts are small, they become practically relevant as acceptance intervals narrow, with the local block-size change accentuating the effect.The paper validates the reference values through Monte-Carlo simulations.Source: §1 · p. 3
2. Preliminaries and Notation
The preliminaries define the byte-level structure and validity assumptions used to model binary STL records, then distinguish the global and local entropy measures analyzed in the paper.
2. Preliminaries and Notation
- The preliminaries restate only the notation and structural facts needed for the entropy analysis from foundational work.Source: §2 · p. 3
2.1. The Byte Alphabet and Its Named Subsets
- The two majority byte sets exclude 127 and 255, respectively; those excluded values are the minority bytes.Source: §2.1 · pp. 3–4
2.2. Validity Constraint
- A valid float is finite and excludes exponent field 0xFF, leaving 2^32 − 2^24 valid encodings; this constraint jointly restricts bytes B0 and B1.Subnormals and signed zeros remain valid; bytes B2 and B3 are unaffected by the constraint.Source: §2.2 · p. 4
2.3. The Valid-STL (VSTL) Distribution
- The VSTL distribution gives equal probability to valid files, sampling floats and attribute words independently and uniformly over admissible encodings; metadata is outside the analysis scope.The model comprises 26T unconstrained bytes and 12T exponent pairs as mutually independent groups.Source: §2.3 · p. 4
2.4. Marginal and Joint Byte Distributions
- The exponent-pair joint law captures dependence imposed by validity, since the joint byte probability is not the product of its marginals.Source: §2.4 · p. 5
2.5. Entropy Measures
- Global entropy is computed over the full ciphertext, while local entropy averages the same measure over non-overlapping blocks; both receive VSTL-specific references and tests.The paper reserves H∞ for the limiting entropy value; under independent uniform bytes it is 8 bits.Source: §2.5 · pp. 5–6
3. Exact Entropy Statistics of a Valid STL File
The section derives exact block-entropy moments under VSTL by modeling individual and joint byte counts, then recovers the established uniform-byte result when validity constraints are removed.
3.1. The Block Entropy as a Function of Its Histogram
- Because histogram counts are dependent through their fixed total and exponent-pair constraints, entropy variance requires joint as well as individual byte-count laws.Source: §3.1 · p. 6
3.2. Distributions of Individual and Joint Byte Counts
- Individual byte counts are modeled by convolving contributions from unconstrained positions and exponent pairs; joint counts use the corresponding two-dimensional convolution.Source: §3.2 · pp. 7, 9
3.3. The Exact Moments
- The exact moments reduce sums over bytes to four categories, weighted by their cardinalities, with joint category moments accounting for exponent-pair dependence.Source: §3.3 · pp. 9–10
3. Exact Entropy Statistics of a Valid STL File
- The exact block-entropy mean and variance under VSTL are expressed through category-weighted sums over byte categories.Source: §3.3 · pp. 9–10
3.4. Consistency with the Uniform Model
- Removing the validity constraint makes all byte values equivalent, and the resulting mean and variance reproduce the uniform-model results of [6, Sec. 3.3].Source: §3.4 · p. 10
4. The VSTL Global Entropy Test
The global test uses VSTL-specific entropy references, with second-order expansions making large-file reference moments practical to compute. Its cross-entropy component has exact record-based moments, while the divergence component requires approximation.
4. The VSTL Global Entropy Test
- Second-order expansions give VSTL global reference mean and deviation with an explicit O(N^-3) error bound and O(1) arithmetic at fixed precision.A critical value is obtained with a single quantile.Source: §4 · p. 11
4.1. The Cross-Entropy Decomposition
- The entropy decomposition makes cross-entropy a sum of independent per-record terms, while the nonlinear divergence moments require Taylor approximation.The cross-entropy moments are closed-form at every file size.Source: §4.1 · p. 11
- The record-score moments determine the block-average score moments exactly at every T.The score is the surprisal of a record’s fifty bytes under the record-average byte law.Source: §4.1 · p. 13
- Exponent-pair bytes must be treated jointly in variance calculations; omitting their covariance overestimates Var[C] by approximately 0.000023553883, or 0.2%.Validity couples the two bytes, so their joint law—not just their separate marginals—is needed.Source: §4.1 · pp. 15–17
4.2. The Entropy Ceiling
The VSTL validity constraints lower the limiting entropy of the pooled byte distribution below the uniform-byte ceiling. The paper distinguishes this global-statistic reference from the VSTL source entropy rate.
4.2. The Entropy Ceiling
- For every finite T, expected block entropy is strictly below its limiting pooled-byte entropy, and block entropy converges to that limit almost surely.The expected divergence from the pooled byte law is positive at finite T.Source: §4.2 · p. 18
- The limiting pooled-byte entropy is below 8 bits by a total gap of 0.001269971244 bits per byte, about fifteen times Δ.The gap includes approximately 0.000938514051 bits per byte from the independence bound.Source: §4.2 · pp. 18–19
- The global statistic uses the entropy of the pooled byte law as its limiting reference, rather than the VSTL source entropy rate.The paper attributes their gap to exponent-pair dependence and differences among position-specific marginals.Source: §4.2 · p. 19
4.3. Second-Order Expansions of the Reference Values
This section develops second-order expansions for the VSTL reference mean and variance, including truncation-error control using record-level moments and a numerical expansion for the variance. It also specializes the general expansions to the uniform-byte model, where they agree with established finite-sample entropy expansions.
4.3.1. The Reference Mean
- The VSTL reference mean admits a second-order expansion as the number of records grows.The derivation uses moments of the independent record-level byte counts.Source: §4.3.1 · pp. 22–23
4.3. Second-Order Expansions of the Reference Values
- Choosing Taylor degree K = 5 bounds the coordinatewise remainder by a constant multiple of |δS,v|^6 and makes its contribution O(N^-3).The degree is selected because the sixth absolute deviation moment is O(N^-3).Source: §4.3 · p. 21, §4.3.1 · p. 25
4.3.2. The Reference Variance
- The VSTL reference variance likewise admits a second-order expansion as the number of records grows.The expansion retains contributions through order N^-2, with remaining terms bounded by O(N^-3).Source: §4.3.2 · pp. 28, 32
- The assembled coefficients yield a numerical expansion of the VSTL reference variance.The derivation evaluates centered moments for unconstrained bytes and exponent pairs, treating equal and distinct target-byte values separately; mixed moments condition on one exponent component and average the other over admissible values.Source: §4.3.2 · pp. 33–35
4.3.3. Consistency with the Uniform Model
- Under the uniform-byte model, the general propositions reduce to the corresponding uniform-model reference expansion.With uniform bytes, the exponent-byte validity constraint no longer couples the pair, and the finite-sample plug-in entropy mean has a downward correction.Source: §4.3.3 · p. 35
- The uniform-model expansions agree at corresponding orders with Miller, Basharin [8], and Harris [9].The variance expansion also agrees with Harris [9] after conversion to bits; Basharin [8] notes that the N−1 term vanishes for equiprobable symbols.Source: §4.3.3 · p. 36
4.4. Normal Approximation and Acceptance Bounds
The global entropy test standardizes entropy using VSTL reference mean and variance, then applies a two-sided normal acceptance interval. The normal limit follows from record-level byte-count fluctuations and the delta method.
4.4. Normal Approximation and Acceptance Bounds
- The two-sided global acceptance interval is centered at the VSTL reference mean, with bounds set by the normal quantile and reference standard deviation.The interval is evaluated at significance level α.Source: §4.4 · pp. 36, 39
- A multivariate central limit theorem for per-record byte-count vectors yields the histogram limit used to approximate global entropy.The limiting covariance matrix is formed from per-record moments.Source: §4.4 · pp. 36–37
- The delta method converts the histogram limit into a univariate normal entropy limit, whose variance projects histogram covariance along the entropy gradient.The gradient is evaluated at the VSTL reference distribution.Source: §4.4 · p. 37
- The entropy fluctuation’s variance is computed from the covariance of the record-score fluctuation with powers of empirical-distribution deviations.The derivation evaluates the gradient’s inner product with centered byte counts for a generic record.Source: §4.4 · pp. 37–38
4.5. The Test Procedure
The test uses second-order VSTL reference expansions and a normal approximation, with a finite lower limit to avoid small-sample inaccuracies. It adopts 100 triangles as that operational limit.
4.5. The Test Procedure
- At small triangle counts, expansion remainders are too large to neglect, while second-order expansions and normal approximations improve as T grows.Figure 1 tracks decreasing errors over 1 ≤ T ≤ 200, motivating a finite lower limit.Source: §4.5 · p. 39
- At T = 100, exact and second-order intervals overlap by approximately 99.1%, rising to 99.6% at T = 200; the procedure adopts T ≥100.The compared intervals are centered on the respective means and extend one standard deviation on either side.Source: §4.5 · p. 39
- Corollary 3 turns the reference mean and variance into a two-sided single-ciphertext test, and Algorithm 1 applies its acceptance interval.Table 5 lists reference moments and acceptance bounds at selected triangle counts.Source: §4.5 · p. 39
4.6. Practical Significance
The uniform and VSTL global entropy means separate as file size grows while variability decreases. Their gap crosses practical uniform-reference thresholds at 3,824 and 7,495 triangles.
4.6. Practical Significance
- As T grows, the uniform-to-VSTL reference-mean gap approaches ∆ while variability decreases, making the uniform reference unreliable at the stated crossings.The comparison measures separation in units of the uniform deviation.Source: §4.6 · pp. 39, 43
- The mean gap first exceeds one uniform standard deviation at T = 3824 and the α = 0.05 two-sided acceptance half-width at T = 7495.Both thresholds lie within practically relevant file-size ranges.Source: §4.6 · p. 43
4.7. Monte-Carlo Validation
Monte-Carlo trials test whether the global entropy reference moments match samples from the VSTL distribution. The simulations agree with the predictions within sampling error, while the uniform-byte reference becomes unsuitable beyond the stated threshold.
4.7. Monte-Carlo Validation
- The validation estimates sample means and unbiased variances from independently drawn VSTL files to check the second-order global reference moments.The reported estimators converge to the true moments as the trial count grows.Source: §4.7 · pp. 43–44
- The simulated VSTL mean and standard deviation match their predicted curves within sampling error at every tested file size.Figure 4 also shows absolute estimation differences decreasing toward zero over the tested range, without an apparent persistent discrepancy.Source: §4.7 · p. 44
- At 7495 triangles, the uniform test’s lower acceptance bound exceeds the VSTL reference mean, making that conventional test unsuitable beyond the threshold.The simulations use 10,000 independent trials per selected file size spanning 500 to 1,000,000 triangles.Source: §4.7 · pp. 43–44
5. The VSTL Local Entropy Test
The local entropy test replaces uniform-byte references with VSTL-specific moments and acceptance bounds, using an optimized block size of triangle records. Its predictions agree with simulations, while the conventional 1936-byte reference becomes practically unsuitable at attainable block counts.
5. The VSTL Local Entropy Test
- The VSTL local test selects the average entropy of k non-overlapping fixed-size blocks and requires validity-aware reference values rather than the uniform-byte references.The test derives exact reference mean and variance for its selected block size.Source: §5 · pp. 44, 46
5.1. The Optimal Block Size
- The capacity energy criterion selects the block size by maximizing the probability that every byte value occurs in a random block, divided by its byte count.Each VSTL block contains 50 bytes per triangle record, and the probability is computed by inclusion–exclusion under the VSTL model.Source: §5.1 · pp. 46–47
5.2. The Reference Values
- At the selected block size, exact count laws yield the block entropy mean and variance, which determine the VSTL reference values for averages over disjoint blocks.The exact count laws are evaluated once because the optimal block size is below the global test’s operational lower limit for second-order expansions.Source: §5.2 · p. 49
5.3. Consistency with the Uniform Model
- When byte values are uniform, the local moment formulas reduce to the established reference mean and variance of the conventional local entropy test.Averaging independent block entropies preserves the mean and divides the variance by the number of blocks.Source: §5 · p. 46, §5.3 · p. 50
5.4. Normal Approximation and Acceptance Bounds
- With fixed block size and a growing number of disjoint blocks, the average entropy is normally approximated, yielding two-sided acceptance bounds.The central limit theorem applies because block entropies are independent with finite, positive variance.Source: §5.4 · p. 50
5.5. The Test Procedure
- The procedure samples k non-overlapping 1950-byte blocks, computes their average entropy, and compares it with the VSTL acceptance interval.The interval is centered on the reference mean, with half-width determined by the selected significance level and reference standard deviation.Source: §5.5 · pp. 51–52
5.6. Practical Significance
- Against the 1936-byte uniform reference, both practical-significance crossings occur at attainable file sizes; at 1950 bytes, they occur at substantially larger block counts.The crossings mark when the mean difference reaches one uniform standard deviation and the uniform 95% acceptance half-width.Source: §5.6 · p. 53, Table 8 · p. 53
5.7. Monte-Carlo Validation
- At 1936 bytes, the VSTL reference mean lies above the uniform 95% acceptance interval’s upper bound beyond the second crossing; at 1950 bytes, both crossings lie beyond the tested range.Monte-Carlo estimates agree with exact VSTL predictions within sampling error across tested block counts.Source: §5.7 · pp. 53, 56, Figure 6 · p. 54, Figure 7 · p. 55
6. Conclusions
The paper derives VSTL-specific global and local entropy tests to account for IEEE-754 validity constraints. Simulations validate the reference moments, and the authors recommend format-specific references while cautioning that entropy acceptance is not evidence of cryptographic security.
6. Conclusions
- The global entropy limit is approximately 7.99991479609 bits, and its expected value remains below that limit for every finite sample size.The second-order expansions make reference moments efficiently computable and retain a nonzero N^-1 variance term.Source: §6 · p. 56
- At 3824 triangles, the global mean gap first exceeds one uniform standard deviation; at 7495 triangles, the VSTL mean falls below the uniform 95% interval’s lower bound.Source: §6 · p. 57
- For local entropy, the capacity energy criterion increased block size from conventional 1936 bytes to 1950 bytes (39 triangles); exact moments gave a reference mean of approximately 7.903106732975 bits.Source: §6 · p. 57
- At 1936 bytes, the local mean difference exceeds one uniform standard deviation at 187 blocks and the uniform 95% upper bound at 715 blocks; the 1950-byte reference is closer but eventually unsuitable.Source: §6 · p. 57
- Monte-Carlo simulations confirm the global and local reference moments within sampling error in all tested cases.Source: §6 · p. 57
- Acceptance under these entropy tests indicates consistency with the stated null model, but does not establish cryptographic security.Source: §6 · p. 57
Declaration of generative AI and AI-assisted technologies in the manuscript preparation process
Generative AI tools assisted with literature identification and manuscript preparation, while the authors retain responsibility for the work.
Declaration of generative AI and AI-assisted technologies in the manuscript preparation process
- Generative AI tools assisted in identifying related literature.Source: Declaration of generative AI and… · p. 57
- The tools also helped improve language and readability and proofread the manuscript.Source: Declaration of generative AI and… · p. 57
- The authors state that they retain full responsibility for the correctness of the work.Source: Declaration of generative AI and… · p. 58