SIPHASH24(9)

πŸ“¦ in nixpkgs unstable

πŸ’– SIPHASH24(9) πŸ’–

okay so welcome to SIPHASH24(9), straight out of the Kernel Developer's Manual, and it's literally the page for calculating SipHash24 hashes. bestie, it's giving secure little hash energy and we're obsessed πŸ’…


πŸŽ€ NAME πŸŽ€

  • SipHash24_Init
  • SipHash24_Update
  • SipHash24_End
  • SipHash24_Final
  • SipHash24

all of these are here to calculate SipHash24 hashes ✨


✨ SYNOPSIS ✨

#include <crypto/siphash.h>

void
SipHash24_Init(SIPHASH_CTX *ctx, const SIPHASH_KEY *key);

void
SipHash24_Update(SIPHASH_CTX *ctx, const void *data, size_t len);

uint64_t
SipHash24_End(SIPHASH_CTX *ctx);

void
SipHash24_Final(void *digest, SIPHASH_CTX *ctx);

uint64_t
SipHash24(const SIPHASH_KEY *key, const void *data, size_t len);

πŸ’… DESCRIPTION πŸ’…

okay so the SipHash algorithm is a keyed hash algorithm optimised for short inputs, and it produces a 64-bit digest of data. The SipHash24 functions implement the algorithm with 2 compression rounds and 4 finalisation rounds. periodt. πŸ’–

  • SipHash24_Init() β€” initialises a SIPHASH_CTX context ctx with the secret key. setting the vibe, basically 🫢
  • SipHash24_Update() β€” adds data of length len to the context ctx. feed it the data, bestie πŸ“
  • SipHash24_End() β€” this is called after all data has been added to ctx via SipHash24_Update(), and it returns a message digest in the host's native endian. iconic finishing move ✨
  • SipHash24_Final() β€” this is called after all data has been added to ctx via SipHash24_Update(), and it stores the message digest at the address specified by the digest parameter. The buffer at digest must be SIPHASH_DIGEST_LENGTH bytes long. do not skip that part, fr fr πŸ’€
  • SipHash24() β€” calculates the digest of data of length len with the secret key. one-shot main character energy πŸ‘‘

It is recommended that the SIPHASH_KEY key be generated with arc4random_buf(9). that's the recommendation, bestie β€” key generation said go to arc4random_buf(9) 🌈


πŸ¦‹ CONTEXT πŸ¦‹

vibe check: SipHash24_Init(), SipHash24_Update(), SipHash24_End(), SipHash24_Final() and SipHash24() can be called during autoconf, from process context, or from interrupt context. all five, same energy, no cap πŸ’œ


🌈 RETURN VALUES 🌈

SipHash24_End() and SipHash24() return the 64-bit message digest in the host's native endian representation. that's the whole return situation, slay πŸŽ€


πŸ“ SEE ALSO πŸ“

  • arc4random_buf(9)

byeee 🫢 this page is from Debian, dated September 14, 2015, for SIPHASH24(9) β€” mwah πŸ’‹

πŸ“¦ where this page comes from
  • nixpkgs unstable: cvs-export
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms