Download DRM035 - Freescale Semiconductor
Transcript
Freescale Semiconductor, Inc. Source Code Files tea.c Freescale Semiconductor, Inc... * * DESCRIPTION: This file contains the complete Tiny Encryption Algorithm (TEA) * implementation * * MODULES INCLUDED: * teaCode() * teaDecode() * teaEncryptBuff() * teaDecryptBuff() * *******************************************************************************/ /******************************************************************************/ /* I N C L U D E S */ /******************************************************************************/ #include “pl.h” #include “tea.h” #include “types.h” /******************************************************************************/ /* P R O T O T Y P E S */ /******************************************************************************/ void teaCode(void); void teaDecode(void); /******************************************************************************/ /* GLOBAL VARIABLES */ /******************************************************************************/ extern const tea_uKey pl_TeaKey; /* Key for TEA (Tiny Encryption Algorithm) computation */ /******************************************************************************/ /* LOCAL VARIABLES OF THE FILE */ /******************************************************************************/ tea_uIO tea_IO; // own buffer for TEA computation, 64bits long /******************************************************************************/ /* TEA (The Tiny Encryption Algorithm) authors description */ /******************************************************************************/ /* The Tiny Encryption Algorithm (TEA) by David Wheeler and Roger Needham of the Cambridge Computer Laboratory. Placed in the Public Domain by David Wheeler and Roger Needham. ftp://ftp.cl.cam.ac.uk/papers/djw-rmn/djw-rmn-tea.html **** ANSI C VERSION (New Variant) **** Authors notes: TEA is a Feistel cipher with XOR and and addition as the non-linear DRM035 — Rev 0 MOTOROLA Designer Reference Manual Source Code Files For More Information On This Product, Go to: www.freescale.com 143