]> Cypherpunks repositories - keks.git/log
keks.git
4 months agoLeave -algo default value for convenience
Sergey Matveev [Thu, 12 Dec 2024 17:59:48 +0000 (20:59 +0300)]
Leave -algo default value for convenience

4 months agoMake clean scripts source directory agnostic
Sergey Matveev [Thu, 12 Dec 2024 14:19:51 +0000 (17:19 +0300)]
Make clean scripts source directory agnostic

4 months agoMissing clean call
Sergey Matveev [Thu, 12 Dec 2024 13:29:14 +0000 (16:29 +0300)]
Missing clean call

4 months agoMissing break
Sergey Matveev [Thu, 12 Dec 2024 13:25:21 +0000 (16:25 +0300)]
Missing break

4 months agoRefactor and reorganise yacpki
Sergey Matveev [Thu, 12 Dec 2024 13:00:58 +0000 (16:00 +0300)]
Refactor and reorganise yacpki

Mainly move cryptography-related code outside.

4 months agoPrettier panic output
Sergey Matveev [Thu, 12 Dec 2024 09:55:40 +0000 (12:55 +0300)]
Prettier panic output

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

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

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

4 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.

4 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

4 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.

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

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

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

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

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

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

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

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

4 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.

4 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

4 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.

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

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

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

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

4 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

5 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

5 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

5 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

5 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

5 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

5 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.

5 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

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

5 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

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

5 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.

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

5 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

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

5 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.

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

5 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()

5 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.

5 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

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

5 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

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

5 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

5 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.

5 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

5 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).

5 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

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

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

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

5 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.

5 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

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

5 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.

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

5 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

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

5 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.

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

5 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.

5 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.

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

5 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.

5 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.

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

5 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.

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

5 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.

5 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

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

5 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

5 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

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

5 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.

5 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.

5 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

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

5 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.

5 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.

5 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.

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

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

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

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

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

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

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

5 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

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

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

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

5 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