spu2_cipher_xlate(9)
π spu2_cipher_xlate β like, the glow-up translator for ciphers β¨
Okay bestie, gather round, because this is the page where we explain spu2_cipher_xlate(9) from the Kernel API Manual. Picture it: your software cipher stuff is out here speaking one language, and the spu2 hardware is out here speaking another, and somebody has to be the bilingual bestie in the middle. That's this function. She takes a cipher {alg/mode/type} triple and converts it into a SPU2 cipher type and mode. Iconic behavior, honestly. π
πΈ SYNOPSIS πΈ
int spu2_cipher_xlate (enum spu_cipher_alg cipher_alg , enum
spu_cipher_mode cipher_mode , enum spu_cipher_type cipher_type , enum
spu2_cipher_type *spu2_type , enum spu2_cipher_mode *spu2_mode );
That's the whole vibe. Five arguments, one int coming back at you. π«Ά
β¨ ARGUMENTS β¨
Three things go in, two things come out, and every single one matters so don't skip a single one:
cipher_alg[in] β the cipher algorithm value, straight from the software enumeration. That's your starting ingredient, bestie. πcipher_mode[in] β the cipher mode value, also from the software enumeration. Yes, it's a different argument fromcipher_alg. No, you cannot merge them. Moving on. πcipher_type[in] β the cipher type value from the software enumeration. Third input, still software-side, still important.spu2_type[out] β pointer time! This is where the cipher type value used by spu2 hardware gets written. She's an output, so bring a real pointer, okay? πspu2_mode[out] β and this pointer is where the cipher mode value used by spu2 hardware lands. Two outs, both hardware-flavored. Slay.
Not me reminding you thatspu2_typeandspu2_modeare the [out] ones β the first three are the [in] ones. Don't mix up the direction of the translation, or you're gonna have a bad time. π
π₯ RETURN π₯
0if successful
That's it. That's the whole return situation. Zero means we ate. π
π¦ SEE ALSO π¦
Kernel file ./drivers/crypto/bcm/spu2.c β and oh my god, the whole friend group is here. Like, the entire spu2 crew showed up to the group chat:
spu2_hash_xlate(9), spu2_fmd_init(9), spu2_fmd_ctrl0_write(9), spu2_fmd_ctrl1_write(9), spu2_fmd_ctrl2_write(9), spu2_fmd_ctrl3_write(9), spu2_ctx_max_payload(9), spu2_payload_length(9), spu2_response_hdr_len(9), spu2_hash_pad_len(9), spu2_gcm_ccm_pad_len(9), spu2_assoc_resp_len(9), spu2_aead_ivlen(9), spu2_hash_type(9), spu2_digest_size(9), spu2_create_request(9), spu2_cipher_req_init(9), spu2_cipher_req_finish(9), spu2_request_pad(9), spu2_xts_tweak_in_payload(9), spu2_tx_status_len(9), spu2_rx_status_len(9), spu2_status_process(9), spu2_ccm_update_iv(9), spu2_wordalign_padlen(9)
No cap, that's the full list β go read all of them, iykyk. π
π that's the whole page, bestie π
This one lives in the kernel tree at ./drivers/crypto/bcm, dated October 2026, and it's the spu2_cipher_xlate(9) page β so go forth, translate those triples, and remember: the facts didn't change, only the vibe did. Periodt. π
π¦ 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