Commit Graph

34 Commits (b2abccafa6dc007fd4d3de60c83bc8f1a857e885)

Author SHA1 Message Date
Bogdan Opanchuk 4e0b6a54fe Remove Point.from_affine(), add a check for calling to_affine() on the identity point 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk 48c3441344 Style fixes + pylint config 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk 9570035582 Move backend-related parts of signing to the openssl module 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk 89e6ea1063 Leave only secp256k1 as a supported curve 2021-05-26 22:13:43 -07:00
Bogdan Opanchuk 503a1c6a18 Always set constant time operations for OpenSSL bignums
set_consttime_flag was always True anyway
2021-04-12 22:00:40 -07:00
Bogdan Opanchuk a7f4a7a634 Fix logic in bn_from_bytes(..., apply_modulus=True) 2021-04-12 21:55:26 -07:00
Bogdan Opanchuk f58a2580dc curve_scalar: don't check range in __init__, only in publicly used constructors 2021-03-28 12:51:45 -07:00
Bogdan Opanchuk d532ef1383 Move all OpenSSL stuff into one module, move around some low-level details 2021-03-28 12:51:45 -07:00
Bogdan Opanchuk f33431d92a Working secret & public keys 2021-03-28 12:51:45 -07:00
Bogdan Opanchuk bbf168e08b Clean slate 2021-03-18 11:53:52 -07:00
David Núñez af0fb2d028 Remove copyright notice from individual files 2019-02-22 11:07:19 +01:00
David Núñez 1a47ce8493 Use number of bytes returned by BN_bn2bin as ffi.buffer size
The problem is that ffi.buffer fills memory "justified to the left", so e.g., if the BN is 1, the buffer is 010000....00, and we want 00...000001
2018-08-06 20:29:04 -05:00
David Núñez 841719c28e Added openssl._bn_to_bytes, to transform BIGNUMs to bytes 2018-08-06 20:29:04 -05:00
David Núñez 92034134ca Make openssl._bytes_to_bn curve-agnostic 2018-08-06 20:29:04 -05:00
David Núñez e1728149f7 Additional size checks in the input of openssl._bytes_to_bn 2018-08-06 20:29:04 -05:00
David Núñez 7e1565ee54 Introduce openssl._bytes_to_bn method 2018-08-06 20:29:04 -05:00
tuxxy d9caff48f8 Add license headers 2018-07-25 11:55:12 -06:00
Kieran Prasch 12fc13c9a3 Reflow curve interface 2018-07-19 15:41:25 -07:00
Kieran Prasch befb0c30d7 skip openssl type checks; update mypy ini config. 2018-07-09 12:13:40 -06:00
tuxxy a717a87384 Use singleton model for curves; allow users to import instances 2018-07-07 13:56:07 -06:00
tuxxy e2d1352abf Refactor openssl, point, etc to use a single curve object -- fixes memory leak 2018-07-07 13:56:07 -06:00
tuxxy ac0e65b5e3 Make test_capsule_correctness work 2018-07-07 13:56:07 -06:00
tuxxy 41cb180fe1 Make the tests run in a failing state, but runnable 2018-07-07 13:56:06 -06:00
tuxxy 10bd7a9614 Add whitelist Curve objects 2018-07-07 13:56:06 -06:00
David Núñez e4311fc676
Merge pull request #149 from cygnusv/point_size
Improved Point deserialization
2018-05-29 22:27:57 +02:00
tuxxy 32792e378c Free OpenSSL BIGNUM in _bn_is_on_curve 2018-05-28 13:54:27 -06:00
tuxxy d53848ed1f Free the EC_POINT OpenSSL struct when returning the generator of a group 2018-05-28 11:35:10 -06:00
David Núñez cfd5b6b668 Adds utils.get_field_order_size_in_bytes and openssl.get_ec_group_degree 2018-05-25 11:49:36 +02:00
tuxxy d3919ecdf6 Move try/finally outside of with; is_consttime -> set_consttime_flag; Make docstrings more clear 2018-05-01 18:14:25 -06:00
tuxxy b16ea6f303 Make _tmp_bn_mont_ctx only return a BN_MONT_CTX 2018-05-01 17:58:17 -06:00
tuxxy b926f7ccc8 Add docstrings for constant time operations 2018-05-01 17:58:17 -06:00
tuxxy e7fe202a92 Add consttime flag when creating new BNs 2018-05-01 17:58:17 -06:00
tuxxy 96d6b553a1 Make openssl _bn_is_on_curve vars more clear; check if randomly generated bn is on curve; update CurveBN docstring 2018-05-01 17:58:17 -06:00
tuxxy 861a1a2be2 Create openssl module and add OpenSSL helper utilities
Use BN_cmp instead of BN_is_zero since it's not exposed

Add EC_POINT operations to openssl module
2018-05-01 17:58:17 -06:00