15 Commits

Author SHA1 Message Date
e34b8b962f
changed why2_seed_random's seed to UL 2025-01-12 11:07:11 +01:00
25782d1263
changed why2_random to boolean 2025-01-10 18:09:55 +01:00
25113dc0b3
declared seeded-rand fns in crypto 2025-01-10 17:54:27 +01:00
cf277b249f
created WHY2_RECOMMENDED_PADDING_RATE macro
basically padding every 3 chars
2024-11-21 21:04:52 +01:00
326f8f0768
created WHY2_PADDING_NONZERO_TRIES macro
when I try to generate random number, I need to prevent it from being zero, so I try this many times to be non-zero before I forcefully set it to 1

this should run few times but yk, theoretically the generated number can be the same for infinite time (or at least slow the performance :) )
2024-11-21 20:50:20 +01:00
f95608f52a
moved key's random number generation to why2_random fn 2024-11-20 17:56:04 +01:00
f754e43e19
made sum_segment comments more explanatory 2024-11-20 17:10:39 +01:00
6e7cdde99d
changed why2_sum_segment datatype to ULL
just in case
2024-11-20 16:33:22 +01:00
10fe26cca1
using rolling-hash-like way to count why2_sum_segment 2024-11-20 16:32:13 +01:00
b50305f080
created mod & base primes macros 2024-11-20 16:27:48 +01:00
e0274ec6c1
incread segment_size to 32 2024-11-20 16:24:21 +01:00
c0e9381642
renamed why2_checksum_segment to why2_sum_segment
it isn't that safe to be considered a checksum and the name checksum can be misleading. i am going to use it for getting padding size
2024-11-20 16:19:59 +01:00
c71b5275b5
changed checksum prime/segment ratio 2024-11-19 22:54:38 +01:00
2f6ab00f93
defined WHY2_CHECKSUM_PRIME macro 2024-11-19 22:28:10 +01:00
fb2ac1a7bb
moved checksum stuff to core-crypto
also created the core-crypto
2024-11-19 21:57:29 +01:00