TrustCore SDK NanoCrypto API reference  version 7.0
arc2.h
Go to the documentation of this file.
1 /*
2  * arc2.h
3  *
4  * "alleged rc2" algorithm
5  *
6  * Copyright 2019-2024 DigiCert, Inc. All Rights Reserved.
7  * Proprietary and Confidential Material.
8  *
9  */
10 
26 /*------------------------------------------------------------------*/
27 
28 #ifndef __ARC2_H__
29 #define __ARC2_H__
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 
36 #define RC2_BLOCK_SIZE (8)
37 
38 
39 /*------------------------------------------------------------------*/
40 #ifdef __ENABLE_ARC2_CIPHERS__
41 
57 MOC_EXTERN void rc2_keyschedule(ubyte2 xkey[64], const ubyte *key, ubyte4 len, ubyte4 bits);
58 
73 MOC_EXTERN void rc2_encrypt(const ubyte2 xkey[64], const ubyte *plain, ubyte *cipher);
74 
89 MOC_EXTERN void rc2_decrypt(const ubyte2 xkey[64], ubyte *plain, const ubyte *cipher);
90 #endif
91 
92 #ifdef __cplusplus
93 }
94 #endif
95 
96 #endif
MOC_EXTERN void rc2_decrypt(const ubyte2 xkey[64], ubyte *plain, const ubyte *cipher)
Decrypts a 64 bit block of data.
MOC_EXTERN void rc2_keyschedule(ubyte2 xkey[64], const ubyte *key, ubyte4 len, ubyte4 bits)
Computes the rc2 key schedule.
MOC_EXTERN void rc2_encrypt(const ubyte2 xkey[64], const ubyte *plain, ubyte *cipher)
Encrypts a 64 bit block of data.