des-internal.c File Reference

DES and 3DES-EDE ciphers. More...

#include "includes.h"
#include "common.h"
#include "crypto.h"
#include "des_i.h"
Include dependency graph for des-internal.c:

Go to the source code of this file.

Defines

#define ROLc(x, y)
#define RORc(x, y)

Functions

void des_encrypt (const u8 *clear, const u8 *key, u8 *cypher)
 Encrypt one block with DES.
void des_key_setup (const u8 *key, u32 *ek, u32 *dk)
void des_block_encrypt (const u8 *plain, const u32 *ek, u8 *crypt)
void des_block_decrypt (const u8 *crypt, const u32 *dk, u8 *plain)
void des3_key_setup (const u8 *key, struct des3_key_s *dkey)
void des3_encrypt (const u8 *plain, const struct des3_key_s *key, u8 *crypt)
void des3_decrypt (const u8 *crypt, const struct des3_key_s *key, u8 *plain)

Detailed Description

DES and 3DES-EDE ciphers.

Modifications to LibTomCrypt implementation:

Copyright
Copyright (c) 2006-2009, Jouni Malinen <j@w1.fi>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Alternatively, this software may be distributed under the terms of BSD license.

See README and COPYING for more details.

Definition in file des-internal.c.


Define Documentation

#define ROLc ( x,
 ) 
Value:
((((unsigned long) (x) << (unsigned long) ((y) & 31)) | \
          (((unsigned long) (x) & 0xFFFFFFFFUL) >> \
           (unsigned long) (32 - ((y) & 31)))) & 0xFFFFFFFFUL)

DES code submitted by Dobes Vandermeer

Definition at line 45 of file des-internal.c.

#define RORc ( x,
 ) 
Value:
(((((unsigned long) (x) & 0xFFFFFFFFUL) >> \
           (unsigned long) ((y) & 31)) | \
          ((unsigned long) (x) << (unsigned long) (32 - ((y) & 31)))) & \
         0xFFFFFFFFUL)

Definition at line 49 of file des-internal.c.


Function Documentation

void des_encrypt ( const u8 *  clear,
const u8 *  key,
u8 *  cypher 
)

Encrypt one block with DES.

Parameters:
clear 8 octets (in)
key 7 octets (in) (no parity bits included)
cypher 8 octets (out)

Definition at line 406 of file des-internal.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Sat Nov 21 23:19:09 2009 for hostapd by  doxygen 1.6.1