digest-kangarootwelve 0.4.2 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b87cc8666ac88cef2163a09169663b72fd780f531a33315a8bc1329acdd494f2
4
- data.tar.gz: f9960e47d3976cdbd2e1c1a6e344220c8a861601968997b36eb9932b21d872f5
3
+ metadata.gz: a6d704428596e208194d0a66067cd47fd93f86c87a4ed83aa68bf365dd118cc9
4
+ data.tar.gz: a582a30602bd9573c4188280a4b8a9d7e5ee5a9bb383b93be7c86434d274c4f9
5
5
  SHA512:
6
- metadata.gz: 75597c93c110ff7796bc546b4f15b25541f8ae7b413ba479a7d87e756ca7fbe43731d75db1e808a8cd9ef24cff0c6a9d4e31524b29b8c32626e33e02df419d35
7
- data.tar.gz: 1bdc214850cad5879f6930367e88af5350cfae1a7f6d6e2620474e1ae1f823f5c8eb7c455373741ecb5cc440e547c8e074090fd33f80b75a0f5c0e9fcdbe9be9
6
+ metadata.gz: 78db569f6b9c4943f970aece5c07900f4e6d312bc9d294b70331d8cad4cc511af259ffb579531e1266f0ff1f0d31da82cefb7fe7dd377c7eecb613c444c684d1
7
+ data.tar.gz: 8e11295c04a7b274f4b60f6bbd789bc4bd3f3a1c391b69103aa45a17c68331c9e877539ec47208f04d31e4602f5236f20e811989ae9d7798f06ba85381939027
@@ -11,7 +11,10 @@ Gem::Specification.new do |spec|
11
11
  spec.authors = ["konsolebox"]
12
12
  spec.email = ["konsolebox@gmail.com"]
13
13
  spec.summary = "KangarooTwelve for Ruby"
14
- spec.description = "A KangarooTwelve library that works on top of Digest::Base."
14
+ spec.description = "A KangarooTwelve library that utilizes the XKCP package and can be " \
15
+ "optionally optimized during compile-time based on a target. It produces " \
16
+ "implementation classes that work on top of Digest::Base and conform " \
17
+ "with how Digest classes work."
15
18
  spec.homepage = "https://github.com/konsolebox/digest-kangarootwelve-ruby"
16
19
  spec.license = "MIT"
17
20
 
@@ -194,8 +194,10 @@ void KeccakP1600_OverwriteWithZeroes(void *state, unsigned int byteCount)
194
194
 
195
195
  /* ---------------------------------------------------------------- */
196
196
 
197
+ #if (PLATFORM_BYTE_ORDER != IS_LITTLE_ENDIAN)
197
198
  static void fromBytesToWords(tKeccakLane *stateAsWords, const unsigned char *state);
198
199
  static void fromWordsToBytes(unsigned char *state, const tKeccakLane *stateAsWords);
200
+ #endif
199
201
  void KeccakP1600OnWords(tKeccakLane *state, unsigned int nrRounds);
200
202
  void KeccakP1600Round(tKeccakLane *state, unsigned int indexRound);
201
203
  static void theta(tKeccakLane *A);
@@ -267,6 +269,7 @@ void KeccakP1600_Permute_24rounds(void *state)
267
269
  #endif
268
270
  }
269
271
 
272
+ #if (PLATFORM_BYTE_ORDER != IS_LITTLE_ENDIAN)
270
273
  static void fromBytesToWords(tKeccakLane *stateAsWords, const unsigned char *state)
271
274
  {
272
275
  unsigned int i, j;
@@ -286,6 +289,7 @@ static void fromWordsToBytes(unsigned char *state, const tKeccakLane *stateAsWor
286
289
  for(j=0; j<(64/8); j++)
287
290
  state[i*(64/8)+j] = (unsigned char)((stateAsWords[i] >> (8*j)) & 0xFF);
288
291
  }
292
+ #endif
289
293
 
290
294
  void KeccakP1600OnWords(tKeccakLane *state, unsigned int nrRounds)
291
295
  {
@@ -188,8 +188,10 @@ void KeccakP200_OverwriteWithZeroes(void *state, unsigned int byteCount)
188
188
 
189
189
  /* ---------------------------------------------------------------- */
190
190
 
191
+ #if (PLATFORM_BYTE_ORDER != IS_LITTLE_ENDIAN)
191
192
  static void fromBytesToWords(tKeccakLane *stateAsWords, const unsigned char *state);
192
193
  static void fromWordsToBytes(unsigned char *state, const tKeccakLane *stateAsWords);
194
+ #endif
193
195
  void KeccakP200OnWords(tKeccakLane *state, unsigned int nrRounds);
194
196
  void KeccakP200Round(tKeccakLane *state, unsigned int indexRound);
195
197
  static void theta(tKeccakLane *A);
@@ -240,6 +242,7 @@ void KeccakP200_Permute_18rounds(void *state)
240
242
  #endif
241
243
  }
242
244
 
245
+ #if (PLATFORM_BYTE_ORDER != IS_LITTLE_ENDIAN)
243
246
  static void fromBytesToWords(tKeccakLane *stateAsWords, const unsigned char *state)
244
247
  {
245
248
  unsigned int i, j;
@@ -259,6 +262,7 @@ static void fromWordsToBytes(unsigned char *state, const tKeccakLane *stateAsWor
259
262
  for(j=0; j<sizeof(tKeccakLane); j++)
260
263
  state[i*sizeof(tKeccakLane)+j] = (stateAsWords[i] >> (8*j)) & 0xFF;
261
264
  }
265
+ #endif
262
266
 
263
267
  void KeccakP200OnWords(tKeccakLane *state, unsigned int nrRounds)
264
268
  {
@@ -190,8 +190,10 @@ void KeccakP400_OverwriteWithZeroes(void *state, unsigned int byteCount)
190
190
 
191
191
  /* ---------------------------------------------------------------- */
192
192
 
193
+ #if (PLATFORM_BYTE_ORDER != IS_LITTLE_ENDIAN)
193
194
  static void fromBytesToWords(tKeccakLane *stateAsWords, const unsigned char *state);
194
195
  static void fromWordsToBytes(unsigned char *state, const tKeccakLane *stateAsWords);
196
+ #endif
195
197
  void KeccakP400OnWords(tKeccakLane *state, unsigned int nrRounds);
196
198
  void KeccakP400Round(tKeccakLane *state, unsigned int indexRound);
197
199
  static void theta(tKeccakLane *A);
@@ -242,6 +244,7 @@ void KeccakP400_Permute_20rounds(void *state)
242
244
  #endif
243
245
  }
244
246
 
247
+ #if (PLATFORM_BYTE_ORDER != IS_LITTLE_ENDIAN)
245
248
  static void fromBytesToWords(tKeccakLane *stateAsWords, const unsigned char *state)
246
249
  {
247
250
  unsigned int i, j;
@@ -261,6 +264,7 @@ static void fromWordsToBytes(unsigned char *state, const tKeccakLane *stateAsWor
261
264
  for(j=0; j<sizeof(tKeccakLane); j++)
262
265
  state[i*sizeof(tKeccakLane)+j] = (stateAsWords[i] >> (8*j)) & 0xFF;
263
266
  }
267
+ #endif
264
268
 
265
269
  void KeccakP400OnWords(tKeccakLane *state, unsigned int nrRounds)
266
270
  {
@@ -192,8 +192,10 @@ void KeccakP800_OverwriteWithZeroes(void *state, unsigned int byteCount)
192
192
 
193
193
  /* ---------------------------------------------------------------- */
194
194
 
195
+ #if (PLATFORM_BYTE_ORDER != IS_LITTLE_ENDIAN)
195
196
  static void fromBytesToWords(tKeccakLane *stateAsWords, const unsigned char *state);
196
197
  static void fromWordsToBytes(unsigned char *state, const tKeccakLane *stateAsWords);
198
+ #endif
197
199
  void KeccakP800OnWords(tKeccakLane *state, unsigned int nrRounds);
198
200
  void KeccakP800Round(tKeccakLane *state, unsigned int indexRound);
199
201
  static void theta(tKeccakLane *A);
@@ -265,6 +267,7 @@ void KeccakP800_Permute_22rounds(void *state)
265
267
  #endif
266
268
  }
267
269
 
270
+ #if (PLATFORM_BYTE_ORDER != IS_LITTLE_ENDIAN)
268
271
  static void fromBytesToWords(tKeccakLane *stateAsWords, const unsigned char *state)
269
272
  {
270
273
  unsigned int i, j;
@@ -284,6 +287,7 @@ static void fromWordsToBytes(unsigned char *state, const tKeccakLane *stateAsWor
284
287
  for(j=0; j<sizeof(tKeccakLane); j++)
285
288
  state[i*sizeof(tKeccakLane)+j] = (stateAsWords[i] >> (8*j)) & 0xFF;
286
289
  }
290
+ #endif
287
291
 
288
292
  void KeccakP800OnWords(tKeccakLane *state, unsigned int nrRounds)
289
293
  {
@@ -1,5 +1,5 @@
1
1
  module Digest
2
2
  module KangarooTwelve
3
- VERSION = "0.4.2"
3
+ VERSION = "0.4.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: digest-kangarootwelve
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - konsolebox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-15 00:00:00.000000000 Z
11
+ date: 2022-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -80,7 +80,9 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- description: A KangarooTwelve library that works on top of Digest::Base.
83
+ description: A KangarooTwelve library that utilizes the XKCP package and can be optionally
84
+ optimized during compile-time based on a target. It produces implementation classes
85
+ that work on top of Digest::Base and conform with how Digest classes work.
84
86
  email:
85
87
  - konsolebox@gmail.com
86
88
  executables: []