YAARX: Yet Another ARX Toolkit  0.1
 All Data Structures Files Functions Variables Macros Pages
threefish.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2013 Luxembourg University,
3  * Laboratory of Algorithmics, Cryptology and Security (LACS).
4  *
5  * This file is part of the YAARX toolkit. YAARX stands for
6  * Yet Another ARX toolkit for analysis of ARX cryptographic algorithms.
7  *
8  * YAARX is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * YAARX is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with YAARX. If not, see <http://www.gnu.org/licenses/>.
20  */
27 #ifndef THREEFISH_H
28 #define THREEFISH_H
29 
30 #define THREEFISH_MAX_NROUNDS 20
31 
32 #ifndef XDP_ADD_DIFF_SET_H
33 #include "xdp-add-diff-set.hh"
34 #endif
35 
36 extern uint32_t g_threefish32_rot_const[12][2];
37 
38 void threefish32_print_dset(diff_set_t DX[4]);
39 
40 void threefish32_mix(uint32_t X[4], uint32_t rot_const_0, uint32_t rot_const_1);
41 
42 void threefish32(uint32_t nrounds, uint32_t rot_const[THREEFISH_MAX_NROUNDS][2], uint32_t X[4], uint32_t Y[4]);
43 
44 void threefish32_print_prob(double P[4]);
45 
46 void threefish32_print_dset_trail(uint32_t nrounds, diff_set_t DT[THREEFISH_MAX_NROUNDS][4], double P[THREEFISH_MAX_NROUNDS][4]);
47 
48 #endif // #ifndef THREEFISH_H
void threefish32(uint32_t nrounds, uint32_t rot_const[THREEFISH_MAX_NROUNDS][2], uint32_t X[4], uint32_t Y[4])
Definition: threefish.cc:74
uint32_t g_threefish32_rot_const[12][2]
Definition: threefish.cc:39
Header file for xdp-add-diff-set.cc:
Definition: xdp-add-diff-set.hh:68
void threefish32_mix(uint32_t X[4], uint32_t rot_const_0, uint32_t rot_const_1)
Definition: threefish.cc:57