]> Cypherpunks repositories - keks.git/log
keks.git
11 months agoPrettier panic output
Sergey Matveev [Thu, 12 Dec 2024 09:55:40 +0000 (12:55 +0300)]
Prettier panic output

11 months agoNon exportable const
Sergey Matveev [Thu, 12 Dec 2024 09:55:28 +0000 (12:55 +0300)]
Non exportable const

11 months agoProperly regrouped imports
Sergey Matveev [Thu, 12 Dec 2024 10:14:16 +0000 (13:14 +0300)]
Properly regrouped imports

11 months agoMore docstrings
Sergey Matveev [Thu, 12 Dec 2024 09:55:15 +0000 (12:55 +0300)]
More docstrings

11 months agoLess pointers
Sergey Matveev [Thu, 12 Dec 2024 09:40:33 +0000 (12:40 +0300)]
Less pointers

Item, Raw, Blob are rather small structures, so an additional pointer
may hurt performance.

11 months agoLeave less junk after creating testdata
Sergey Matveev [Thu, 12 Dec 2024 09:35:37 +0000 (12:35 +0300)]
Leave less junk after creating testdata

11 months agoBig code reorganisation
Sergey Matveev [Wed, 11 Dec 2024 15:46:04 +0000 (18:46 +0300)]
Big code reorganisation

Much more clearer separated types.

11 months agoFuzz program for cyac
Sergey Matveev [Wed, 11 Dec 2024 13:51:04 +0000 (16:51 +0300)]
Fuzz program for cyac

11 months agoConsider possible tail existence
Sergey Matveev [Wed, 11 Dec 2024 13:41:13 +0000 (16:41 +0300)]
Consider possible tail existence

11 months agoWider code fuzz coverage
Sergey Matveev [Wed, 11 Dec 2024 13:27:17 +0000 (16:27 +0300)]
Wider code fuzz coverage

11 months agoFix an endless cycle
Sergey Matveev [Wed, 11 Dec 2024 13:26:39 +0000 (16:26 +0300)]
Fix an endless cycle

11 months agoFix reflected value type
Sergey Matveev [Wed, 11 Dec 2024 13:09:37 +0000 (16:09 +0300)]
Fix reflected value type

11 months agoCombine single error
Sergey Matveev [Wed, 11 Dec 2024 13:00:58 +0000 (16:00 +0300)]
Combine single error

11 months agoSimpler encode API
Sergey Matveev [Wed, 11 Dec 2024 12:59:21 +0000 (15:59 +0300)]
Simpler encode API

11 months agoDo not allow lonely EOC
Sergey Matveev [Wed, 11 Dec 2024 12:50:58 +0000 (15:50 +0300)]
Do not allow lonely EOC

11 months agoMissing buffer size check
Sergey Matveev [Wed, 11 Dec 2024 11:43:34 +0000 (14:43 +0300)]
Missing buffer size check

Found immediately by fuzz test.

11 months agoKeep test-related code in tests
Sergey Matveev [Wed, 11 Dec 2024 11:15:17 +0000 (14:15 +0300)]
Keep test-related code in tests

11 months agoHasher field must be publicly accessible
Sergey Matveev [Mon, 9 Dec 2024 12:28:13 +0000 (15:28 +0300)]
Hasher field must be publicly accessible

So external library users can use its GOSTSigner.

11 months agoProtection from recursion DoS
Sergey Matveev [Thu, 5 Dec 2024 12:12:57 +0000 (15:12 +0300)]
Protection from recursion DoS

11 months agoYet another tiny optimisation
Sergey Matveev [Thu, 5 Dec 2024 10:43:41 +0000 (13:43 +0300)]
Yet another tiny optimisation

11 months agoFuzzing related scripts
Sergey Matveev [Thu, 5 Dec 2024 09:57:38 +0000 (12:57 +0300)]
Fuzzing related scripts

11 months agoTrivial tiny performance optimisations
Sergey Matveev [Thu, 5 Dec 2024 09:56:37 +0000 (12:56 +0300)]
Trivial tiny performance optimisations

11 months agoAbility to set leapsecUTCAllow from CLI
Sergey Matveev [Thu, 5 Dec 2024 09:39:00 +0000 (12:39 +0300)]
Ability to set leapsecUTCAllow from CLI

11 months agoPrevent uncaught recursion limits during decoding
Sergey Matveev [Wed, 4 Dec 2024 16:14:46 +0000 (19:14 +0300)]
Prevent uncaught recursion limits during decoding

11 months agoCheck that leapsecUTCAllow is propagated everywhere
Sergey Matveev [Wed, 4 Dec 2024 16:02:44 +0000 (19:02 +0300)]
Check that leapsecUTCAllow is propagated everywhere

11 months agoSimpler and more robust datetime overflow check
Sergey Matveev [Wed, 4 Dec 2024 13:17:07 +0000 (16:17 +0300)]
Simpler and more robust datetime overflow check

11 months agoMonocypher-based cyac ed25519-blake2b cer-verify
Sergey Matveev [Wed, 4 Dec 2024 12:26:23 +0000 (15:26 +0300)]
Monocypher-based cyac ed25519-blake2b cer-verify

11 months agoAdd various suggested hash algorithms and Ed25519-BLAKE2b scheme
Sergey Matveev [Sat, 30 Nov 2024 14:54:44 +0000 (17:54 +0300)]
Add various suggested hash algorithms and Ed25519-BLAKE2b scheme

11 months agoFix terminology
Sergey Matveev [Tue, 3 Dec 2024 10:17:50 +0000 (13:17 +0300)]
Fix terminology

There is no general view on how to count the bit indexes.
Usually people use most/least significant bit terminology.

11 months agoDummy test for Raw-encoding coverage
Sergey Matveev [Mon, 2 Dec 2024 16:00:37 +0000 (19:00 +0300)]
Dummy test for Raw-encoding coverage

11 months agoMore set-related coverage
Sergey Matveev [Mon, 2 Dec 2024 16:00:16 +0000 (19:00 +0300)]
More set-related coverage

11 months agoPure hex (non escaped) encoding is easier to read and more compact
Sergey Matveev [Sun, 1 Dec 2024 10:02:06 +0000 (13:02 +0300)]
Pure hex (non escaped) encoding is easier to read and more compact

11 months agoMissing invalid UTF-8 strategies
Sergey Matveev [Sun, 1 Dec 2024 09:17:50 +0000 (12:17 +0300)]
Missing invalid UTF-8 strategies

11 months agoAnother compare optimisation
Sergey Matveev [Sat, 30 Nov 2024 22:29:00 +0000 (01:29 +0300)]
Another compare optimisation

Instead of always checking of the length, do it only when error happens.

12 months agoAdd pyac-related tests
Sergey Matveev [Sat, 30 Nov 2024 20:10:32 +0000 (23:10 +0300)]
Add pyac-related tests

12 months agoNote what exact version hypothesis was used
Sergey Matveev [Sat, 30 Nov 2024 20:10:18 +0000 (23:10 +0300)]
Note what exact version hypothesis was used

12 months agoAdd copyright information
Sergey Matveev [Sat, 30 Nov 2024 20:08:11 +0000 (23:08 +0300)]
Add copyright information

12 months agoUnify returned NotEnoughData sizes
Sergey Matveev [Sat, 30 Nov 2024 20:02:05 +0000 (23:02 +0300)]
Unify returned NotEnoughData sizes

NotEnoughData.n is decided to show how many *more* bytes we require,
not how many bytes at least at all is needed.

12 months agoAdd missing known TAI64 values
Sergey Matveev [Sat, 30 Nov 2024 19:37:13 +0000 (22:37 +0300)]
Add missing known TAI64 values

12 months agoSlight optimisation, reduce calls to .keys()
Sergey Matveev [Sat, 30 Nov 2024 19:26:04 +0000 (22:26 +0300)]
Slight optimisation, reduce calls to .keys()

12 months agoFix grammar
Sergey Matveev [Sat, 30 Nov 2024 19:23:55 +0000 (22:23 +0300)]
Fix grammar

Key can not "contain" the string, but key can be the string.

12 months agoSplit TAI-related tests for each separate type
Sergey Matveev [Sat, 30 Nov 2024 19:23:35 +0000 (22:23 +0300)]
Split TAI-related tests for each separate type

12 months agoMissing non-minimal TAI64 testing
Sergey Matveev [Sat, 30 Nov 2024 19:02:51 +0000 (22:02 +0300)]
Missing non-minimal TAI64 testing

12 months agoReplace hard-coded tests with symmetric ones
Sergey Matveev [Sat, 30 Nov 2024 18:58:02 +0000 (21:58 +0300)]
Replace hard-coded tests with symmetric ones

12 months agoSplit long lines
Sergey Matveev [Sat, 30 Nov 2024 18:46:13 +0000 (21:46 +0300)]
Split long lines

12 months agoWe can easily check exact Raw's value
Sergey Matveev [Sat, 30 Nov 2024 18:44:11 +0000 (21:44 +0300)]
We can easily check exact Raw's value

12 months agoMove Leapsec-related tests outside common ones
Sergey Matveev [Sat, 30 Nov 2024 18:42:29 +0000 (21:42 +0300)]
Move Leapsec-related tests outside common ones

Because they are not directly involved in TAI-testing, but the
correctness of our database.

12 months agoExplicitly check that length sorting works
Sergey Matveev [Sat, 30 Nov 2024 18:37:13 +0000 (21:37 +0300)]
Explicitly check that length sorting works

12 months agoCombine encode/decode tests
Sergey Matveev [Sat, 30 Nov 2024 18:35:15 +0000 (21:35 +0300)]
Combine encode/decode tests

Because output data of the encode test is the input for the decode one.
Actually tests separation could be useful to determine where we are
failing, but verbose assertEqual failed message will show exactly where
we failed (either during encode or decode).

12 months agoMove everything-strategy as it will be used
Sergey Matveev [Sat, 30 Nov 2024 18:34:54 +0000 (21:34 +0300)]
Move everything-strategy as it will be used

12 months agoRename test for clearness
Sergey Matveev [Sat, 30 Nov 2024 18:24:43 +0000 (21:24 +0300)]
Rename test for clearness

12 months agoMore symmetric tests
Sergey Matveev [Sat, 30 Nov 2024 18:24:02 +0000 (21:24 +0300)]
More symmetric tests

12 months agoSplit long strings tests
Sergey Matveev [Sat, 30 Nov 2024 18:15:37 +0000 (21:15 +0300)]
Split long strings tests

12 months agoSplit strings testing
Sergey Matveev [Sat, 30 Nov 2024 18:01:35 +0000 (21:01 +0300)]
Split strings testing

Binary and Unicode strings are two distinct data types.
However, of course, sharing big amount of code.

12 months agoSingle-test cases can omit test name
Sergey Matveev [Sat, 30 Nov 2024 18:01:13 +0000 (21:01 +0300)]
Single-test cases can omit test name

12 months agoSplit int-related combined tests
Sergey Matveev [Sat, 30 Nov 2024 17:49:23 +0000 (20:49 +0300)]
Split int-related combined tests

12 months agoUnacceptable string representations
Sergey Matveev [Sat, 30 Nov 2024 17:35:22 +0000 (20:35 +0300)]
Unacceptable string representations

Human can read either some of ASCII, some of Unicode, hexadecimal, but
not escaped data. Hexadecimal data clearly does not seem to be close to
Raw's argument encoding. That was definitely just copy-pasted, but
should be manually crafted as a desired and expected data.

12 months agoUnify case in hexadecimal strings
Sergey Matveev [Sat, 30 Nov 2024 17:28:54 +0000 (20:28 +0300)]
Unify case in hexadecimal strings

12 months agoRemove redundant prefix from test names
Sergey Matveev [Sat, 30 Nov 2024 17:24:32 +0000 (20:24 +0300)]
Remove redundant prefix from test names

12 months agoExplicitly cover edge cases
Sergey Matveev [Sat, 30 Nov 2024 17:21:16 +0000 (20:21 +0300)]
Explicitly cover edge cases

12 months agoSplit floats-related combined tests
Sergey Matveev [Sat, 30 Nov 2024 16:53:52 +0000 (19:53 +0300)]
Split floats-related combined tests

Simpler test cases, covering the narrow part of data, as a rule more
convenient to use, because if you have a typo in exactly 128-bit related
floats related code, then *_128 test will show that. Combined tests like
were before will require you using debugger.

12 months agoAdd junk during UUID decoding
Sergey Matveev [Sat, 30 Nov 2024 16:45:35 +0000 (19:45 +0300)]
Add junk during UUID decoding

12 months agoMore understandable naming of context manager's variable
Sergey Matveev [Sat, 30 Nov 2024 16:40:56 +0000 (19:40 +0300)]
More understandable naming of context manager's variable

"cm" just tells that it is "context manager". "class Class" is similar.
"err" can be more appropriate name, telling that it holds something
related to the error.

12 months agoSplit TestErrors
Sergey Matveev [Sat, 30 Nov 2024 16:37:13 +0000 (19:37 +0300)]
Split TestErrors

TestErrors mainly tests the NotEnoughData exception. Move it to its
separate class. Some generic errors tests are moved to separate file.

12 months agoRemove dead test
Sergey Matveev [Sat, 30 Nov 2024 16:32:24 +0000 (19:32 +0300)]
Remove dead test

12 months agoUse more appropriate sets-strategy for map's keys
Sergey Matveev [Sat, 30 Nov 2024 16:29:02 +0000 (19:29 +0300)]
Use more appropriate sets-strategy for map's keys

That way there won't be excess collapsing keys.

12 months agoUse more assertSequenceEqual
Sergey Matveev [Sat, 30 Nov 2024 16:27:02 +0000 (19:27 +0300)]
Use more assertSequenceEqual

For binary/text sequences it gives much more prettier output when
failing, more convenient and easy for human to deal with.

12 months agoSplit long strings
Sergey Matveev [Sat, 30 Nov 2024 16:21:28 +0000 (19:21 +0300)]
Split long strings

12 months agoLet's use shorter variable name
Sergey Matveev [Sat, 30 Nov 2024 16:19:16 +0000 (19:19 +0300)]
Let's use shorter variable name

I have nothing against "remaining", except for its length.
And "tail" term is used in pyac.py already.

12 months agoCollapse unnecessary multiline
Sergey Matveev [Sat, 30 Nov 2024 16:10:49 +0000 (19:10 +0300)]
Collapse unnecessary multiline

12 months agoReduce junk volume
Sergey Matveev [Sat, 30 Nov 2024 16:09:10 +0000 (19:09 +0300)]
Reduce junk volume

Just to reduce testing time. Anyway even several bytes of added data is
enough for testing purposes.

12 months agoAdd commonly used junk-generation strategy
Sergey Matveev [Sat, 30 Nov 2024 16:15:18 +0000 (19:15 +0300)]
Add commonly used junk-generation strategy

12 months agoLimit lists-strategy
Sergey Matveev [Sat, 30 Nov 2024 16:14:27 +0000 (19:14 +0300)]
Limit lists-strategy

12 months agoDRY: move commonly used strategies to single module
Sergey Matveev [Sat, 30 Nov 2024 15:57:52 +0000 (18:57 +0300)]
DRY: move commonly used strategies to single module

12 months agoTest does not accept any arguments
Sergey Matveev [Sat, 30 Nov 2024 16:00:47 +0000 (19:00 +0300)]
Test does not accept any arguments

12 months agoRemove unused imports
Sergey Matveev [Sat, 30 Nov 2024 15:46:31 +0000 (18:46 +0300)]
Remove unused imports

12 months agoUnify import-s grouping
Sergey Matveev [Sat, 30 Nov 2024 15:42:49 +0000 (18:42 +0300)]
Unify import-s grouping

As PEP8 (https://peps.python.org/pep-0008/) says, imports must be
grouped the following way: standard libraries, related third-party,
local application ones. "typing" is native library (since some modern
version), not third-party one.

Also, it is not explicitly noted anywhere, but imports are sorted with
ignored character case.

12 months agoRemove __main__ entrypoints from tests
Sergey Matveev [Sat, 30 Nov 2024 15:39:30 +0000 (18:39 +0300)]
Remove __main__ entrypoints from tests

Tests can easily be run directly by: python -m unittest python-path, so
those __main__ are not helpful at all.

12 months agoImport only necessary single TestCase, not the whole module
Sergey Matveev [Sat, 30 Nov 2024 15:38:33 +0000 (18:38 +0300)]
Import only necessary single TestCase, not the whole module

12 months agoUnify quotes usage
Sergey Matveev [Sat, 30 Nov 2024 15:35:49 +0000 (18:35 +0300)]
Unify quotes usage

12 months agoRemove redundant prefix from the name
Sergey Matveev [Sat, 30 Nov 2024 15:34:12 +0000 (18:34 +0300)]
Remove redundant prefix from the name

pyac_tests/ directory is located inside pyac/ already,
so "pyac_" prefix is not helpful.

12 months agoRemove ignore of the files that should not be generated
Sergey Matveev [Sat, 30 Nov 2024 15:31:22 +0000 (18:31 +0300)]
Remove ignore of the files that should not be generated

Although pyac is Python project and it is reasonable to include .pyc,
__pycache__ ignores, but I am confident, that an adequate Python setup
must not generate them at all. They are more than useless and must be
globally disabled on the system (PYTHONDONTWRITEBYTECODE=1), so should
not appear at all. Even if they are created, user should ignore them
globally in its own global .gitignore, rather in each Python-related
project.

12 months agoRemove personal tool preference ignore
Sergey Matveev [Sat, 30 Nov 2024 15:29:02 +0000 (18:29 +0300)]
Remove personal tool preference ignore

Project does not depend on VSCode in anyway. It is own preference of
what editors/tools to use. Should not be committed.

12 months agoMake a proper text file
Sergey Matveev [Sat, 30 Nov 2024 15:28:37 +0000 (18:28 +0300)]
Make a proper text file

12 months agoAdd tests
RudenkoAD [Fri, 15 Nov 2024 18:46:53 +0000 (21:46 +0300)]
Add tests

12 months agoBetter TAI-related testing
Sergey Matveev [Fri, 22 Nov 2024 15:19:44 +0000 (18:19 +0300)]
Better TAI-related testing

12 months agoFix awful typo error
Sergey Matveev [Thu, 21 Nov 2024 20:29:13 +0000 (23:29 +0300)]
Fix awful typo error

12 months agoHuman-convenient arguments
Sergey Matveev [Thu, 21 Nov 2024 12:38:11 +0000 (15:38 +0300)]
Human-convenient arguments

12 months agoIgnore some noisy warnings
Sergey Matveev [Thu, 21 Nov 2024 12:36:29 +0000 (15:36 +0300)]
Ignore some noisy warnings

12 months agoUnnecessary separator
Sergey Matveev [Thu, 21 Nov 2024 10:32:02 +0000 (13:32 +0300)]
Unnecessary separator

12 months agoRevised and corrected work with TAI64
Sergey Matveev [Thu, 21 Nov 2024 10:25:37 +0000 (13:25 +0300)]
Revised and corrected work with TAI64

12 months agoFixed TAI64N[A] *seconds validation
Sergey Matveev [Thu, 21 Nov 2024 09:03:28 +0000 (12:03 +0300)]
Fixed TAI64N[A] *seconds validation

12 months agoUse updated fixed tai64n library
Sergey Matveev [Thu, 21 Nov 2024 08:44:17 +0000 (11:44 +0300)]
Use updated fixed tai64n library

12 months agoRaise copyright years
Sergey Matveev [Thu, 21 Nov 2024 08:30:17 +0000 (11:30 +0300)]
Raise copyright years

12 months agoZero nsecs is ok for TAI64NA
Sergey Matveev [Thu, 21 Nov 2024 08:25:34 +0000 (11:25 +0300)]
Zero nsecs is ok for TAI64NA

12 months agoAssure that minimally encoded TAI64s are used
Sergey Matveev [Wed, 20 Nov 2024 21:25:26 +0000 (00:25 +0300)]
Assure that minimally encoded TAI64s are used

12 months agoTrivial optimisations
Sergey Matveev [Wed, 20 Nov 2024 14:10:00 +0000 (17:10 +0300)]
Trivial optimisations

12 months agomain() can accept void
Sergey Matveev [Wed, 20 Nov 2024 14:03:06 +0000 (17:03 +0300)]
main() can accept void

12 months agoRevised and corrected work with TAI64
Sergey Matveev [Wed, 20 Nov 2024 14:02:25 +0000 (17:02 +0300)]
Revised and corrected work with TAI64

12 months agoMove external-TAI64 specific constant out
Sergey Matveev [Wed, 20 Nov 2024 13:51:04 +0000 (16:51 +0300)]
Move external-TAI64 specific constant out