View full-text article in PMC Entropy (Basel). 2023 Jul 31;25(8):1147. doi: 10.3390/e25081147 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 1 Hash value stacking algorithm Input: The plaintext image P and its SHA-256 hash value V(0) of length 32 bytes, and the key streams Q(1) and Q(2). 1:Set both v(s) and v(x) to 0; 2:for i=1 to 32 do 3: v(s)=(v(s)+V(0)(i))mod256; 4: v(x)=v(x)⊕V(0)(i); 5:end for 6:Set U(x)=transpose(Q(1))×Q(2); 7:Set U(s)=v(s)×U(x); 8:U(x)=v(x)×U(x); 9:Set C(1)=(P+U(s)+U(x))mod256 Output: The intermediate ciphertext image C(1).