summaryrefslogtreecommitdiff
path: root/src/libtom/tomcrypt_des.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtom/tomcrypt_des.c')
-rw-r--r--src/libtom/tomcrypt_des.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/libtom/tomcrypt_des.c b/src/libtom/tomcrypt_des.c
index dea5b92..d921ca5 100644
--- a/src/libtom/tomcrypt_des.c
+++ b/src/libtom/tomcrypt_des.c
@@ -20,7 +20,7 @@
#define EN0 0
#define DE1 1
-const struct ltc_cipher_descriptor des_desc =
+static const struct ltc_cipher_descriptor des_desc =
{
"des",
13,
@@ -34,7 +34,7 @@ const struct ltc_cipher_descriptor des_desc =
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
-const struct ltc_cipher_descriptor des3_desc =
+static const struct ltc_cipher_descriptor des3_desc =
{
"3des",
14,
@@ -1526,7 +1526,7 @@ static void desfunc(ulong32 *block, const ulong32 *keys)
@param skey The key in as scheduled by this function.
@return CRYPT_OK if successful
*/
-int des_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey)
+static int des_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey)
{
LTC_ARGCHK(key != NULL);
LTC_ARGCHK(skey != NULL);
@@ -1553,7 +1553,7 @@ int des_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_ke
@param skey The key in as scheduled by this function.
@return CRYPT_OK if successful
*/
-int des3_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey)
+static int des3_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey)
{
LTC_ARGCHK(key != NULL);
LTC_ARGCHK(skey != NULL);
@@ -1584,7 +1584,7 @@ int des3_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_k
@param skey The key as scheduled
@return CRYPT_OK if successful
*/
-int des_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey)
+static int des_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey)
{
ulong32 work[2];
LTC_ARGCHK(pt != NULL);
@@ -1605,7 +1605,7 @@ int des_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *s
@param skey The key as scheduled
@return CRYPT_OK if successful
*/
-int des_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey)
+static int des_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey)
{
ulong32 work[2];
LTC_ARGCHK(pt != NULL);
@@ -1626,7 +1626,7 @@ int des_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *s
@param skey The key as scheduled
@return CRYPT_OK if successful
*/
-int des3_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey)
+static int des3_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey)
{
ulong32 work[2];
@@ -1650,7 +1650,7 @@ int des3_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *
@param skey The key as scheduled
@return CRYPT_OK if successful
*/
-int des3_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey)
+static int des3_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey)
{
ulong32 work[2];
LTC_ARGCHK(pt != NULL);
@@ -1670,7 +1670,7 @@ int des3_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *
Performs a self-test of the LTC_DES block cipher
@return CRYPT_OK if functional, CRYPT_NOP if self-test has been disabled
*/
-int des_test(void)
+static int des_test(void)
{
#ifndef LTC_TEST
return CRYPT_NOP;
@@ -1813,7 +1813,7 @@ int des_test(void)
#endif
}
-int des3_test(void)
+static int des3_test(void)
{
#ifndef LTC_TEST
return CRYPT_NOP;
@@ -1852,14 +1852,14 @@ int des3_test(void)
/** Terminate the context
@param skey The scheduled key
*/
-void des_done(symmetric_key *skey)
+static void des_done(symmetric_key *skey)
{
}
/** Terminate the context
@param skey The scheduled key
*/
-void des3_done(symmetric_key *skey)
+static void des3_done(symmetric_key *skey)
{
}
@@ -1869,7 +1869,7 @@ void des3_done(symmetric_key *skey)
@param keysize [in/out] The length of the recommended key (in bytes). This function will store the suitable size back in this variable.
@return CRYPT_OK if the input key size is acceptable.
*/
-int des_keysize(int *keysize)
+static int des_keysize(int *keysize)
{
LTC_ARGCHK(keysize != NULL);
if(*keysize < 8) {
@@ -1884,7 +1884,7 @@ int des_keysize(int *keysize)
@param keysize [in/out] The length of the recommended key (in bytes). This function will store the suitable size back in this variable.
@return CRYPT_OK if the input key size is acceptable.
*/
-int des3_keysize(int *keysize)
+static int des3_keysize(int *keysize)
{
LTC_ARGCHK(keysize != NULL);
if(*keysize < 24) {