| 1 | /* |
| 2 | * Copyright (c) 2013, Alexey Degtyarev <[email protected]>. |
| 3 | * All rights reserved. |
| 4 | * |
| 5 | * $Id$ |
| 6 | */ |
| 7 | |
| 8 | #ifndef _CRYPT_ALG_GOST3411_2012_CORE_H |
| 9 | #define _CRYPT_ALG_GOST3411_2012_CORE_Hcxx . . $ `lib/alg-gost3411-2012-core.h:9:9`! |
| 10 | |
| 11 | #if defined __GOST3411_HAS_SSE41__ |
| 12 | #include "alg-gost3411-2012-sse41.h" |
| 13 | #elif defined __GOST3411_HAS_SSE2__ |
| 14 | #include "alg-gost3411-2012-sse2.h" |
| 15 | #elif defined __GOST3411_HAS_MMX__ |
| 16 | #include "alg-gost3411-2012-mmx.h" |
| 17 | #else |
| 18 | #include "alg-gost3411-2012-ref.h"cxx . . $ `<file>/lib/alg-gost3411-2012-ref.h`/ |
| 19 | #endif |
| 20 | |
| 21 | typedef union uint512_ucxx . . $ uint512_u# |
| 22 | { |
| 23 | unsigned long long QWORDcxx . . $ uint512_u#QWORD.[8]; |
| 24 | } uint512_ucxx . . $ uint512_u#; |
| 25 | |
| 26 | #include "alg-gost3411-2012-const.h"cxx . . $ `<file>/lib/alg-gost3411-2012-const.h`/ |
| 27 | #include "alg-gost3411-2012-precalc.h"cxx . . $ `<file>/lib/alg-gost3411-2012-precalc.h`/ |
| 28 | |
| 29 | typedef struct GOST34112012Contextcxx . . $ GOST34112012Context# |
| 30 | { |
| 31 | unsigned char buffercxx . . $ GOST34112012Context#buffer.[64]; |
| 32 | uint512_ucxx . . $ uint512_u# hashcxx . . $ GOST34112012Context#hash.; |
| 33 | uint512_ucxx . . $ uint512_u# hcxx . . $ GOST34112012Context#h.; |
| 34 | uint512_ucxx . . $ uint512_u# Ncxx . . $ GOST34112012Context#N.; |
| 35 | uint512_ucxx . . $ uint512_u# Sigmacxx . . $ GOST34112012Context#Sigma.; |
| 36 | size_t bufsizecxx . . $ GOST34112012Context#bufsize.; |
| 37 | unsigned int digest_sizecxx . . $ GOST34112012Context#digest_size.; |
| 38 | } GOST34112012Contextcxx . . $ GOST34112012Context#; |
| 39 | |
| 40 | extern void GOST34112012Initcxx . . $ `lib/crypt-port.h:415:9`!(GOST34112012Contextcxx . . $ GOST34112012Context# *CTX, |
| 41 | const unsigned int digest_size); |
| 42 | |
| 43 | extern void GOST34112012Updatecxx . . $ `lib/crypt-port.h:416:9`!(GOST34112012Contextcxx . . $ GOST34112012Context# *CTX, |
| 44 | const unsigned char *data, size_t len); |
| 45 | |
| 46 | extern void GOST34112012Finalcxx . . $ `lib/crypt-port.h:417:9`!(GOST34112012Contextcxx . . $ GOST34112012Context# *CTX, |
| 47 | unsigned char *digest); |
| 48 | |
| 49 | extern void GOST34112012Cleanupcxx . . $ `lib/crypt-port.h:418:9`!(GOST34112012Contextcxx . . $ GOST34112012Context# *CTX); |
| 50 | |
| 51 | #endif /* alg-gost3411-2012-core.h */ |