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

Go to the source code of this file.

Data Structures

struct  arc4_ctx

Defines

#define ARC4_CTX_SIZE   sizeof ( struct arc4_ctx )

Functions

 FILE_LICENCE (GPL2_OR_LATER)
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.

Variables

struct cipher_algorithm arc4_algorithm

Define Documentation

#define ARC4_CTX_SIZE   sizeof ( struct arc4_ctx )

Definition at line 15 of file arc4.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER  )
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.

Parameters:
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.

References arc4_setkey(), arc4_xor(), and NULL.

Referenced by tkip_kie_decrypt().

{
        struct arc4_ctx ctx;
        arc4_setkey ( &ctx, key, keylen );
        arc4_xor ( &ctx, NULL, NULL, skip );
        arc4_xor ( &ctx, src, dst, msglen );
}

Variable Documentation

Definition at line 124 of file arc4.c.

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