www.beck-ipc.com

@CHIP-RTOS C Library - TCP/IP API


Crypt_3DES_Encrypt

Encrypt one cipher block of data using 3DES encryption method.

int far Crypt_3DES_Encrypt (
             const Crypt_3DesKeyScheduleS far *schedule,
             const void far *in,
                   void far *out ) ;

Parameters

schedule

Pointer to 3DES subkey schedule generated by Crypt_3DES_MakeKey().

in

Pointer to 8 byte clear text to be encrypted

out

Pointer to 8 byte buffer where the resulting decrypted clear text will be written by this API.

Return Value

0 constant (provisional error code)

Comments

This API encrypts one 8 byte cipher block of data using the 3DES encryption method.   It can be called repeatedly until your entire message has been encrypted.   When your message is not an integral number of 8 byte blocks in length, then you must pad the final block with some pattern agreed upon with your decryption side.

The 3DES cipher 3DES treats data as little endian long words.   Any required data endian handling is done inside this API, so the caller must not perform any such handling on their side.   (Since the @CHIP-RTOS-x86 CPU is itself little endian, this note applies only for code which is to be ported to big endian Beck platforms.)

The in and out parameters may reference the same location.

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