STRUCT SIG_ALG(9)
π struct sig_alg(9) π
okay so bestie, welcome to the Kernel API Manual page for struct sig_alg(9) β itβs giving generic public key signature algorithm energy, and honestly? iconic. π This is the struct that lays out the function pointers for public key signature algorithms, and weβre gonna go through every single one, no skipping. periodt. π
β¨ NAME β¨
struct sig_alg β generic public key signature algorithm
π SYNOPSIS π
struct sig_alg {
int (*sign)(struct crypto_sig *tfm, const void *src, unsigned int
slen, void *dst, unsigned int dlen);
int (*verify)(struct crypto_sig *tfm, const void *src, unsigned int
slen, const void *digest, unsigned int dlen);
int (*set_pub_key)(struct crypto_sig *tfm, const void *key, unsigned
int keylen);
int (*set_priv_key)(struct crypto_sig *tfm, const void *key,
unsigned int keylen);
unsigned int (*key_size)(struct crypto_sig *tfm);
unsigned int (*digest_size)(struct crypto_sig *tfm);
unsigned int (*max_size)(struct crypto_sig *tfm);
int (*init)(struct crypto_sig *tfm);
void (*exit)(struct crypto_sig *tfm);
struct crypto_alg base;
};
π«Ά Members π«Ά
signβ this function performs a sign operation as defined by the public key algorithm. On success, the signature size is returned. Optional, bestie. β¨verifyβ this function performs a complete verify operation as defined by the public key algorithm, returning verification status. Optional. π¦set_pub_keyβ this function invokes the algorithm specific set public key function, which knows how to decode and interpret the BER encoded public key and parameters. Mandatory β like, you literally need this one. πset_priv_keyβ this function invokes the algorithm specific set private key function, which knows how to decode and interpret the BER encoded private key and parameters. Optional. πkey_sizeβ this function returns key size. Mandatory. π₯digest_sizeβ this function returns maximum digest size. Optional. πmax_sizeβ this function returns maximum signature size. Optional. πΈinitβ initializes the cryptographic transformation object. This function is used to initialize the cryptographic transformation object. This function is called only once at the instantiation time, right after the transformation context was allocated. In case the cryptographic hardware has some special requirements which need to be handled by software, this function shall check for the precise requirement of the transformation and put any software fallbacks in place. π§exitβ deinitializes the cryptographic transformation object. This is a counterpart toinit, used to remove various changes set ininit. πbaseβ common crypto API algorithm data structure. π«Ά
π SEE ALSO π
- Kernel file
./include/crypto/sig.h struct crypto_sig(9)Generic Public Key Signature API(9)crypto_alloc_sig(9)crypto_free_sig(9)crypto_sig_keysize(9)crypto_sig_digestsize(9)crypto_sig_maxsize(9)crypto_sig_sign(9)crypto_sig_verify(9)crypto_sig_set_pubkey(9)crypto_sig_set_privkey(9)
Thatβs the whole vibe, bestie β source path ./include/crypto, date October 2026, page title struct sig_alg(9). byeee, go sign something cute! ππ
π¦ 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