_libre_RIPEMD160_Final
_libre_RIPEMD160
_libre_RIPEMD160_Transform
+_libre_DES_ecb3_encrypt
+_libre_DES_cbc_cksum
+_libre_DES_cbc_encrypt
+_libre_DES_ncbc_encrypt
+_libre_DES_xcbc_encrypt
+_libre_DES_cfb_encrypt
+_libre_DES_ecb_encrypt
+_libre_DES_encrypt1
+_libre_DES_encrypt2
+_libre_DES_encrypt3
+_libre_DES_decrypt3
+_libre_DES_ede3_cbc_encrypt
+_libre_DES_ede3_cbcm_encrypt
+_libre_DES_ede3_cfb64_encrypt
+_libre_DES_ede3_cfb_encrypt
+_libre_DES_ede3_ofb64_encrypt
+_libre_DES_enc_read
+_libre_DES_enc_write
+_libre_DES_fcrypt
+_libre_DES_crypt
+_libre_DES_ofb_encrypt
+_libre_DES_pcbc_encrypt
+_libre_DES_quad_cksum
+_libre_DES_random_key
+_libre_DES_set_odd_parity
+_libre_DES_check_key_parity
+_libre_DES_is_weak_key
+_libre_DES_set_key
+_libre_DES_key_sched
+_libre_DES_set_key_checked
+_libre_DES_set_key_unchecked
+_libre_DES_string_to_key
+_libre_DES_string_to_2keys
+_libre_DES_cfb64_encrypt
+_libre_DES_ofb64_encrypt
-/* $OpenBSD: cbc_cksm.c,v 1.10 2023/07/08 07:34:34 jsing Exp $ */
+/* $OpenBSD: cbc_cksm.c,v 1.11 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
((tout1 << 24L) & 0xFF000000);
return (tout1);
}
+LCRYPTO_ALIAS(DES_cbc_cksum);
-/* $OpenBSD: cfb64ede.c,v 1.12 2023/07/08 07:34:34 jsing Exp $ */
+/* $OpenBSD: cfb64ede.c,v 1.13 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
v0 = v1 = ti[0] = ti[1] = c = cc = 0;
*num = n;
}
+LCRYPTO_ALIAS(DES_ede3_cfb64_encrypt);
/* This is compatible with the single key CFB-r for DES, even thought that's
* not what EVP needs.
l2c(v1, iv);
v0 = v1 = d0 = d1 = ti[0] = ti[1] = 0;
}
+LCRYPTO_ALIAS(DES_ede3_cfb_encrypt);
-/* $OpenBSD: cfb64enc.c,v 1.8 2023/07/08 07:11:07 beck Exp $ */
+/* $OpenBSD: cfb64enc.c,v 1.9 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
v0 = v1 = ti[0] = ti[1] = c = cc = 0;
*num = n;
}
+LCRYPTO_ALIAS(DES_cfb64_encrypt);
-/* $OpenBSD: cfb_enc.c,v 1.16 2023/07/08 07:11:07 beck Exp $ */
+/* $OpenBSD: cfb_enc.c,v 1.17 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
l2c(v1, iv);
v0 = v1 = d0 = d1 = ti[0] = ti[1] = 0;
}
+LCRYPTO_ALIAS(DES_cfb_encrypt);
-/* $OpenBSD: des_enc.c,v 1.15 2023/07/08 07:34:34 jsing Exp $ */
+/* $OpenBSD: des_enc.c,v 1.16 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
data[1] = r;
l = r = t = u = 0;
}
+LCRYPTO_ALIAS(DES_encrypt1);
void
DES_encrypt2(DES_LONG *data, DES_key_schedule *ks, int enc)
data[1] = ROTATE(r, 3) & 0xffffffffL;
l = r = t = u = 0;
}
+LCRYPTO_ALIAS(DES_encrypt2);
#endif /* OPENBSD_DES_ASM */
data[0] = l;
data[1] = r;
}
+LCRYPTO_ALIAS(DES_encrypt3);
void
DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1,
data[0] = l;
data[1] = r;
}
+LCRYPTO_ALIAS(DES_decrypt3);
#ifndef DES_DEFAULT_OPTIONS
tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0;
tin[0] = tin[1] = 0;
}
+LCRYPTO_ALIAS(DES_ede3_cbc_encrypt);
#endif /* DES_DEFAULT_OPTIONS */
-/* $OpenBSD: ecb3_enc.c,v 1.9 2023/07/08 07:11:07 beck Exp $ */
+/* $OpenBSD: ecb3_enc.c,v 1.10 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
l2c(l0, out);
l2c(l1, out);
}
+LCRYPTO_ALIAS(DES_ecb3_encrypt);
-/* $OpenBSD: ecb_enc.c,v 1.19 2023/07/31 05:04:06 tb Exp $ */
+/* $OpenBSD: ecb_enc.c,v 1.20 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
l2c(l, out);
l = ll[0] = ll[1] = 0;
}
+LCRYPTO_ALIAS(DES_ecb_encrypt);
-/* $OpenBSD: ede_cbcm_enc.c,v 1.9 2023/07/08 07:34:34 jsing Exp $ */
+/* $OpenBSD: ede_cbcm_enc.c,v 1.10 2024/03/29 01:47:29 joshua Exp $ */
/* Written by Ben Laurie <ben@algroup.co.uk> for the OpenSSL
* project 13 Feb 1999.
*/
tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0;
tin[0] = tin[1] = 0;
}
+LCRYPTO_ALIAS(DES_ede3_cbcm_encrypt);
#endif
-/* $OpenBSD: enc_read.c,v 1.17 2023/07/08 07:11:07 beck Exp $ */
+/* $OpenBSD: enc_read.c,v 1.18 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
}
return num;
}
+LCRYPTO_ALIAS(DES_enc_read);
-/* $OpenBSD: enc_writ.c,v 1.17 2023/07/08 07:34:34 jsing Exp $ */
+/* $OpenBSD: enc_writ.c,v 1.18 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
return (len);
}
+LCRYPTO_ALIAS(DES_enc_write);
-/* $OpenBSD: fcrypt.c,v 1.15 2023/07/08 07:34:34 jsing Exp $ */
+/* $OpenBSD: fcrypt.c,v 1.16 2024/03/29 01:47:29 joshua Exp $ */
#include <stdio.h>
return (DES_fcrypt(buf, salt, buff));
}
+LCRYPTO_ALIAS(DES_crypt);
char *
DES_fcrypt(const char *buf, const char *salt, char *ret)
ret[13] = '\0';
return (ret);
}
+LCRYPTO_ALIAS(DES_fcrypt);
-/* $OpenBSD: ncbc_enc.c,v 1.10 2023/07/08 07:34:34 jsing Exp $ */
+/* $OpenBSD: ncbc_enc.c,v 1.11 2024/03/29 01:47:29 joshua Exp $ */
/*
* #included by:
* cbc_enc.c (DES_cbc_encrypt)
tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0;
tin[0] = tin[1] = 0;
}
+#ifdef CBC_ENC_C__DONT_UPDATE_IV
+LCRYPTO_ALIAS(DES_cbc_encrypt);
+#else
+LCRYPTO_ALIAS(DES_ncbc_encrypt);
+#endif
-/* $OpenBSD: ofb64ede.c,v 1.8 2023/07/08 07:11:07 beck Exp $ */
+/* $OpenBSD: ofb64ede.c,v 1.9 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
v0 = v1 = ti[0] = ti[1] = 0;
*num = n;
}
+LCRYPTO_ALIAS(DES_ede3_ofb64_encrypt);
-/* $OpenBSD: ofb64enc.c,v 1.8 2023/07/08 07:11:07 beck Exp $ */
+/* $OpenBSD: ofb64enc.c,v 1.9 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
t = v0 = v1 = ti[0] = ti[1] = 0;
*num = n;
}
+LCRYPTO_ALIAS(DES_ofb64_encrypt);
-/* $OpenBSD: ofb_enc.c,v 1.8 2023/07/08 07:11:07 beck Exp $ */
+/* $OpenBSD: ofb_enc.c,v 1.9 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
l2c(v1, iv);
v0 = v1 = d0 = d1 = ti[0] = ti[1] = vv0 = vv1 = 0;
}
+LCRYPTO_ALIAS(DES_ofb_encrypt);
-/* $OpenBSD: pcbc_enc.c,v 1.9 2023/07/08 07:34:34 jsing Exp $ */
+/* $OpenBSD: pcbc_enc.c,v 1.10 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
tin[0] = tin[1] = 0;
sin0 = sin1 = xor0 = xor1 = tout0 = tout1 = 0;
}
+LCRYPTO_ALIAS(DES_pcbc_encrypt);
-/* $OpenBSD: qud_cksm.c,v 1.10 2023/07/08 07:34:34 jsing Exp $ */
+/* $OpenBSD: qud_cksm.c,v 1.11 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
}
return (z0);
}
+LCRYPTO_ALIAS(DES_quad_cksum);
-/* $OpenBSD: set_key.c,v 1.26 2023/12/20 06:30:04 tb Exp $ */
+/* $OpenBSD: set_key.c,v 1.27 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
for (i = 0; i < DES_KEY_SZ; i++)
(*key)[i] = odd_parity[(*key)[i]];
}
+LCRYPTO_ALIAS(DES_set_odd_parity);
int
DES_check_key_parity(const_DES_cblock *key)
}
return (1);
}
+LCRYPTO_ALIAS(DES_check_key_parity);
/* Weak and semi weak keys as taken from
* %A D.W. Davies
return 1;
return 0;
}
+LCRYPTO_ALIAS(DES_is_weak_key);
/* NOW DEFINED IN des_local.h
* See ecb_encrypt.c for a pseudo description of these macros.
return 0;
}
}
+LCRYPTO_ALIAS(DES_set_key);
/* return 0 if key parity is odd (correct),
* return -1 if key parity error,
DES_set_key_unchecked(key, schedule);
return 0;
}
+LCRYPTO_ALIAS(DES_set_key_checked);
void
DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule)
*(k++) = ROTATE(t2, 26) & 0xffffffffL;
}
}
+LCRYPTO_ALIAS(DES_set_key_unchecked);
int
DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule)
{
return (DES_set_key(key, schedule));
}
+LCRYPTO_ALIAS(DES_key_sched);
int
DES_random_key(DES_cblock *ret)
} while (DES_is_weak_key(ret));
return (1);
}
+LCRYPTO_ALIAS(DES_random_key);
-/* $OpenBSD: str2key.c,v 1.13 2023/07/08 07:34:34 jsing Exp $ */
+/* $OpenBSD: str2key.c,v 1.14 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
explicit_bzero(&ks, sizeof(ks));
DES_set_odd_parity(key);
}
+LCRYPTO_ALIAS(DES_string_to_key);
void
DES_string_to_2keys(const char *str, DES_cblock *key1, DES_cblock *key2)
DES_set_odd_parity(key1);
DES_set_odd_parity(key2);
}
+LCRYPTO_ALIAS(DES_string_to_2keys);
-/* $OpenBSD: xcbc_enc.c,v 1.12 2023/07/08 07:34:34 jsing Exp $ */
+/* $OpenBSD: xcbc_enc.c,v 1.13 2024/03/29 01:47:29 joshua Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
inW0 = inW1 = outW0 = outW1 = 0;
tin[0] = tin[1] = 0;
}
+LCRYPTO_ALIAS(DES_xcbc_encrypt);
--- /dev/null
+/* $OpenBSD: des.h,v 1.1 2024/03/29 01:47:29 joshua Exp $ */
+/*
+ * Copyright (c) 2024 Joshua Sing <joshua@joshuasing.dev>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _LIBCRYPTO_DES_H
+#define _LIBCRYPTO_DES_H
+
+#ifndef _MSC_VER
+#include_next <openssl/des.h>
+#else
+#include "../include/openssl/des.h"
+#endif
+#include "crypto_namespace.h"
+
+LCRYPTO_USED(DES_ecb3_encrypt);
+LCRYPTO_USED(DES_cbc_cksum);
+LCRYPTO_USED(DES_cbc_encrypt);
+LCRYPTO_USED(DES_ncbc_encrypt);
+LCRYPTO_USED(DES_xcbc_encrypt);
+LCRYPTO_USED(DES_cfb_encrypt);
+LCRYPTO_USED(DES_ecb_encrypt);
+LCRYPTO_USED(DES_encrypt1);
+LCRYPTO_USED(DES_encrypt2);
+LCRYPTO_USED(DES_encrypt3);
+LCRYPTO_USED(DES_decrypt3);
+LCRYPTO_USED(DES_ede3_cbc_encrypt);
+LCRYPTO_USED(DES_ede3_cbcm_encrypt);
+LCRYPTO_USED(DES_ede3_cfb64_encrypt);
+LCRYPTO_USED(DES_ede3_cfb_encrypt);
+LCRYPTO_USED(DES_ede3_ofb64_encrypt);
+LCRYPTO_USED(DES_enc_read);
+LCRYPTO_USED(DES_enc_write);
+LCRYPTO_USED(DES_fcrypt);
+LCRYPTO_USED(DES_crypt);
+LCRYPTO_USED(DES_ofb_encrypt);
+LCRYPTO_USED(DES_pcbc_encrypt);
+LCRYPTO_USED(DES_quad_cksum);
+LCRYPTO_USED(DES_random_key);
+LCRYPTO_USED(DES_set_odd_parity);
+LCRYPTO_USED(DES_check_key_parity);
+LCRYPTO_USED(DES_is_weak_key);
+LCRYPTO_USED(DES_set_key);
+LCRYPTO_USED(DES_key_sched);
+LCRYPTO_USED(DES_set_key_checked);
+LCRYPTO_USED(DES_set_key_unchecked);
+LCRYPTO_USED(DES_string_to_key);
+LCRYPTO_USED(DES_string_to_2keys);
+LCRYPTO_USED(DES_cfb64_encrypt);
+LCRYPTO_USED(DES_ofb64_encrypt);
+
+#endif /* _LIBCRYPTO_DES_H */