162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ OR BSD-2-Clause */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (c) 2013 Alexey Degtyarev <alexey@renatasystems.org> 462306a36Sopenharmony_ci * Copyright (c) 2018 Vitaly Chikunov <vt@altlinux.org> 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * This program is free software; you can redistribute it and/or modify it 762306a36Sopenharmony_ci * under the terms of the GNU General Public License as published by the Free 862306a36Sopenharmony_ci * Software Foundation; either version 2 of the License, or (at your option) 962306a36Sopenharmony_ci * any later version. 1062306a36Sopenharmony_ci */ 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#ifndef _CRYPTO_STREEBOG_H_ 1362306a36Sopenharmony_ci#define _CRYPTO_STREEBOG_H_ 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci#include <linux/types.h> 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci#define STREEBOG256_DIGEST_SIZE 32 1862306a36Sopenharmony_ci#define STREEBOG512_DIGEST_SIZE 64 1962306a36Sopenharmony_ci#define STREEBOG_BLOCK_SIZE 64 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_cistruct streebog_uint512 { 2262306a36Sopenharmony_ci __le64 qword[8]; 2362306a36Sopenharmony_ci}; 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_cistruct streebog_state { 2662306a36Sopenharmony_ci union { 2762306a36Sopenharmony_ci u8 buffer[STREEBOG_BLOCK_SIZE]; 2862306a36Sopenharmony_ci struct streebog_uint512 m; 2962306a36Sopenharmony_ci }; 3062306a36Sopenharmony_ci struct streebog_uint512 hash; 3162306a36Sopenharmony_ci struct streebog_uint512 h; 3262306a36Sopenharmony_ci struct streebog_uint512 N; 3362306a36Sopenharmony_ci struct streebog_uint512 Sigma; 3462306a36Sopenharmony_ci size_t fillsize; 3562306a36Sopenharmony_ci}; 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci#endif /* !_CRYPTO_STREEBOG_H_ */ 38