Alex Gaynor
b4ca965b0f
Ensure curves are supported in determinisic ECDSA tests ( #10917 )
...
* Ensure curves are supported in determinisic ECDSA tests
* x25519/x448 isnt fips anymore i guess
2024-05-01 21:55:41 -07:00
Alex Gaynor
c65975377e
fix for upcoming ruff lint ( #10891 )
2024-04-25 22:51:24 +00:00
Facundo Tuesca
0a1098fcf0
Support for ECDSA deterministic signing (RFC 6979) ( #10369 )
...
* Add support for deterministic ECDSA (RFC 6979)
2024-02-26 19:13:47 +00:00
Alex Gaynor
fb4c72c8bf
Added wycheproof vectors for pbkdf2 ( #10024 )
2023-12-21 08:30:36 -06:00
Alex Gaynor
2ca57be0c4
Use pyo3's facilities for exceptions ( #8785 )
2023-04-22 13:32:59 -06:00
Alex Gaynor
122211bb45
Remove coverage workaround that might not be required anymore ( #8690 )
2023-04-10 05:48:42 +08:00
Paul Kehrer
ce05282e58
cache ECDH values in wycheproof too ( #8487 )
...
this alters and renames the caching function a bit since it caches *to
the group* object but the actual values (in ECDH) come from the testcase
itself
2023-03-10 07:31:10 -05:00
Alex Gaynor
31f0dcabda
Cache some keys that are reused in wycheproof tests ( #8479 )
2023-03-10 05:17:42 +08:00
Alex Gaynor
5d3db676cf
Use the ruff 'pyupgrade' checks ( #8104 )
2023-01-20 05:36:01 +08:00
Alex Gaynor
7ff729ecf2
Switch from flake8 to ruff ( #7920 )
...
It's more than 60x faster.
2022-12-21 09:44:47 +07:00
Jean Paul Galea
da1a30b4ea
KBKDF: add CounterLocation.MiddleFixed ( #7489 )
...
* KBKDF: add CounterLocation.MiddleFixed
* tests_kbkdf: add new tests
- Test CounterLocation.MiddleFixed and blocation=
* test_kbkdf_vectors: make use of MIDDLE_FIXED
* docs: document KBKDF CounterLocation.MiddleFixed
* s/blocation/break_location/g
* CHANGELOG: document KBKDF{HMAC,CMAC} CounterLocation.MiddleFixed #7489
* kbkdf: fixed is static across n iterations, only the counter changes
* kbkdf: check break_location is 0..len(fixed)
- Update tests to assert exception is raised when
break_location < 0 or > len(fixed)
- When asserting for "break_location is ignored when MiddleFixed",
use break_location=0 instead of =10,
to ensure we don't raise because of break_location > len(fixed)
- Assert that the right error messages are returned to the user.
* kbkdf: keyword-only break_location
* docs: document kw-only KBKDF{HMAC,CMAC}
2022-08-15 08:19:12 -04:00
Alex Gaynor
02783d2297
Remove explicit subclassing of object now that all classes are new-style ( #6830 )
...
As someone who first with Python in 2.4 or so, this habit is going to be hard to break.
2022-01-30 16:29:24 +00:00
Alex Gaynor
56efbdd397
Factor some regexps into constants ( #6713 )
2021-12-18 06:39:46 +08:00
Alex Gaynor
422c8cb955
Fix mypy ( #6711 )
...
* Fix mypy
* Poke for GHA
2021-12-17 04:33:37 +08:00
Paul Kehrer
cd69204077
type some more things in the tests ( #6614 )
2021-11-17 07:04:14 -05:00
Paul Kehrer
343ac1344a
enable mypy over tests ( #5721 )
...
* clean mypy with tests dir
* remove most no_type_check annotations
* le sigh
* remove unneeded comments
2021-01-31 19:27:41 -05:00
Alex Gaynor
e66db8079d
Complete removal of py2 ( #5533 )
...
* Drop Python 2
* Black everything
2020-12-09 09:13:48 -06:00
Alex Gaynor
e0477596f7
Remove __future__ import from our code ( #5610 )
2020-12-09 00:35:11 -06:00
Alex Gaynor
2b85c4d915
Simplify wycheproof pytest code ( #5579 )
2020-11-20 11:22:47 -06:00
Alex Gaynor
60aa04481f
Paint it Black by the Rolling Stones ( #5324 )
2020-07-20 13:06:29 -05:00
Alex Gaynor
ebb04592d2
Refs #5075 -- use hkdf_*.json from wycheproof ( #5190 )
2020-04-12 09:58:07 -05:00
Torin Carey
e94a9f493b
Replace floating point arithmetic with integer arithmetic ( #5181 )
2020-04-04 17:30:59 -04:00
Mads Jensen
1340c0080c
Use dict literals. ( #5080 )
2019-12-02 08:02:30 -06:00
Alex Gaynor
ac1d13f43d
Simplify string formatting ( #4757 )
2019-02-20 12:38:32 +08:00
Paul Kehrer
5fe88ea050
shake128/256 support ( #4611 )
...
* shake128/256 support
* remove block_size
* doc an exception
* change how we detect XOF by adding _xof attribute
* interface!
* review feedback
2019-01-19 00:52:43 -06:00
Alex Gaynor
f7567f6207
HTTPS a bunch of links in random places ( #4666 )
...
* HTTPS a bunch of links in random places
* What the heck happened here?
2018-12-31 10:10:09 -06:00
Paul Kehrer
0322962e14
update pytest config ( #4463 )
...
* update pytest config
pytest 3.8.0 was just released and officially deprecates some of the way
we do pytest marks. They introduced a new way to do this in 3.6 so this
PR switches to that mechanism and updates our minimum pytest requirement
* update the stubs
* also update wycheproof test config to remove deprecated paths
* don't need this any more
2018-09-06 23:56:46 -04:00
Alex Gaynor
feb134586e
Refs #3331 -- integrated wycheproof ECDH tests ( #4354 )
...
* Refs #3331 -- integrated wycheproof ECDH tests
* flake8 + missing assert
* Handle this error case
* skip on unsupported
* shouldn't need to try here any more
2018-07-18 18:20:48 +08:00
Alex Gaynor
2e85a925b4
Refs #3331 -- added initial wycheproof integration, starting with x25519, rsa, and keywrap ( #4310 )
...
* Refs #3331 -- added initial wycheproof integration, starting with x25519 tests
2018-07-16 20:48:33 +05:30
Paul Kehrer
47a66f19bd
Allow DSA q=224 ( #4147 )
...
* load Q=224 vectors
* DSA parameters should support 224 for q length
* oxford comma
2018-03-18 10:12:14 -04:00
Alex Gaynor
a87daea52b
Debian sid is python3.6 now ( #3968 )
...
* Debian sid is python3.6 now
* Workaround because apparently measuring coverage correctly isn't a legitimate use case
2017-10-12 09:36:30 +08:00
Paul Kehrer
33a41e75d2
implement CCM vector parser ( #3699 )
2017-06-21 07:39:20 -04:00
Paul Kehrer
a923b005a1
ed25519 vector loader ( #3707 )
...
* ed25519 vector loader
* refactor to use unpacking
2017-06-20 07:12:35 -04:00
Alex Gaynor
e6055fbfb2
call check_backend_support directly from backend fixture ( #3666 )
2017-06-03 16:02:50 -10:00
Alex Gaynor
133a17971a
Switched our backend to be a normal fixture in tests ( #3665 )
2017-06-03 14:38:22 -10:00
Alex Gaynor
f9b3b1592d
Delete some code ( #3563 )
...
* Delete some code
* removed import
* delete more code
2017-05-20 18:36:19 -07:00
Jared
cd258d531c
Adding CAVP vector parsing for NIST SP 800-108 KDF vectors. ( #2865 )
2016-04-13 16:03:52 -05:00
Simo Sorce
6e3b155bb6
Fix load_kasvs_ecdh_vectors() COUNT sourcing
...
COUNT is a decimal number in test files, but was erroneously read
and converted as if the source was a hexadecimal number.
Fix the loader and test the fix.
Signed-off-by: Simo Sorce <simo@redhat.com>
2015-10-13 14:50:17 -04:00
Alex Gaynor
ace036dc67
Some cleanups
2015-09-24 20:23:08 -04:00
Simo Sorce
7600dee648
Add vector loader for X9.63 vectors
...
Signed-off-by: Simo Sorce <simo@redhat.com>
2015-09-24 19:38:41 -04:00
Paul Kehrer
b60b8dd645
remove some more branching in the vector loaders
2015-08-01 19:50:15 +01:00
Alex Gaynor
50ebb48985
fixed tests
2015-07-02 00:21:41 -04:00
Alex Gaynor
be28a243b2
Improved coverage for tests, handle multiple pytest.mark.supported decorators on one function
2015-07-02 00:05:49 -04:00
Alex Gaynor
0fe7db62cd
fix
2015-06-27 17:20:59 -04:00
Alex Gaynor
ece3872d09
Simplified code in the test loaders and improved branch coverage in the x509 tests
2015-06-27 17:19:30 -04:00
Simo Sorce
83e563e6a8
Modify ECDH Test vector loader for KDF vectors
...
Also add tests for the new vectors
Signed-off-by: Simo Sorce <simo@redhat.com>
2015-05-06 16:37:44 -04:00
Paul Kehrer
18bba8437f
Merge pull request #1876 from simo5/ECDH
...
Add loader for ECDH test vectors
2015-05-06 00:49:28 -05:00
Alex Stapleton
f6a1cf6ba4
Support loading of SECP256K1 vectors
2015-05-03 12:42:11 +01:00
Simo Sorce
917addbb06
Add loader for ECDH test vectors
...
Also fix test vector files, they had a truncated line for the EE set in
both init and resp files.
Signed-off-by: Simo Sorce <simo@redhat.com>
2015-05-01 15:58:35 -04:00
Alex Gaynor
e0a879f72f
Fixed new flake8 warnings from teh latest version
2015-02-15 20:54:34 -08:00