Data Structures | Macros | Functions | Variables
arc4.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  arc4_ctx


#define ARC4_CTX_SIZE   sizeof ( struct arc4_ctx )


void arc4_skip (const void *key, size_t keylen, size_t skip, const void *src, void *dst, size_t msglen)
 Perform ARC4 encryption or decryption, skipping initial keystream bytes. More...


struct cipher_algorithm arc4_algorithm

Macro Definition Documentation


#define ARC4_CTX_SIZE   sizeof ( struct arc4_ctx )

Definition at line 15 of file arc4.h.

Function Documentation



◆ arc4_skip()

void arc4_skip ( const void *  key,
size_t  keylen,
size_t  skip,
const void *  src,
void *  dst,
size_t  msglen 

Perform ARC4 encryption or decryption, skipping initial keystream bytes.

keyARC4 encryption key
keylenKey length
skipNumber of bytes of keystream to skip
srcMessage to encrypt or decrypt
msglenLength of message
Return values
dstEncrypted or decrypted message

Definition at line 115 of file arc4.c.

117 {
118  struct arc4_ctx ctx;
119  arc4_setkey ( &ctx, key, keylen );
120  arc4_xor ( &ctx, NULL, NULL, skip );
121  arc4_xor ( &ctx, src, dst, msglen );
122 }
Definition: arc4.h:10
struct golan_eq_context ctx
Definition: CIB_PRM.h:28
static void arc4_xor(void *ctxv, const void *srcv, void *dstv, size_t len)
Perform ARC4 encryption or decryption.
Definition: arc4.c:78
static __always_inline void off_t userptr_t src
Definition: efi_uaccess.h:66
static int arc4_setkey(void *ctxv, const void *keyv, size_t keylen)
Set ARC4 key.
Definition: arc4.c:42
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362
union @375 key
Sense key.
Definition: scsi.h:18

References arc4_setkey(), arc4_xor(), ctx, key, NULL, and src.

Referenced by tkip_kie_decrypt().

Variable Documentation

◆ arc4_algorithm

struct cipher_algorithm arc4_algorithm

Definition at line 124 of file arc4.c.

Referenced by tkip_decrypt(), tkip_encrypt(), wep_decrypt(), and wep_encrypt().