_libre_GOST_KEY_set_public_key
_libre_GOST_KEY_get_size
_libre_ERR_load_GOST_strings
+_libre_CRYPTO_cbc128_encrypt
+_libre_CRYPTO_cbc128_decrypt
+_libre_CRYPTO_ctr128_encrypt
+_libre_CRYPTO_ctr128_encrypt_ctr32
+_libre_CRYPTO_ofb128_encrypt
+_libre_CRYPTO_cfb128_encrypt
+_libre_CRYPTO_cfb128_8_encrypt
+_libre_CRYPTO_cfb128_1_encrypt
+_libre_CRYPTO_gcm128_new
+_libre_CRYPTO_gcm128_init
+_libre_CRYPTO_gcm128_setiv
+_libre_CRYPTO_gcm128_aad
+_libre_CRYPTO_gcm128_encrypt
+_libre_CRYPTO_gcm128_decrypt
+_libre_CRYPTO_gcm128_encrypt_ctr32
+_libre_CRYPTO_gcm128_decrypt_ctr32
+_libre_CRYPTO_gcm128_finish
+_libre_CRYPTO_gcm128_tag
+_libre_CRYPTO_gcm128_release
+_libre_CRYPTO_ccm128_init
+_libre_CRYPTO_ccm128_setiv
+_libre_CRYPTO_ccm128_aad
+_libre_CRYPTO_ccm128_encrypt
+_libre_CRYPTO_ccm128_decrypt
+_libre_CRYPTO_ccm128_encrypt_ccm64
+_libre_CRYPTO_ccm128_decrypt_ccm64
+_libre_CRYPTO_ccm128_tag
+_libre_CRYPTO_xts128_encrypt
--- /dev/null
+/* $OpenBSD: modes.h,v 1.1 2023/07/08 14:56:54 beck Exp $ */
+/*
+ * Copyright (c) 2023 Bob Beck <beck@openbsd.org>
+ *
+ * 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_MODES_H
+#define _LIBCRYPTO_MODES_H
+
+#ifndef _MSC_VER
+#include_next <openssl/modes.h>
+#else
+#include "../include/openssl/modes.h"
+#endif
+#include "crypto_namespace.h"
+
+LCRYPTO_USED(CRYPTO_cbc128_encrypt);
+LCRYPTO_USED(CRYPTO_cbc128_decrypt);
+LCRYPTO_USED(CRYPTO_ctr128_encrypt);
+LCRYPTO_USED(CRYPTO_ctr128_encrypt_ctr32);
+LCRYPTO_USED(CRYPTO_ofb128_encrypt);
+LCRYPTO_USED(CRYPTO_cfb128_encrypt);
+LCRYPTO_USED(CRYPTO_cfb128_8_encrypt);
+LCRYPTO_USED(CRYPTO_cfb128_1_encrypt);
+LCRYPTO_USED(CRYPTO_gcm128_new);
+LCRYPTO_USED(CRYPTO_gcm128_init);
+LCRYPTO_USED(CRYPTO_gcm128_setiv);
+LCRYPTO_USED(CRYPTO_gcm128_aad);
+LCRYPTO_USED(CRYPTO_gcm128_encrypt);
+LCRYPTO_USED(CRYPTO_gcm128_decrypt);
+LCRYPTO_USED(CRYPTO_gcm128_encrypt_ctr32);
+LCRYPTO_USED(CRYPTO_gcm128_decrypt_ctr32);
+LCRYPTO_USED(CRYPTO_gcm128_finish);
+LCRYPTO_USED(CRYPTO_gcm128_tag);
+LCRYPTO_USED(CRYPTO_gcm128_release);
+LCRYPTO_USED(CRYPTO_ccm128_init);
+LCRYPTO_USED(CRYPTO_ccm128_setiv);
+LCRYPTO_USED(CRYPTO_ccm128_aad);
+LCRYPTO_USED(CRYPTO_ccm128_encrypt);
+LCRYPTO_USED(CRYPTO_ccm128_decrypt);
+LCRYPTO_USED(CRYPTO_ccm128_encrypt_ccm64);
+LCRYPTO_USED(CRYPTO_ccm128_decrypt_ccm64);
+LCRYPTO_USED(CRYPTO_ccm128_tag);
+LCRYPTO_USED(CRYPTO_xts128_encrypt);
+
+#endif /* _LIBCRYPTO_MODES_H */
-/* $OpenBSD: cbc128.c,v 1.7 2023/07/08 14:55:36 beck Exp $ */
+/* $OpenBSD: cbc128.c,v 1.8 2023/07/08 14:56:54 beck Exp $ */
/* ====================================================================
* Copyright (c) 2008 The OpenSSL Project. All rights reserved.
*
}
memmove(ivec, iv, 16);
}
+LCRYPTO_ALIAS(CRYPTO_cbc128_encrypt);
void
CRYPTO_cbc128_decrypt(const unsigned char *in, unsigned char *out,
out += 16;
}
}
+LCRYPTO_ALIAS(CRYPTO_cbc128_decrypt);
-/* $OpenBSD: ccm128.c,v 1.7 2023/07/08 14:55:36 beck Exp $ */
+/* $OpenBSD: ccm128.c,v 1.8 2023/07/08 14:56:54 beck Exp $ */
/* ====================================================================
* Copyright (c) 2011 The OpenSSL Project. All rights reserved.
*
ctx->block = block;
ctx->key = key;
}
+LCRYPTO_ALIAS(CRYPTO_ccm128_init);
/* !!! Following interfaces are to be called *once* per packet !!! */
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_ccm128_setiv);
/* Then you pass additional authentication data, this is optional */
void
i = 0;
} while (alen);
}
+LCRYPTO_ALIAS(CRYPTO_ccm128_aad);
/* Finally you encrypt or decrypt the message */
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_ccm128_encrypt);
int
CRYPTO_ccm128_decrypt(CCM128_CONTEXT *ctx,
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_ccm128_decrypt);
static void
ctr64_add(unsigned char *counter, size_t inc)
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_ccm128_encrypt_ccm64);
int
CRYPTO_ccm128_decrypt_ccm64(CCM128_CONTEXT *ctx,
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_ccm128_decrypt_ccm64);
size_t
CRYPTO_ccm128_tag(CCM128_CONTEXT *ctx, unsigned char *tag, size_t len)
memcpy(tag, ctx->cmac.c, M);
return M;
}
+LCRYPTO_ALIAS(CRYPTO_ccm128_tag);
-/* $OpenBSD: cfb128.c,v 1.6 2023/07/08 14:55:36 beck Exp $ */
+/* $OpenBSD: cfb128.c,v 1.7 2023/07/08 14:56:54 beck Exp $ */
/* ====================================================================
* Copyright (c) 2008 The OpenSSL Project. All rights reserved.
*
*num = n;
}
}
+LCRYPTO_ALIAS(CRYPTO_cfb128_encrypt);
/* This expects a single block of size nbits for both in and out. Note that
it corrupts any extra bits in the last byte of out */
((d[0] & 0x80) >> (unsigned int)(n % 8));
}
}
+LCRYPTO_ALIAS(CRYPTO_cfb128_1_encrypt);
void
CRYPTO_cfb128_8_encrypt(const unsigned char *in, unsigned char *out,
for (n = 0; n < length; ++n)
cfbr_encrypt_block(&in[n], &out[n], 8, key, ivec, enc, block);
}
+LCRYPTO_ALIAS(CRYPTO_cfb128_8_encrypt);
-/* $OpenBSD: ctr128.c,v 1.10 2023/07/08 14:55:36 beck Exp $ */
+/* $OpenBSD: ctr128.c,v 1.11 2023/07/08 14:56:54 beck Exp $ */
/* ====================================================================
* Copyright (c) 2008 The OpenSSL Project. All rights reserved.
*
*num = n;
}
+LCRYPTO_ALIAS(CRYPTO_ctr128_encrypt);
/* increment upper 96 bits of 128-bit counter by 1 */
static void
*num = n;
}
+LCRYPTO_ALIAS(CRYPTO_ctr128_encrypt_ctr32);
-/* $OpenBSD: gcm128.c,v 1.24 2023/07/08 14:55:36 beck Exp $ */
+/* $OpenBSD: gcm128.c,v 1.25 2023/07/08 14:56:54 beck Exp $ */
/* ====================================================================
* Copyright (c) 2010 The OpenSSL Project. All rights reserved.
*
# endif
#endif
}
+LCRYPTO_ALIAS(CRYPTO_gcm128_init);
void
CRYPTO_gcm128_setiv(GCM128_CONTEXT *ctx, const unsigned char *iv, size_t len)
ctx->Yi.d[3] = ctr;
#endif
}
+LCRYPTO_ALIAS(CRYPTO_gcm128_setiv);
int
CRYPTO_gcm128_aad(GCM128_CONTEXT *ctx, const unsigned char *aad, size_t len)
ctx->ares = n;
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_gcm128_aad);
int
CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx,
ctx->mres = n;
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_gcm128_encrypt);
int
CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx,
ctx->mres = n;
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_gcm128_decrypt);
int
CRYPTO_gcm128_encrypt_ctr32(GCM128_CONTEXT *ctx,
ctx->mres = n;
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_gcm128_encrypt_ctr32);
int
CRYPTO_gcm128_decrypt_ctr32(GCM128_CONTEXT *ctx,
ctx->mres = n;
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_gcm128_decrypt_ctr32);
int
CRYPTO_gcm128_finish(GCM128_CONTEXT *ctx, const unsigned char *tag,
else
return -1;
}
+LCRYPTO_ALIAS(CRYPTO_gcm128_finish);
void
CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len)
memcpy(tag, ctx->Xi.c,
len <= sizeof(ctx->Xi.c) ? len : sizeof(ctx->Xi.c));
}
+LCRYPTO_ALIAS(CRYPTO_gcm128_tag);
GCM128_CONTEXT *
CRYPTO_gcm128_new(void *key, block128_f block)
return ret;
}
+LCRYPTO_ALIAS(CRYPTO_gcm128_new);
void
CRYPTO_gcm128_release(GCM128_CONTEXT *ctx)
{
freezero(ctx, sizeof(*ctx));
}
+LCRYPTO_ALIAS(CRYPTO_gcm128_release);
-/* $OpenBSD: ofb128.c,v 1.6 2023/07/08 14:55:36 beck Exp $ */
+/* $OpenBSD: ofb128.c,v 1.7 2023/07/08 14:56:54 beck Exp $ */
/* ====================================================================
* Copyright (c) 2008 The OpenSSL Project. All rights reserved.
*
*num = n;
}
+LCRYPTO_ALIAS(CRYPTO_ofb128_encrypt);
-/* $OpenBSD: xts128.c,v 1.11 2023/07/08 14:55:36 beck Exp $ */
+/* $OpenBSD: xts128.c,v 1.12 2023/07/08 14:56:54 beck Exp $ */
/* ====================================================================
* Copyright (c) 2011 The OpenSSL Project. All rights reserved.
*
return 0;
}
+LCRYPTO_ALIAS(CRYPTO_xts128_encrypt);