arXiv:2610.19852cs.ITOct 2026

Manuscript Offprint

arXiv:2610.19852

Global and Local Entropy Tests for STL Files Under IEEE-754 Validity Constraints

Tonislav Troev, Borislav Stoyanov

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

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 fixed size. While the global statistic captures only the overall byte distribution, the local statistic is also sensitive to non-randomness that is confined 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 floats, and format validity requires them to be finite, 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 file 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 sufficient to place the VSTL reference means outside the conventional 95% acceptance intervals at practical file sizes, making unadjusted entropy tests prone to falsely rejecting ideal VSTL ciphertexts.

*Corresponding author.

Email addresses: tonyslav_troeff@outlook.com (Tonislav Troev ID^{ID}), borislav.stoyanov@shu.bg (Borislav Stoyanov ID^{ID})

Monte-Carlo simulations confirm all reference values within sampling error. We therefore recommend using the format-specific reference values derived here to evaluate STL ciphers.

Keywords: 3D model encryption, STL, randomness testing, Shannon entropy, entropy estimation

1. Introduction

Additive manufacturing uses digital three dimensional (3D) models to produce physical parts, from prototypes to aerospace components and medical devices [1]. As their geometry may disclose proprietary information, protecting design data is part of securing the manufacturing process, in which theft of technical data is a principal threat [2]. STL represents the geometry as a triangulated surface and remains a common exchange format in this workflow [1, 3].

The statistical evaluation of encryption methods for 3D models commonly uses measures adapted from image encryption. Our foundational work [4] examined this transfer for NPCR and UACI and showed that their conventional reference values require adjustment for STL validity constraints. The same issue arises for Shannon entropy [5]: its reference values must reflect the admissible ciphertext encodings.

Global entropy is computed from the byte histogram of the entire ciphertext, whereas local entropy [6] averages the same measure over disjoint blocks of fixed size and is also sensitive to departures from randomness confined to parts of the ciphertext. The conventional reference values for both measures assume independent and uniformly distributed bytes.

In practice, however, evaluations of the global measure often report values close to the theoretical maximum of 8 bits, without specifying acceptance bounds for the given sample size. Such proximity alone does not establish consistency with the assumed null model. A two-sided hypothesis test provides a more rigorous assessment because it rejects values that are either unusually low or unusually high.

Even under the uniform model, the expected entropy is strictly below the theoretical maximum for every finite sample size — classical estimation results quantify the bias and variability [7, 8, 9].

As established in [4], a valid STL file does not satisfy the assumption of independent uniform bytes because each triangle record is composed mostly of IEEE-754 single-precision floats [10], for which the validity constraint excludes NaN and ±∞\pm\infty. Consequently, the valid-STL (VSTL) distribution is uniform over admissible encodings and has nonuniform byte probabilities that vary by position, together with dependence between the exponent bytes of each float.

This paper therefore introduces a hypothesis test for the global entropy of valid STL files, adjusts the established local test, and provides reference values and acceptance bounds appropriate to the assumed distribution and sample size for both measures.

We derive exact global and local entropy moments from the individual and joint laws of byte counts in triangle records under the VSTL model. For global entropy, second-order expansions make the reference moments efficiently computable for large files. For local entropy, we determine the optimal block size under the VSTL model by adapting the capacity energy criterion [6]. Normal approximations provide two-sided acceptance bounds for both tests.

Although the validity constraint induces seemingly small shifts in the entropy references, these differences become practically relevant for both tests as their acceptance intervals narrow. For local entropy, the change in block size further accentuates this effect.

The remainder of the paper is organized as follows. Section 2 defines the notation used throughout the paper and recalls the VSTL distribution from our foundational work. Section 3 derives the exact block entropy moments. Section 4 develops the global entropy test, while Section 5 adapts the local test; both examine their practical significance and validate their corresponding reference values through Monte-Carlo simulations. Finally, Section 6 concludes the paper.