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 109 of file arc4.c.

111 {
112  struct arc4_ctx ctx;
113  arc4_setkey ( &ctx, key, keylen );
114  arc4_xor ( &ctx, NULL, NULL, skip );
115  arc4_xor ( &ctx, src, dst, msglen );
116 }
Definition: arc4.h:10
static void const void void * dst
Definition: crypto.h:244
static void const void * src
Definition: crypto.h:244
static void const void size_t keylen
Definition: crypto.h:233
static void arc4_xor(void *ctxv, const void *srcv, void *dstv, size_t len)
Perform ARC4 encryption or decryption.
Definition: arc4.c:78
struct golan_eq_context ctx
Definition: CIB_PRM.h:28
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:321
union @382 key
Sense key.
Definition: crypto.h:284

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

Referenced by tkip_kie_decrypt().

Variable Documentation

◆ arc4_algorithm

struct cipher_algorithm arc4_algorithm

Definition at line 118 of file arc4.c.

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