Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ OR BSD-2-Clause */
0002 /*
0003  * Copyright (c) 2013 Alexey Degtyarev <alexey@renatasystems.org>
0004  * Copyright (c) 2018 Vitaly Chikunov <vt@altlinux.org>
0005  *
0006  * This program is free software; you can redistribute it and/or modify it
0007  * under the terms of the GNU General Public License as published by the Free
0008  * Software Foundation; either version 2 of the License, or (at your option)
0009  * any later version.
0010  */
0011 
0012 #ifndef _CRYPTO_STREEBOG_H_
0013 #define _CRYPTO_STREEBOG_H_
0014 
0015 #include <linux/types.h>
0016 
0017 #define STREEBOG256_DIGEST_SIZE 32
0018 #define STREEBOG512_DIGEST_SIZE 64
0019 #define STREEBOG_BLOCK_SIZE 64
0020 
0021 struct streebog_uint512 {
0022     __le64 qword[8];
0023 };
0024 
0025 struct streebog_state {
0026     union {
0027         u8 buffer[STREEBOG_BLOCK_SIZE];
0028         struct streebog_uint512 m;
0029     };
0030     struct streebog_uint512 hash;
0031     struct streebog_uint512 h;
0032     struct streebog_uint512 N;
0033     struct streebog_uint512 Sigma;
0034     size_t fillsize;
0035 };
0036 
0037 #endif /* !_CRYPTO_STREEBOG_H_ */