OpenCores
URL https://opencores.org/ocsvn/bluespec_md6/bluespec_md6/trunk

Subversion Repositories bluespec_md6

[/] [bluespec_md6/] [trunk/] [C_implementation/] [md6_nist.h] - Blame information for rev 7

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 kfleming
/* File:    md6_nist.h
2
** Author:  Ronald L. Rivest
3
** Address: Room 32G-692 Stata Center
4
**          32 Vassar Street
5
**          Cambridge, MA 02139
6
** Email:   rivest@mit.edu
7
** Date:    9/25/2008
8
**
9
** (The following license is known as "The MIT License")
10
**
11
** Copyright (c) 2008 Ronald L. Rivest
12
**
13
** Permission is hereby granted, free of charge, to any person obtaining a copy
14
** of this software and associated documentation files (the "Software"), to deal
15
** in the Software without restriction, including without limitation the rights
16
** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
** copies of the Software, and to permit persons to whom the Software is
18
** furnished to do so, subject to the following conditions:
19
**
20
** The above copyright notice and this permission notice shall be included in
21
** all copies or substantial portions of the Software.
22
**
23
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29
** THE SOFTWARE.
30
**
31
** (end of license)
32
**
33
** This is part of the MD6 hash function package.
34
** The files defining the MD6 hash function are:
35
**    md6.h
36
**    md6_compress.c
37
**    md6_mode.c
38
** The files defining the interface between MD6 and the NIST SHA-3
39
** API are:
40
**    md6_nist.h
41
**    md6_nist.c
42
** The NIST SHA-3 API is defined in:
43
**    http://www.csrc.nist.gov/groups/ST/hash/documents/SHA3-C-API.pdf
44
**
45
** See  http://groups.csail.mit.edu/cis/md6  for more information.
46
*/
47
 
48
/* Multiple inclusion protection (through end of file)
49
*/
50
#ifndef MD6_NIST_H_INCLUDED
51
#define MD6_NIST_H_INCLUDED
52
 
53
typedef unsigned char BitSequence;
54
 
55
typedef unsigned long long DataLength;
56
 
57
typedef enum { SUCCESS = 0, FAIL = 1, BAD_HASHLEN = 2 } HashReturn;
58
 
59
typedef md6_state hashState;
60
 
61
HashReturn Init( hashState *state,
62
                 int hashbitlen
63
                 );
64
 
65
HashReturn Update( hashState *state,
66
                   const BitSequence *data,
67
                   DataLength databitlen
68
                   );
69
 
70
HashReturn Final( hashState *state,
71
                  BitSequence *hashval
72
                  );
73
 
74
HashReturn Hash( int hashbitlen,
75
                 const BitSequence *data,
76
                 DataLength databitlen,
77
                 BitSequence *hashval
78
                 );
79
 
80
/* end of multiple inclusion protection
81
*/
82
#endif
83
 
84
/*
85
** end of nist.h
86
*/

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.