linux/crypto/sm3.c

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * SM3 secure hash, as specified by OSCCA GM/T 0004-2012 SM3 and described
 * at https://datatracker.ietf.org/doc/html/draft-sca-cfrg-sm3-02
 *
 * Copyright (C) 2017 ARM Limited or its affiliates.
 * Copyright (C) 2017 Gilad Ben-Yossef <[email protected]>
 * Copyright (C) 2021 Tianjia Zhang <[email protected]>
 */

#include <linux/module.h>
#include <asm/unaligned.h>
#include <crypto/sm3.h>

static const u32 ____cacheline_aligned K[64] =;

/*
 * Transform the message X which consists of 16 32-bit-words. See
 * GM/T 004-2012 for details.
 */
#define R

#define R1
#define R2

#define FF1(x, y, z)
#define FF2(x, y, z)

#define GG1(x, y, z)
#define GG2(x, y, z)

/* Message expansion */
#define P0(x)
#define P1(x)
#define I
#define W1
#define W2

static void sm3_transform(struct sm3_state *sctx, u8 const *data, u32 W[16])
{}
#undef R
#undef R1
#undef R2
#undef I
#undef W1
#undef W2

static inline void sm3_block(struct sm3_state *sctx,
		u8 const *data, int blocks, u32 W[16])
{}

void sm3_update(struct sm3_state *sctx, const u8 *data, unsigned int len)
{}
EXPORT_SYMBOL_GPL();

void sm3_final(struct sm3_state *sctx, u8 *out)
{}
EXPORT_SYMBOL_GPL();

MODULE_DESCRIPTION();
MODULE_LICENSE();