18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ OR BSD-2-Clause */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2013 Alexey Degtyarev <alexey@renatasystems.org> 48c2ecf20Sopenharmony_ci * Copyright (c) 2018 Vitaly Chikunov <vt@altlinux.org> 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify it 78c2ecf20Sopenharmony_ci * under the terms of the GNU General Public License as published by the Free 88c2ecf20Sopenharmony_ci * Software Foundation; either version 2 of the License, or (at your option) 98c2ecf20Sopenharmony_ci * any later version. 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#ifndef _CRYPTO_STREEBOG_H_ 138c2ecf20Sopenharmony_ci#define _CRYPTO_STREEBOG_H_ 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#include <linux/types.h> 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define STREEBOG256_DIGEST_SIZE 32 188c2ecf20Sopenharmony_ci#define STREEBOG512_DIGEST_SIZE 64 198c2ecf20Sopenharmony_ci#define STREEBOG_BLOCK_SIZE 64 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_cistruct streebog_uint512 { 228c2ecf20Sopenharmony_ci __le64 qword[8]; 238c2ecf20Sopenharmony_ci}; 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_cistruct streebog_state { 268c2ecf20Sopenharmony_ci union { 278c2ecf20Sopenharmony_ci u8 buffer[STREEBOG_BLOCK_SIZE]; 288c2ecf20Sopenharmony_ci struct streebog_uint512 m; 298c2ecf20Sopenharmony_ci }; 308c2ecf20Sopenharmony_ci struct streebog_uint512 hash; 318c2ecf20Sopenharmony_ci struct streebog_uint512 h; 328c2ecf20Sopenharmony_ci struct streebog_uint512 N; 338c2ecf20Sopenharmony_ci struct streebog_uint512 Sigma; 348c2ecf20Sopenharmony_ci size_t fillsize; 358c2ecf20Sopenharmony_ci}; 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#endif /* !_CRYPTO_STREEBOG_H_ */ 38