![]() |
TrustCore SDK NanoCrypto API reference
version 7.0
|
Header file for the NanoCrypto RC2 Internal APIs. More...
Go to the source code of this file.
Functions | |
| MOC_EXTERN void | rc2_decrypt (const ubyte2 xkey[64], ubyte *plain, const ubyte *cipher) |
| Decrypts a 64 bit block of data. More... | |
| MOC_EXTERN void | rc2_encrypt (const ubyte2 xkey[64], const ubyte *plain, ubyte *cipher) |
| Encrypts a 64 bit block of data. More... | |
| MOC_EXTERN void | rc2_keyschedule (ubyte2 xkey[64], const ubyte *key, ubyte4 len, ubyte4 bits) |
| Computes the rc2 key schedule. More... | |
This file contains the NanoCrypto RC2 Internal API methods.
To enable the NanoCrypto RC2 functions, the following flag must be defined in moptions.h:
__ENABLE_ARC2_CIPHERS__ Additionally, the following flag must not be defined:
__ARC2_HARDWARE_CIPHER__ | MOC_EXTERN void rc2_decrypt | ( | const ubyte2 | xkey[64], |
| ubyte * | plain, | ||
| const ubyte * | cipher | ||
| ) |
Decrypts a 64 bit block of data.
To enable the NanoCrypto RC2 functions, the following flag must be defined
__ENABLE_ARC2_CIPHERS__ | xkey | The key schedule to be used to decrypt the data. |
| plain | Buffer that will hold the resulting 64 bits (8 bytes) of plaintext. |
| cipher | Buffer holding the 64 bit (8 byte) block of data to be decrypted. |
| MOC_EXTERN void rc2_encrypt | ( | const ubyte2 | xkey[64], |
| const ubyte * | plain, | ||
| ubyte * | cipher | ||
| ) |
Encrypts a 64 bit block of data.
To enable the NanoCrypto RC2 functions, the following flag must be defined
__ENABLE_ARC2_CIPHERS__ | xkey | The key schedule to be used to encrypt the data. |
| plain | Buffer holding the 64 bit (8 byte) block of data to be encrypted. |
| cipher | Buffer that will hold the resulting 64 bits (8 bytes) of ciphertext. |
| MOC_EXTERN void rc2_keyschedule | ( | ubyte2 | xkey[64], |
| const ubyte * | key, | ||
| ubyte4 | len, | ||
| ubyte4 | bits | ||
| ) |
Computes the rc2 key schedule.
To enable the NanoCrypto RC2 functions, the following flag must be defined
__ENABLE_ARC2_CIPHERS__ | xkey | Will hold the resulting 128 bit key schedule. |
| key | Buffer holding the input key. |
| len | The length of the key in bytes. |
| bits | The requested effective key bits. |