Monday, 25 September 2017

DiceLockSecurity Knowledge

DicelockSecurity (version 9.X)

Apple Mac OS X

XDiceLock 8.0.0.1
Previous Versions
arrow XDiceLock 8.0.0.1 arrow baseRipemd160X.cpp
baseRipemd160X.cpp (base Ripemd 160 & 320 hash digest algorithm C++ source code file) Print E-mail
Get C++ DiceLock cipher architecture source code packages of DiceLock for Microsoft Visual Studio 2013 and DiceLock-x for Linux with Test Driver Programs and Response Test Vector files to verify that both them work as expected.
DiceLock for Windows and Linux
DiceLock Security governing software licenses are Free/Libre Source Code License and Educational and Research License

DiceLock is protected by US patent 7508945 and European Patent 1182777 where applicable.

DiceLock and DiceLock logo are trademarks or registered trademarks in the EC, USA and others.

License information can be obtained at our corporate web site




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
 
//
//  baseRipemd160X.cpp
//  XDiceLock
//
//  Created by DiceLock on 1/4/12.
//  Copyright (c) 2009-2012 DiceLock Security, LLC. All rights reserved.
//
 
//
// Creator:    http://www.dicelocksecurity.com
// Version:    vers.8.0.0.1
//
// Copyright (c) 2009-2012 DiceLock Security, LLC. All rights reserved.
//
//                               DISCLAIMER
//
// THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// 
// DICELOCK IS A REGISTERED TRADEMARK OR TRADEMARK OF THE OWNERS.
// 
 
#include "baseRipemd160X.h"
 
 
namespace DiceLockSecurity {
  
    namespace Hash {
        
        // Constants for 160 and 320 RIPEMD algorithms
        const unsigned int BaseRipemd160X::constant4 = 0xA953FD4EUL;
        const unsigned int BaseRipemd160X::constant8 = 0x7A6D76E9UL;
        
        // Amounts of rotate left
        const unsigned short int BaseRipemd160X::rl_64_79[16] = {9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6};
        // Amounts of prime rotate left 
        const unsigned short int BaseRipemd160X::prime_rl_64_79[16] = {8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11};
        
        // Initial states of Ripemd 160 and 320 algorithms
        const unsigned int BaseRipemd160X::inistate4 = 0xC3D2E1F0;
        
        // Constructor
        BaseRipemd160X::BaseRipemd160X() {
        }
        
        // Destructor
        BaseRipemd160X::~BaseRipemd160X() {
        }
        
        //  Initializes state of Ripmed 160 and 320 algorithm
        void BaseRipemd160X::Initialize() {
            
            this->BaseRipemd::Initialize();
            this->messageDigest->SetULPosition(4, inistate4);
        }
        
        // First transform set
        void BaseRipemd160X::Transform_F0(unsigned int* a1, unsigned int* b1, unsigned int* c1, unsigned int* d1, unsigned int* e1, unsigned int* X) {
            
            RIPEMD_Transform160X(RIPEMD_F, a1, b1, c1, d1, e1, X[ 0], this->rl_0_15[ 0], this->constant0);
            RIPEMD_Transform160X(RIPEMD_F, e1, a1, b1, c1, d1, X[ 1], this->rl_0_15[ 1], this->constant0);
            RIPEMD_Transform160X(RIPEMD_F, d1, e1, a1, b1, c1, X[ 2], this->rl_0_15[ 2], this->constant0);
            RIPEMD_Transform160X(RIPEMD_F, c1, d1, e1, a1, b1, X[ 3], this->rl_0_15[ 3], this->constant0);
            RIPEMD_Transform160X(RIPEMD_F, b1, c1, d1, e1, a1, X[ 4], this->rl_0_15[ 4], this->constant0);
            RIPEMD_Transform160X(RIPEMD_F, a1, b1, c1, d1, e1, X[ 5], this->rl_0_15[ 5], this->constant0);
            RIPEMD_Transform160X(RIPEMD_F, e1, a1, b1, c1, d1, X[ 6], this->rl_0_15[ 6], this->constant0);
            RIPEMD_Transform160X(RIPEMD_F, d1, e1, a1, b1, c1, X[ 7], this->rl_0_15[ 7], this->constant0);
            RIPEMD_Transform160X(RIPEMD_F, c1, d1, e1, a1, b1, X[ 8], this->rl_0_15[ 8], this->constant0);
            RIPEMD_Transform160X(RIPEMD_F, b1, c1, d1, e1, a1, X[ 9], this->rl_0_15[ 9], this->constant0);
            RIPEMD_Transform160X(RIPEMD_F, a1, b1, c1, d1, e1, X[10], this->rl_0_15[10], this->constant0);
            RIPEMD_Transform160X(RIPEMD_F, e1, a1, b1, c1, d1, X[11], this->rl_0_15[11], this->constant0);
            RIPEMD_Transform160X(RIPEMD_F, d1, e1, a1, b1, c1, X[12], this->rl_0_15[12], this->constant0);
            RIPEMD_Transform160X(RIPEMD_F, c1, d1, e1, a1, b1, X[13], this->rl_0_15[13], this->constant0);
            RIPEMD_Transform160X(RIPEMD_F, b1, c1, d1, e1, a1, X[14], this->rl_0_15[14], this->constant0);
            RIPEMD_Transform160X(RIPEMD_F, a1, b1, c1, d1, e1, X[15], this->rl_0_15[15], this->constant0);
        }
        
        // Second transform set
        void BaseRipemd160X::Transform_G1(unsigned int* a1, unsigned int* b1, unsigned int* c1, unsigned int* d1, unsigned int* e1, unsigned int* X) {
            
            RIPEMD_Transform160X(RIPEMD_G, e1, a1, b1, c1, d1, X[ 7], this->rl_16_31[ 0], this->constant1);
            RIPEMD_Transform160X(RIPEMD_G, d1, e1, a1, b1, c1, X[ 4], this->rl_16_31[ 1], this->constant1);
            RIPEMD_Transform160X(RIPEMD_G, c1, d1, e1, a1, b1, X[13], this->rl_16_31[ 2], this->constant1);
            RIPEMD_Transform160X(RIPEMD_G, b1, c1, d1, e1, a1, X[ 1], this->rl_16_31[ 3], this->constant1);
            RIPEMD_Transform160X(RIPEMD_G, a1, b1, c1, d1, e1, X[10], this->rl_16_31[ 4], this->constant1);
            RIPEMD_Transform160X(RIPEMD_G, e1, a1, b1, c1, d1, X[ 6], this->rl_16_31[ 5], this->constant1);
            RIPEMD_Transform160X(RIPEMD_G, d1, e1, a1, b1, c1, X[15], this->rl_16_31[ 6], this->constant1);
            RIPEMD_Transform160X(RIPEMD_G, c1, d1, e1, a1, b1, X[ 3], this->rl_16_31[ 7], this->constant1);
            RIPEMD_Transform160X(RIPEMD_G, b1, c1, d1, e1, a1, X[12], this->rl_16_31[ 8], this->constant1);
            RIPEMD_Transform160X(RIPEMD_G, a1, b1, c1, d1, e1, X[ 0], this->rl_16_31[ 9], this->constant1);
            RIPEMD_Transform160X(RIPEMD_G, e1, a1, b1, c1, d1, X[ 9], this->rl_16_31[10], this->constant1);
            RIPEMD_Transform160X(RIPEMD_G, d1, e1, a1, b1, c1, X[ 5], this->rl_16_31[11], this->constant1);
            RIPEMD_Transform160X(RIPEMD_G, c1, d1, e1, a1, b1, X[ 2], this->rl_16_31[12], this->constant1);
            RIPEMD_Transform160X(RIPEMD_G, b1, c1, d1, e1, a1, X[14], this->rl_16_31[13], this->constant1);
            RIPEMD_Transform160X(RIPEMD_G, a1, b1, c1, d1, e1, X[11], this->rl_16_31[14], this->constant1);
            RIPEMD_Transform160X(RIPEMD_G, e1, a1, b1, c1, d1, X[ 8], this->rl_16_31[15], this->constant1);
        }
        
        // Third transform set
        void BaseRipemd160X::Transform_H2(unsigned int* a1, unsigned int* b1, unsigned int* c1, unsigned int* d1, unsigned int* e1, unsigned int* X) {
            
            RIPEMD_Transform160X(RIPEMD_H, d1, e1, a1, b1, c1, X[ 3], this->rl_32_47[ 0], this->constant2);
            RIPEMD_Transform160X(RIPEMD_H, c1, d1, e1, a1, b1, X[10], this->rl_32_47[ 1], this->constant2);
            RIPEMD_Transform160X(RIPEMD_H, b1, c1, d1, e1, a1, X[14], this->rl_32_47[ 2], this->constant2);
            RIPEMD_Transform160X(RIPEMD_H, a1, b1, c1, d1, e1, X[ 4], this->rl_32_47[ 3], this->constant2);
            RIPEMD_Transform160X(RIPEMD_H, e1, a1, b1, c1, d1, X[ 9], this->rl_32_47[ 4], this->constant2);
            RIPEMD_Transform160X(RIPEMD_H, d1, e1, a1, b1, c1, X[15], this->rl_32_47[ 5], this->constant2);
            RIPEMD_Transform160X(RIPEMD_H, c1, d1, e1, a1, b1, X[ 8], this->rl_32_47[ 6], this->constant2);
            RIPEMD_Transform160X(RIPEMD_H, b1, c1, d1, e1, a1, X[ 1], this->rl_32_47[ 7], this->constant2);
            RIPEMD_Transform160X(RIPEMD_H, a1, b1, c1, d1, e1, X[ 2], this->rl_32_47[ 8], this->constant2);
            RIPEMD_Transform160X(RIPEMD_H, e1, a1, b1, c1, d1, X[ 7], this->rl_32_47[ 9], this->constant2);
            RIPEMD_Transform160X(RIPEMD_H, d1, e1, a1, b1, c1, X[ 0], this->rl_32_47[10], this->constant2);
            RIPEMD_Transform160X(RIPEMD_H, c1, d1, e1, a1, b1, X[ 6], this->rl_32_47[11], this->constant2);
            RIPEMD_Transform160X(RIPEMD_H, b1, c1, d1, e1, a1, X[13], this->rl_32_47[12], this->constant2);
            RIPEMD_Transform160X(RIPEMD_H, a1, b1, c1, d1, e1, X[11], this->rl_32_47[13], this->constant2);
            RIPEMD_Transform160X(RIPEMD_H, e1, a1, b1, c1, d1, X[ 5], this->rl_32_47[14], this->constant2);
            RIPEMD_Transform160X(RIPEMD_H, d1, e1, a1, b1, c1, X[12], this->rl_32_47[15], this->constant2);
        }
        
        // Fourth transform set
        void BaseRipemd160X::Transform_I3(unsigned int* a1, unsigned int* b1, unsigned int* c1, unsigned int* d1, unsigned int* e1, unsigned int* X) {
            
            RIPEMD_Transform160X(RIPEMD_I, c1, d1, e1, a1, b1, X[ 1], this->rl_48_63[ 0], this->constant3);
            RIPEMD_Transform160X(RIPEMD_I, b1, c1, d1, e1, a1, X[ 9], this->rl_48_63[ 1], this->constant3);
            RIPEMD_Transform160X(RIPEMD_I, a1, b1, c1, d1, e1, X[11], this->rl_48_63[ 2], this->constant3);
            RIPEMD_Transform160X(RIPEMD_I, e1, a1, b1, c1, d1, X[10], this->rl_48_63[ 3], this->constant3);
            RIPEMD_Transform160X(RIPEMD_I, d1, e1, a1, b1, c1, X[ 0], this->rl_48_63[ 4], this->constant3);
            RIPEMD_Transform160X(RIPEMD_I, c1, d1, e1, a1, b1, X[ 8], this->rl_48_63[ 5], this->constant3);
            RIPEMD_Transform160X(RIPEMD_I, b1, c1, d1, e1, a1, X[12], this->rl_48_63[ 6], this->constant3);
            RIPEMD_Transform160X(RIPEMD_I, a1, b1, c1, d1, e1, X[ 4], this->rl_48_63[ 7], this->constant3);
            RIPEMD_Transform160X(RIPEMD_I, e1, a1, b1, c1, d1, X[13], this->rl_48_63[ 8], this->constant3);
            RIPEMD_Transform160X(RIPEMD_I, d1, e1, a1, b1, c1, X[ 3], this->rl_48_63[ 9], this->constant3);
            RIPEMD_Transform160X(RIPEMD_I, c1, d1, e1, a1, b1, X[ 7], this->rl_48_63[10], this->constant3);
            RIPEMD_Transform160X(RIPEMD_I, b1, c1, d1, e1, a1, X[15], this->rl_48_63[11], this->constant3);
            RIPEMD_Transform160X(RIPEMD_I, a1, b1, c1, d1, e1, X[14], this->rl_48_63[12], this->constant3);
            RIPEMD_Transform160X(RIPEMD_I, e1, a1, b1, c1, d1, X[ 5], this->rl_48_63[13], this->constant3);
            RIPEMD_Transform160X(RIPEMD_I, d1, e1, a1, b1, c1, X[ 6], this->rl_48_63[14], this->constant3);
            RIPEMD_Transform160X(RIPEMD_I, c1, d1, e1, a1, b1, X[ 2], this->rl_48_63[15], this->constant3);
        }
        
        // Fifth transform set
        void BaseRipemd160X::Transform_J4(unsigned int* a1, unsigned int* b1, unsigned int* c1, unsigned int* d1, unsigned int* e1, unsigned int* X) {
            
            RIPEMD_Transform160X(RIPEMD_J, b1, c1, d1, e1, a1, X[ 4], this->rl_64_79[ 0], this->constant4);
            RIPEMD_Transform160X(RIPEMD_J, a1, b1, c1, d1, e1, X[ 0], this->rl_64_79[ 1], this->constant4);
            RIPEMD_Transform160X(RIPEMD_J, e1, a1, b1, c1, d1, X[ 5], this->rl_64_79[ 2], this->constant4);
            RIPEMD_Transform160X(RIPEMD_J, d1, e1, a1, b1, c1, X[ 9], this->rl_64_79[ 3], this->constant4);
            RIPEMD_Transform160X(RIPEMD_J, c1, d1, e1, a1, b1, X[ 7], this->rl_64_79[ 4], this->constant4);
            RIPEMD_Transform160X(RIPEMD_J, b1, c1, d1, e1, a1, X[12], this->rl_64_79[ 5], this->constant4);
            RIPEMD_Transform160X(RIPEMD_J, a1, b1, c1, d1, e1, X[ 2], this->rl_64_79[ 6], this->constant4);
            RIPEMD_Transform160X(RIPEMD_J, e1, a1, b1, c1, d1, X[10], this->rl_64_79[ 7], this->constant4);
            RIPEMD_Transform160X(RIPEMD_J, d1, e1, a1, b1, c1, X[14], this->rl_64_79[ 8], this->constant4);
            RIPEMD_Transform160X(RIPEMD_J, c1, d1, e1, a1, b1, X[ 1], this->rl_64_79[ 9], this->constant4);
            RIPEMD_Transform160X(RIPEMD_J, b1, c1, d1, e1, a1, X[ 3], this->rl_64_79[10], this->constant4);
            RIPEMD_Transform160X(RIPEMD_J, a1, b1, c1, d1, e1, X[ 8], this->rl_64_79[11], this->constant4);
            RIPEMD_Transform160X(RIPEMD_J, e1, a1, b1, c1, d1, X[11], this->rl_64_79[12], this->constant4);
            RIPEMD_Transform160X(RIPEMD_J, d1, e1, a1, b1, c1, X[ 6], this->rl_64_79[13], this->constant4);
            RIPEMD_Transform160X(RIPEMD_J, c1, d1, e1, a1, b1, X[15], this->rl_64_79[14], this->constant4);
            RIPEMD_Transform160X(RIPEMD_J, b1, c1, d1, e1, a1, X[13], this->rl_64_79[15], this->constant4);
        }
        
        // Sixth transform set
        void BaseRipemd160X::Transform_J5(unsigned int* a2, unsigned int* b2, unsigned int* c2, unsigned int* d2, unsigned int* e2, unsigned int* X) {
            
            RIPEMD_Transform160X(RIPEMD_J, a2, b2, c2, d2, e2, X[ 5], this->prime_rl_0_15[ 0], this->constant5);
            RIPEMD_Transform160X(RIPEMD_J, e2, a2, b2, c2, d2, X[14], this->prime_rl_0_15[ 1], this->constant5);
            RIPEMD_Transform160X(RIPEMD_J, d2, e2, a2, b2, c2, X[ 7], this->prime_rl_0_15[ 2], this->constant5);
            RIPEMD_Transform160X(RIPEMD_J, c2, d2, e2, a2, b2, X[ 0], this->prime_rl_0_15[ 3], this->constant5);
            RIPEMD_Transform160X(RIPEMD_J, b2, c2, d2, e2, a2, X[ 9], this->prime_rl_0_15[ 4], this->constant5);
            RIPEMD_Transform160X(RIPEMD_J, a2, b2, c2, d2, e2, X[ 2], this->prime_rl_0_15[ 5], this->constant5);
            RIPEMD_Transform160X(RIPEMD_J, e2, a2, b2, c2, d2, X[11], this->prime_rl_0_15[ 6], this->constant5);
            RIPEMD_Transform160X(RIPEMD_J, d2, e2, a2, b2, c2, X[ 4], this->prime_rl_0_15[ 7], this->constant5);
            RIPEMD_Transform160X(RIPEMD_J, c2, d2, e2, a2, b2, X[13], this->prime_rl_0_15[ 8], this->constant5);
            RIPEMD_Transform160X(RIPEMD_J, b2, c2, d2, e2, a2, X[ 6], this->prime_rl_0_15[ 9], this->constant5);
            RIPEMD_Transform160X(RIPEMD_J, a2, b2, c2, d2, e2, X[15], this->prime_rl_0_15[10], this->constant5);
            RIPEMD_Transform160X(RIPEMD_J, e2, a2, b2, c2, d2, X[ 8], this->prime_rl_0_15[11], this->constant5);
            RIPEMD_Transform160X(RIPEMD_J, d2, e2, a2, b2, c2, X[ 1], this->prime_rl_0_15[12], this->constant5);
            RIPEMD_Transform160X(RIPEMD_J, c2, d2, e2, a2, b2, X[10], this->prime_rl_0_15[13], this->constant5);
            RIPEMD_Transform160X(RIPEMD_J, b2, c2, d2, e2, a2, X[ 3], this->prime_rl_0_15[14], this->constant5);
            RIPEMD_Transform160X(RIPEMD_J, a2, b2, c2, d2, e2, X[12], this->prime_rl_0_15[15], this->constant5);
        }
        
        // Seventh transform set
        void BaseRipemd160X::Transform_I6(unsigned int* a2, unsigned int* b2, unsigned int* c2, unsigned int* d2, unsigned int* e2, unsigned int* X) {
            
            RIPEMD_Transform160X(RIPEMD_I, e2, a2, b2, c2, d2, X[ 6], this->prime_rl_16_31[ 0], this->constant6);
            RIPEMD_Transform160X(RIPEMD_I, d2, e2, a2, b2, c2, X[11], this->prime_rl_16_31[ 1], this->constant6);
            RIPEMD_Transform160X(RIPEMD_I, c2, d2, e2, a2, b2, X[ 3], this->prime_rl_16_31[ 2], this->constant6);
            RIPEMD_Transform160X(RIPEMD_I, b2, c2, d2, e2, a2, X[ 7], this->prime_rl_16_31[ 3], this->constant6);
            RIPEMD_Transform160X(RIPEMD_I, a2, b2, c2, d2, e2, X[ 0], this->prime_rl_16_31[ 4], this->constant6);
            RIPEMD_Transform160X(RIPEMD_I, e2, a2, b2, c2, d2, X[13], this->prime_rl_16_31[ 5], this->constant6);
            RIPEMD_Transform160X(RIPEMD_I, d2, e2, a2, b2, c2, X[ 5], this->prime_rl_16_31[ 6], this->constant6);
            RIPEMD_Transform160X(RIPEMD_I, c2, d2, e2, a2, b2, X[10], this->prime_rl_16_31[ 7], this->constant6);
            RIPEMD_Transform160X(RIPEMD_I, b2, c2, d2, e2, a2, X[14], this->prime_rl_16_31[ 8], this->constant6);
            RIPEMD_Transform160X(RIPEMD_I, a2, b2, c2, d2, e2, X[15], this->prime_rl_16_31[ 9], this->constant6);
            RIPEMD_Transform160X(RIPEMD_I, e2, a2, b2, c2, d2, X[ 8], this->prime_rl_16_31[10], this->constant6);
            RIPEMD_Transform160X(RIPEMD_I, d2, e2, a2, b2, c2, X[12], this->prime_rl_16_31[11], this->constant6);
            RIPEMD_Transform160X(RIPEMD_I, c2, d2, e2, a2, b2, X[ 4], this->prime_rl_16_31[12], this->constant6);
            RIPEMD_Transform160X(RIPEMD_I, b2, c2, d2, e2, a2, X[ 9], this->prime_rl_16_31[13], this->constant6);
            RIPEMD_Transform160X(RIPEMD_I, a2, b2, c2, d2, e2, X[ 1], this->prime_rl_16_31[14], this->constant6);
            RIPEMD_Transform160X(RIPEMD_I, e2, a2, b2, c2, d2, X[ 2], this->prime_rl_16_31[15], this->constant6);
        }
        
        // Eighth transform set
        void BaseRipemd160X::Transform_H7(unsigned int* a2, unsigned int* b2, unsigned int* c2, unsigned int* d2, unsigned int* e2, unsigned int* X) {
            
            RIPEMD_Transform160X(RIPEMD_H, d2, e2, a2, b2, c2, X[15], this->prime_rl_32_47[ 0], this->constant7);
            RIPEMD_Transform160X(RIPEMD_H, c2, d2, e2, a2, b2, X[ 5], this->prime_rl_32_47[ 1], this->constant7);
            RIPEMD_Transform160X(RIPEMD_H, b2, c2, d2, e2, a2, X[ 1], this->prime_rl_32_47[ 2], this->constant7);
            RIPEMD_Transform160X(RIPEMD_H, a2, b2, c2, d2, e2, X[ 3], this->prime_rl_32_47[ 3], this->constant7);
            RIPEMD_Transform160X(RIPEMD_H, e2, a2, b2, c2, d2, X[ 7], this->prime_rl_32_47[ 4], this->constant7);
            RIPEMD_Transform160X(RIPEMD_H, d2, e2, a2, b2, c2, X[14], this->prime_rl_32_47[ 5], this->constant7);
            RIPEMD_Transform160X(RIPEMD_H, c2, d2, e2, a2, b2, X[ 6], this->prime_rl_32_47[ 6], this->constant7);
            RIPEMD_Transform160X(RIPEMD_H, b2, c2, d2, e2, a2, X[ 9], this->prime_rl_32_47[ 7], this->constant7);
            RIPEMD_Transform160X(RIPEMD_H, a2, b2, c2, d2, e2, X[11], this->prime_rl_32_47[ 8], this->constant7);
            RIPEMD_Transform160X(RIPEMD_H, e2, a2, b2, c2, d2, X[ 8], this->prime_rl_32_47[ 9], this->constant7);
            RIPEMD_Transform160X(RIPEMD_H, d2, e2, a2, b2, c2, X[12], this->prime_rl_32_47[10], this->constant7);
            RIPEMD_Transform160X(RIPEMD_H, c2, d2, e2, a2, b2, X[ 2], this->prime_rl_32_47[11], this->constant7);
            RIPEMD_Transform160X(RIPEMD_H, b2, c2, d2, e2, a2, X[10], this->prime_rl_32_47[12], this->constant7);
            RIPEMD_Transform160X(RIPEMD_H, a2, b2, c2, d2, e2, X[ 0], this->prime_rl_32_47[13], this->constant7);
            RIPEMD_Transform160X(RIPEMD_H, e2, a2, b2, c2, d2, X[ 4], this->prime_rl_32_47[14], this->constant7);
            RIPEMD_Transform160X(RIPEMD_H, d2, e2, a2, b2, c2, X[13], this->prime_rl_32_47[15], this->constant7);
        }
        
        // Ninth transform set
        void BaseRipemd160X::Transform_G8(unsigned int* a2, unsigned int* b2, unsigned int* c2, unsigned int* d2, unsigned int* e2, unsigned int* X) {
            
            RIPEMD_Transform160X(RIPEMD_G, c2, d2, e2, a2, b2, X[ 8], this->prime_rl_48_63[ 0], this->constant8);
            RIPEMD_Transform160X(RIPEMD_G, b2, c2, d2, e2, a2, X[ 6], this->prime_rl_48_63[ 1], this->constant8);
            RIPEMD_Transform160X(RIPEMD_G, a2, b2, c2, d2, e2, X[ 4], this->prime_rl_48_63[ 2], this->constant8);
            RIPEMD_Transform160X(RIPEMD_G, e2, a2, b2, c2, d2, X[ 1], this->prime_rl_48_63[ 3], this->constant8);
            RIPEMD_Transform160X(RIPEMD_G, d2, e2, a2, b2, c2, X[ 3], this->prime_rl_48_63[ 4], this->constant8);
            RIPEMD_Transform160X(RIPEMD_G, c2, d2, e2, a2, b2, X[11], this->prime_rl_48_63[ 5], this->constant8);
            RIPEMD_Transform160X(RIPEMD_G, b2, c2, d2, e2, a2, X[15], this->prime_rl_48_63[ 6], this->constant8);
            RIPEMD_Transform160X(RIPEMD_G, a2, b2, c2, d2, e2, X[ 0], this->prime_rl_48_63[ 7], this->constant8);
            RIPEMD_Transform160X(RIPEMD_G, e2, a2, b2, c2, d2, X[ 5], this->prime_rl_48_63[ 8], this->constant8);
            RIPEMD_Transform160X(RIPEMD_G, d2, e2, a2, b2, c2, X[12], this->prime_rl_48_63[ 9], this->constant8);
            RIPEMD_Transform160X(RIPEMD_G, c2, d2, e2, a2, b2, X[ 2], this->prime_rl_48_63[10], this->constant8);
            RIPEMD_Transform160X(RIPEMD_G, b2, c2, d2, e2, a2, X[13], this->prime_rl_48_63[11], this->constant8);
            RIPEMD_Transform160X(RIPEMD_G, a2, b2, c2, d2, e2, X[ 9], this->prime_rl_48_63[12], this->constant8);
            RIPEMD_Transform160X(RIPEMD_G, e2, a2, b2, c2, d2, X[ 7], this->prime_rl_48_63[13], this->constant8);
            RIPEMD_Transform160X(RIPEMD_G, d2, e2, a2, b2, c2, X[10], this->prime_rl_48_63[14], this->constant8);
            RIPEMD_Transform160X(RIPEMD_G, c2, d2, e2, a2, b2, X[14], this->prime_rl_48_63[15], this->constant8);
        }
        
        // Tenth transform set
        void BaseRipemd160X::Transform_F9(unsigned int* a2, unsigned int* b2, unsigned int* c2, unsigned int* d2, unsigned int* e2, unsigned int* X) {
            
            RIPEMD_Transform160X(RIPEMD_F, b2, c2, d2, e2, a2, X[12], this->prime_rl_64_79[ 0], this->constant9);
            RIPEMD_Transform160X(RIPEMD_F, a2, b2, c2, d2, e2, X[15], this->prime_rl_64_79[ 1], this->constant9);
            RIPEMD_Transform160X(RIPEMD_F, e2, a2, b2, c2, d2, X[10], this->prime_rl_64_79[ 2], this->constant9);
            RIPEMD_Transform160X(RIPEMD_F, d2, e2, a2, b2, c2, X[ 4], this->prime_rl_64_79[ 3], this->constant9);
            RIPEMD_Transform160X(RIPEMD_F, c2, d2, e2, a2, b2, X[ 1], this->prime_rl_64_79[ 4], this->constant9);
            RIPEMD_Transform160X(RIPEMD_F, b2, c2, d2, e2, a2, X[ 5], this->prime_rl_64_79[ 5], this->constant9);
            RIPEMD_Transform160X(RIPEMD_F, a2, b2, c2, d2, e2, X[ 8], this->prime_rl_64_79[ 6], this->constant9);
            RIPEMD_Transform160X(RIPEMD_F, e2, a2, b2, c2, d2, X[ 7], this->prime_rl_64_79[ 7], this->constant9);
            RIPEMD_Transform160X(RIPEMD_F, d2, e2, a2, b2, c2, X[ 6], this->prime_rl_64_79[ 8], this->constant9);
            RIPEMD_Transform160X(RIPEMD_F, c2, d2, e2, a2, b2, X[ 2], this->prime_rl_64_79[ 9], this->constant9);
            RIPEMD_Transform160X(RIPEMD_F, b2, c2, d2, e2, a2, X[13], this->prime_rl_64_79[10], this->constant9);
            RIPEMD_Transform160X(RIPEMD_F, a2, b2, c2, d2, e2, X[14], this->prime_rl_64_79[11], this->constant9);
            RIPEMD_Transform160X(RIPEMD_F, e2, a2, b2, c2, d2, X[ 0], this->prime_rl_64_79[12], this->constant9);
            RIPEMD_Transform160X(RIPEMD_F, d2, e2, a2, b2, c2, X[ 3], this->prime_rl_64_79[13], this->constant9);
            RIPEMD_Transform160X(RIPEMD_F, c2, d2, e2, a2, b2, X[ 9], this->prime_rl_64_79[14], this->constant9);
            RIPEMD_Transform160X(RIPEMD_F, b2, c2, d2, e2, a2, X[11], this->prime_rl_64_79[15], this->constant9);
        }
    }
}