shake_squeeze(9)
π shake_squeeze(9) β bestie edition
okay so this is a page from the Kernel API Manual, and today we're learning about shake_squeeze β the function that literally squeezes the juice out of your SHAKE128 or SHAKE256 πβ¨
β¨ NAME β¨
shake_squeeze β Generate output from SHAKE128 or SHAKE256 π«Ά
π SYNOPSIS π
void shake_squeeze (struct shake_ctx *ctx , u8 *out , size_t out_len );
πΈ ARGUMENTS πΈ
ctxβ the context you're about to squeeze. it must have been initialized already, no cap β don't come at this function with a raw uninitialized struct, bestie πoutβ where the resulting output data gets written. this is the vibe destination π«out_lenβ how much data to extract intoout, measured in bytes.
π DESCRIPTION π
so here's the tea: you can call this multiple times, and that's totally fine, not me being weird about it.
The way it works β a bunch of consecutive squeezes laid end-to-end will yield the exact same output as one big squeeze that generates the same total amount of output. literally identical. it's giving "same energy, different packaging" π
β οΈ but listen β more input cannot be provided after squeezing has begun. once you start squeezing, that's it, the input era is over, periodt. π
After the last squeeze, call shake_zeroize_ctx. that's the cleanup step, don't skip it, it's not optional bestie π
π¦ CONTEXT π¦
Any context. that's it. any. go off β¨
π SEE ALSO π
Kernel file ./include/crypto/sha3.h, plus the whole friend group:
struct sha3_ctx(9)sha3_zeroize_ctx(9)struct shake_ctx(9)shake_zeroize_ctx(9)sha3_224_init(9)sha3_256_init(9)sha3_384_init(9)sha3_512_init(9)sha3_update(9)sha3_final(9)shake128_init(9)shake256_init(9)shake_update(9)sha3_224(9)sha3_256(9)sha3_384(9)sha3_512(9)shake128(9)shake256(9)
π and that's the whole page! this lil beauty lives in ./include/crypto and the date on it is October 2026 β iconic, timeless, main character energy fr fr. go squeeze something, bestie π«Άπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms