crypt_scatterlist(9)
π« NAME π«
ok so bestie, this is crypt_scatterlist β and like, the original page literally leaves the description blank after the dash? iconic honestly. no description, no notes, just vibes. it's a kernel API manual entry for crypt_scatterlist, and yes that's all the NAME section gives us, we respect the mystery π«Ά
β¨ SYNOPSIS β¨
int crypt_scatterlist (struct ecryptfs_crypt_stat *crypt_stat , struct
scatterlist *dst_sg , struct scatterlist *src_sg , int size , unsigned
char *iv , int op );
π ARGUMENTS π
okay bestie here's the cast of characters, main character energy only:
crypt_statβ pointer to thecrypt_statstruct you're gonna initialize. it's giving setup era πdst_sgβ the destination of the data after the crypto operation goes down. where the glow-up lands β¨src_sgβ the data that's about to get encrypted or decrypted. the before picture πΈsizeβ length of data. how much we're working with, no cap.ivβ the IV to use. yes, that IV. the initialization vector. keep up πopβENCRYPTorDECRYPT, to indicate the desired operation. you literally just tell it which one, pick your fighter π₯
πΈ DESCRIPTION πΈ
so what does it actually do?? it returns the number of bytes encrypted or decrypted β that's the number you want, that's the slay β¨
β οΈ heads up: a negative value on error. so if the number comes back negative, that's not a cute number, that's an error, and you should be like "π okay something's wrong."
π¦ SEE ALSO π¦
kernel file ./fs/ecryptfs/crypto.c β go read it, it's right there:
ecryptfs_from_hex(9)ecryptfs_derive_iv(9)ecryptfs_init_crypt_stat(9)ecryptfs_destroy_crypt_stat(9)virt_to_scatterlist(9)crypt_extent(9)ecryptfs_encrypt_page(9)ecryptfs_decrypt_page(9)ecryptfs_init_crypt_ctx(9)ecryptfs_copy_mount_wide_flags_to_inode_flags(9)ecryptfs_set_default_crypt_stat_vals(9)ecryptfs_new_file_context(9)ecryptfs_validate_marker(9)ecryptfs_process_flags(9)write_ecryptfs_marker(9)ecryptfs_code_for_cipher_string(9)ecryptfs_cipher_code_to_string(9)ecryptfs_write_headers_virt(9)ecryptfs_write_metadata(9)set_default_header_data(9)ecryptfs_read_headers_virt(9)ecryptfs_read_xattr_region(9)ecryptfs_process_key_cipher(9)ecryptfs_destroy_crypto(9)ecryptfs_tfm_exists(9)ecryptfs_get_tfm_and_mutex_for_cipher_name(9)ecryptfs_encode_for_filename(9)ecryptfs_decode_from_filename(9)ecryptfs_encrypt_and_encode_filename(9)ecryptfs_decode_and_decrypt_filename(9)
like, that's the whole friend group right there π
and that's the page!! π§
this lil masterpiece lives in <pink>./fs/ecryptfs</pink> and it's dated October 2026 β source/version and date, both accounted for, we did not forget a single crumb π
crypt_scatterlist(9) β 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