Pseudo-random number generators (PRNGs) are foundational in cryptography, providing the unpredictability required for key generation and data protection. Petri nets provide a structured mathematical framework for modeling systems with concurrency, asynchrony, distribution, and nondeterminism. This paper proposes a Petri net token-flow PRNG for grayscale image encryption and instantiates it in a permutation-diffusion cipher. The Petri net is initialized from a SHA-256 digest, and the induced token flow yields two keystreams for pixel permutation and XOR-based diffusion. On standard grayscale benchmarks, the cipher produces near-uniform ciphertext histograms, high entropy, low adjacent-pixel correlation, high NPCR, and lossless decryption quality. These results suggest that Petri net-driven keystreams are a viable alternative to chaos-based generators for image protection, combining the modeling strengths of Petri nets with established Permutation-diffusion techniques.
Mahadeer et al. (Fri,) studied this question.