| 1 | /* Copyright (C) 2018 [email protected] |
| 2 | * Copyright (C) 2018 Björn Esser <[email protected]> |
| 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted. |
| 6 | * |
| 7 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND |
| 8 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 9 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 10 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
| 11 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 12 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 13 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 14 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 15 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 16 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 17 | * SUCH DAMAGE. |
| 18 | */ |
| 19 | |
| 20 | #ifndef _CRYPT_ALG_GOST3411_2012_HMAC_H |
| 21 | #define _CRYPT_ALG_GOST3411_2012_HMAC_Hcxx . . $ `lib/alg-gost3411-2012-hmac.h:21:9`! |
| 22 | |
| 23 | #include "alg-gost3411-2012-core.h"cxx . . $ `<file>/lib/alg-gost3411-2012-core.h`/ |
| 24 | |
| 25 | /* Constants for HMAC_GOSTR3411_2012_256 */ |
| 26 | #define GOSTR3411_2012_Lcxx . . $ `lib/alg-gost3411-2012-hmac.h:26:9`! 32 /* hash output len */ |
| 27 | #define GOSTR3411_2012_Bcxx . . $ `lib/alg-gost3411-2012-hmac.h:27:9`! 64 /* hash input len (512) */ |
| 28 | #define GOSTR3411_2012_BITScxx . . $ `lib/alg-gost3411-2012-hmac.h:28:9`! GOSTR3411_2012_Lcxx . . $ `lib/alg-gost3411-2012-hmac.h:26:9`! * 8 /* 256 */ |
| 29 | |
| 30 | typedef structcxx . . $ $anonymous_type_28221329a5e92a0c_0# |
| 31 | { |
| 32 | GOST34112012Contextcxx . . $ GOST34112012Context# ctxcxx . . $ $anonymous_type_28221329a5e92a0c_0#ctx.; |
| 33 | unsigned char padcxx . . $ $anonymous_type_28221329a5e92a0c_0#pad.[GOSTR3411_2012_Bcxx . . $ `lib/alg-gost3411-2012-hmac.h:27:9`!]; /* ipad and opad */ |
| 34 | unsigned char kstarcxx . . $ $anonymous_type_28221329a5e92a0c_0#kstar.[GOSTR3411_2012_Bcxx . . $ `lib/alg-gost3411-2012-hmac.h:27:9`!]; /* derived key */ |
| 35 | unsigned char digestcxx . . $ $anonymous_type_28221329a5e92a0c_0#digest.[GOSTR3411_2012_Lcxx . . $ `lib/alg-gost3411-2012-hmac.h:26:9`!]; |
| 36 | } gost_hmac_256_tcxx . . $ gost_hmac_256_t#; |
| 37 | |
| 38 | extern void |
| 39 | gost_hash256cxx . . $ `lib/crypt-port.h:419:9`! (const uint8_tcxx . . $ uint8_t# *t, size_t n, uint8_tcxx . . $ uint8_t# *out32, |
| 40 | GOST34112012Contextcxx . . $ GOST34112012Context# *ctx); |
| 41 | |
| 42 | extern void |
| 43 | gost_hmac256cxx . . $ `lib/crypt-port.h:420:9`! (const uint8_tcxx . . $ uint8_t# *k, size_t n, const uint8_tcxx . . $ uint8_t# *t, size_t len, |
| 44 | uint8_tcxx . . $ uint8_t# *out32, gost_hmac_256_tcxx . . $ gost_hmac_256_t# *gostbuf); |
| 45 | |
| 46 | #endif /* alg-gost3411-2012-hmac.h */ |