Every time you use the sponge to absorbliquid and chalk (data) it will remember this action, it is forever in its history. When a sponge is squeezed, the outcome is a mix of all the sponge's history: the sponge mixes all its former input, usually resulting in a goo-y mash of chalk, with the original inputs unrecognisable.
If we stick to a single standard algorithm available in Python without add-on, we can use scrypt (available as hashlib.scrypt), which includes memory-hard key stretching, and has variable output size (with that later feature using PBKDF2 -HMAC-SHA256 reduced to 1 round).
However, there has been a trend in modern hash function design to support arbitrary-length output directly, without the need for additional layers. For example, the cryptographic spongeconstruction has this feature built in: you absorb the input into the sponge and then squeeze as much output out of it as you want.
What is "preimage resistance", and how can the lack thereof be exploited? How is this different from collision resistance, and are there any known preimage attacks that would be considered feasible?
Q&A for software developers, mathematicians and others interested in cryptography
With ease I found information about Leslie Lamport, the author of the Lamport one-time signature scheme, but I cannot seem to find any information about mister(?) Winternitz, who proposed (at least it seems that way) the original Winternitz one-time signature scheme. The only information I was able to find (by asking ChatGPT, so I am taking it with big grain of salt) is that his first name was ...
Q&A for software developers, mathematicians and others interested in cryptography
Welcome! Is the question about how pairing-friendly curves are constructed, instantiated, or used in practice to build cryptographic primitives?
$\left[\begin{array}{ccc}{X}_{0}& {Y}_{0}& 1\\ 0& p& 0\\ p& 0& 0\end{array}\right]$ which has determinant p2 p 2 ${p}^{2}$. We can perform lattice basis reduction and ...