www.beck-ipc.com

@CHIP-RTOS C Library - TCP/IP API


Crypt_DES_MakeKey

Generates a DES subkey schedule based on a supplied 8 byte key.

int far Crypt_DES_MakeKey (
             const unsigned char far * key,
             Crypt_DesKeyScheduleS far * schedule ) ;

Parameters

key

[in]   The secret 8 byte (64 bit) DES key, to be used to generate the new DES subkey schedule.

schedule

[out]   Pointer to Crypt_DesKeyScheduleS structure to be initialized by this API.

Return Value

0 constant (provisional error code)

Comments

Each byte of the 8 byte key contains 7 key bits plus an odd parity bit (LS bit) for a total key size of 56 bits.   The parity bits are not tested by this API.   (If desired, this key byte odd parity check could be done on the user side.)

No presetting of the memory at schedule is required by the caller.   This API fully initializes this block of memory with a new DES subkey schedule based on the provided key.

The DES cipher encryption/decryption speed improves slightly (~3%) when the Crypt_DesKeyScheduleS object is allocated from the system's fast RAM heap area. Go here for a summary of cipher method execution times.

See Also

RTOS API

On the first call, this library function invokes a software interrupt which modifies the code at the calling site inside your application program.   A direct FAR JMP into the @CHIP-RTOS-x86 implementation for this function is installed so that on return and on any subsequent calls to this API this dynamic link reaches the function's implementation directly.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    n/an/an/aV1.35V1.35

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.19

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document