coinex-api 0.0.6__py3-none-any.whl → 0.0.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {coinex_api-0.0.6.dist-info → coinex_api-0.0.8.dist-info}/METADATA +33 -14
- coinex_api-0.0.8.dist-info/RECORD +3 -0
- coinex_api/__init__.py +0 -7
- coinex_api/ccxt/__init__.py +0 -101
- coinex_api/ccxt/abstract/coinex.py +0 -237
- coinex_api/ccxt/async_support/__init__.py +0 -80
- coinex_api/ccxt/async_support/base/__init__.py +0 -1
- coinex_api/ccxt/async_support/base/exchange.py +0 -2100
- coinex_api/ccxt/async_support/base/throttler.py +0 -50
- coinex_api/ccxt/async_support/base/ws/__init__.py +0 -38
- coinex_api/ccxt/async_support/base/ws/aiohttp_client.py +0 -147
- coinex_api/ccxt/async_support/base/ws/cache.py +0 -213
- coinex_api/ccxt/async_support/base/ws/client.py +0 -214
- coinex_api/ccxt/async_support/base/ws/fast_client.py +0 -97
- coinex_api/ccxt/async_support/base/ws/functions.py +0 -59
- coinex_api/ccxt/async_support/base/ws/future.py +0 -69
- coinex_api/ccxt/async_support/base/ws/order_book.py +0 -78
- coinex_api/ccxt/async_support/base/ws/order_book_side.py +0 -174
- coinex_api/ccxt/async_support/coinex.py +0 -5833
- coinex_api/ccxt/base/__init__.py +0 -27
- coinex_api/ccxt/base/decimal_to_precision.py +0 -174
- coinex_api/ccxt/base/errors.py +0 -267
- coinex_api/ccxt/base/exchange.py +0 -6770
- coinex_api/ccxt/base/precise.py +0 -297
- coinex_api/ccxt/base/types.py +0 -577
- coinex_api/ccxt/coinex.py +0 -5832
- coinex_api/ccxt/pro/__init__.py +0 -21
- coinex_api/ccxt/pro/coinex.py +0 -1366
- coinex_api/ccxt/static_dependencies/README.md +0 -1
- coinex_api/ccxt/static_dependencies/__init__.py +0 -1
- coinex_api/ccxt/static_dependencies/ecdsa/__init__.py +0 -14
- coinex_api/ccxt/static_dependencies/ecdsa/_version.py +0 -520
- coinex_api/ccxt/static_dependencies/ecdsa/curves.py +0 -56
- coinex_api/ccxt/static_dependencies/ecdsa/der.py +0 -221
- coinex_api/ccxt/static_dependencies/ecdsa/ecdsa.py +0 -310
- coinex_api/ccxt/static_dependencies/ecdsa/ellipticcurve.py +0 -197
- coinex_api/ccxt/static_dependencies/ecdsa/keys.py +0 -332
- coinex_api/ccxt/static_dependencies/ecdsa/numbertheory.py +0 -531
- coinex_api/ccxt/static_dependencies/ecdsa/rfc6979.py +0 -100
- coinex_api/ccxt/static_dependencies/ecdsa/util.py +0 -266
- coinex_api/ccxt/static_dependencies/ethereum/__init__.py +0 -7
- coinex_api/ccxt/static_dependencies/ethereum/abi/__init__.py +0 -16
- coinex_api/ccxt/static_dependencies/ethereum/abi/abi.py +0 -19
- coinex_api/ccxt/static_dependencies/ethereum/abi/base.py +0 -152
- coinex_api/ccxt/static_dependencies/ethereum/abi/codec.py +0 -217
- coinex_api/ccxt/static_dependencies/ethereum/abi/constants.py +0 -3
- coinex_api/ccxt/static_dependencies/ethereum/abi/decoding.py +0 -565
- coinex_api/ccxt/static_dependencies/ethereum/abi/encoding.py +0 -720
- coinex_api/ccxt/static_dependencies/ethereum/abi/exceptions.py +0 -139
- coinex_api/ccxt/static_dependencies/ethereum/abi/grammar.py +0 -443
- coinex_api/ccxt/static_dependencies/ethereum/abi/packed.py +0 -13
- coinex_api/ccxt/static_dependencies/ethereum/abi/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/ethereum/abi/registry.py +0 -643
- coinex_api/ccxt/static_dependencies/ethereum/abi/tools/__init__.py +0 -3
- coinex_api/ccxt/static_dependencies/ethereum/abi/tools/_strategies.py +0 -230
- coinex_api/ccxt/static_dependencies/ethereum/abi/utils/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/ethereum/abi/utils/numeric.py +0 -83
- coinex_api/ccxt/static_dependencies/ethereum/abi/utils/padding.py +0 -27
- coinex_api/ccxt/static_dependencies/ethereum/abi/utils/string.py +0 -19
- coinex_api/ccxt/static_dependencies/ethereum/account/__init__.py +0 -3
- coinex_api/ccxt/static_dependencies/ethereum/account/encode_typed_data/__init__.py +0 -4
- coinex_api/ccxt/static_dependencies/ethereum/account/encode_typed_data/encoding_and_hashing.py +0 -239
- coinex_api/ccxt/static_dependencies/ethereum/account/encode_typed_data/helpers.py +0 -40
- coinex_api/ccxt/static_dependencies/ethereum/account/messages.py +0 -263
- coinex_api/ccxt/static_dependencies/ethereum/account/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/ethereum/hexbytes/__init__.py +0 -5
- coinex_api/ccxt/static_dependencies/ethereum/hexbytes/_utils.py +0 -54
- coinex_api/ccxt/static_dependencies/ethereum/hexbytes/main.py +0 -65
- coinex_api/ccxt/static_dependencies/ethereum/hexbytes/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/ethereum/typing/__init__.py +0 -63
- coinex_api/ccxt/static_dependencies/ethereum/typing/abi.py +0 -6
- coinex_api/ccxt/static_dependencies/ethereum/typing/bls.py +0 -7
- coinex_api/ccxt/static_dependencies/ethereum/typing/discovery.py +0 -5
- coinex_api/ccxt/static_dependencies/ethereum/typing/encoding.py +0 -7
- coinex_api/ccxt/static_dependencies/ethereum/typing/enums.py +0 -17
- coinex_api/ccxt/static_dependencies/ethereum/typing/ethpm.py +0 -9
- coinex_api/ccxt/static_dependencies/ethereum/typing/evm.py +0 -20
- coinex_api/ccxt/static_dependencies/ethereum/typing/networks.py +0 -1122
- coinex_api/ccxt/static_dependencies/ethereum/typing/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/ethereum/utils/__init__.py +0 -115
- coinex_api/ccxt/static_dependencies/ethereum/utils/abi.py +0 -72
- coinex_api/ccxt/static_dependencies/ethereum/utils/address.py +0 -171
- coinex_api/ccxt/static_dependencies/ethereum/utils/applicators.py +0 -151
- coinex_api/ccxt/static_dependencies/ethereum/utils/conversions.py +0 -190
- coinex_api/ccxt/static_dependencies/ethereum/utils/currency.py +0 -107
- coinex_api/ccxt/static_dependencies/ethereum/utils/curried/__init__.py +0 -269
- coinex_api/ccxt/static_dependencies/ethereum/utils/debug.py +0 -20
- coinex_api/ccxt/static_dependencies/ethereum/utils/decorators.py +0 -132
- coinex_api/ccxt/static_dependencies/ethereum/utils/encoding.py +0 -6
- coinex_api/ccxt/static_dependencies/ethereum/utils/exceptions.py +0 -4
- coinex_api/ccxt/static_dependencies/ethereum/utils/functional.py +0 -75
- coinex_api/ccxt/static_dependencies/ethereum/utils/hexadecimal.py +0 -74
- coinex_api/ccxt/static_dependencies/ethereum/utils/humanize.py +0 -188
- coinex_api/ccxt/static_dependencies/ethereum/utils/logging.py +0 -159
- coinex_api/ccxt/static_dependencies/ethereum/utils/module_loading.py +0 -31
- coinex_api/ccxt/static_dependencies/ethereum/utils/numeric.py +0 -43
- coinex_api/ccxt/static_dependencies/ethereum/utils/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/ethereum/utils/toolz.py +0 -76
- coinex_api/ccxt/static_dependencies/ethereum/utils/types.py +0 -54
- coinex_api/ccxt/static_dependencies/ethereum/utils/typing/__init__.py +0 -18
- coinex_api/ccxt/static_dependencies/ethereum/utils/typing/misc.py +0 -14
- coinex_api/ccxt/static_dependencies/ethereum/utils/units.py +0 -31
- coinex_api/ccxt/static_dependencies/keccak/__init__.py +0 -3
- coinex_api/ccxt/static_dependencies/keccak/keccak.py +0 -197
- coinex_api/ccxt/static_dependencies/lark/__init__.py +0 -38
- coinex_api/ccxt/static_dependencies/lark/__pyinstaller/__init__.py +0 -6
- coinex_api/ccxt/static_dependencies/lark/__pyinstaller/hook-lark.py +0 -14
- coinex_api/ccxt/static_dependencies/lark/ast_utils.py +0 -59
- coinex_api/ccxt/static_dependencies/lark/common.py +0 -86
- coinex_api/ccxt/static_dependencies/lark/exceptions.py +0 -292
- coinex_api/ccxt/static_dependencies/lark/grammar.py +0 -130
- coinex_api/ccxt/static_dependencies/lark/grammars/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/lark/grammars/common.lark +0 -59
- coinex_api/ccxt/static_dependencies/lark/grammars/lark.lark +0 -62
- coinex_api/ccxt/static_dependencies/lark/grammars/python.lark +0 -302
- coinex_api/ccxt/static_dependencies/lark/grammars/unicode.lark +0 -7
- coinex_api/ccxt/static_dependencies/lark/indenter.py +0 -143
- coinex_api/ccxt/static_dependencies/lark/lark.py +0 -658
- coinex_api/ccxt/static_dependencies/lark/lexer.py +0 -678
- coinex_api/ccxt/static_dependencies/lark/load_grammar.py +0 -1428
- coinex_api/ccxt/static_dependencies/lark/parse_tree_builder.py +0 -391
- coinex_api/ccxt/static_dependencies/lark/parser_frontends.py +0 -257
- coinex_api/ccxt/static_dependencies/lark/parsers/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/lark/parsers/cyk.py +0 -340
- coinex_api/ccxt/static_dependencies/lark/parsers/earley.py +0 -314
- coinex_api/ccxt/static_dependencies/lark/parsers/earley_common.py +0 -42
- coinex_api/ccxt/static_dependencies/lark/parsers/earley_forest.py +0 -801
- coinex_api/ccxt/static_dependencies/lark/parsers/grammar_analysis.py +0 -203
- coinex_api/ccxt/static_dependencies/lark/parsers/lalr_analysis.py +0 -332
- coinex_api/ccxt/static_dependencies/lark/parsers/lalr_interactive_parser.py +0 -158
- coinex_api/ccxt/static_dependencies/lark/parsers/lalr_parser.py +0 -122
- coinex_api/ccxt/static_dependencies/lark/parsers/lalr_parser_state.py +0 -110
- coinex_api/ccxt/static_dependencies/lark/parsers/xearley.py +0 -165
- coinex_api/ccxt/static_dependencies/lark/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/lark/reconstruct.py +0 -107
- coinex_api/ccxt/static_dependencies/lark/tools/__init__.py +0 -70
- coinex_api/ccxt/static_dependencies/lark/tools/nearley.py +0 -202
- coinex_api/ccxt/static_dependencies/lark/tools/serialize.py +0 -32
- coinex_api/ccxt/static_dependencies/lark/tools/standalone.py +0 -196
- coinex_api/ccxt/static_dependencies/lark/tree.py +0 -267
- coinex_api/ccxt/static_dependencies/lark/tree_matcher.py +0 -186
- coinex_api/ccxt/static_dependencies/lark/tree_templates.py +0 -180
- coinex_api/ccxt/static_dependencies/lark/utils.py +0 -343
- coinex_api/ccxt/static_dependencies/lark/visitors.py +0 -596
- coinex_api/ccxt/static_dependencies/marshmallow/__init__.py +0 -81
- coinex_api/ccxt/static_dependencies/marshmallow/base.py +0 -65
- coinex_api/ccxt/static_dependencies/marshmallow/class_registry.py +0 -94
- coinex_api/ccxt/static_dependencies/marshmallow/decorators.py +0 -231
- coinex_api/ccxt/static_dependencies/marshmallow/error_store.py +0 -60
- coinex_api/ccxt/static_dependencies/marshmallow/exceptions.py +0 -71
- coinex_api/ccxt/static_dependencies/marshmallow/fields.py +0 -2114
- coinex_api/ccxt/static_dependencies/marshmallow/orderedset.py +0 -89
- coinex_api/ccxt/static_dependencies/marshmallow/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/marshmallow/schema.py +0 -1228
- coinex_api/ccxt/static_dependencies/marshmallow/types.py +0 -12
- coinex_api/ccxt/static_dependencies/marshmallow/utils.py +0 -378
- coinex_api/ccxt/static_dependencies/marshmallow/validate.py +0 -678
- coinex_api/ccxt/static_dependencies/marshmallow/warnings.py +0 -2
- coinex_api/ccxt/static_dependencies/marshmallow_dataclass/__init__.py +0 -1047
- coinex_api/ccxt/static_dependencies/marshmallow_dataclass/collection_field.py +0 -51
- coinex_api/ccxt/static_dependencies/marshmallow_dataclass/lazy_class_attribute.py +0 -45
- coinex_api/ccxt/static_dependencies/marshmallow_dataclass/mypy.py +0 -71
- coinex_api/ccxt/static_dependencies/marshmallow_dataclass/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/marshmallow_dataclass/typing.py +0 -14
- coinex_api/ccxt/static_dependencies/marshmallow_dataclass/union_field.py +0 -82
- coinex_api/ccxt/static_dependencies/marshmallow_oneofschema/__init__.py +0 -1
- coinex_api/ccxt/static_dependencies/marshmallow_oneofschema/one_of_schema.py +0 -193
- coinex_api/ccxt/static_dependencies/marshmallow_oneofschema/py.typed +0 -0
- coinex_api/ccxt/static_dependencies/msgpack/__init__.py +0 -55
- coinex_api/ccxt/static_dependencies/msgpack/_cmsgpack.pyx +0 -11
- coinex_api/ccxt/static_dependencies/msgpack/_packer.pyx +0 -374
- coinex_api/ccxt/static_dependencies/msgpack/_unpacker.pyx +0 -547
- coinex_api/ccxt/static_dependencies/msgpack/buff_converter.h +0 -8
- coinex_api/ccxt/static_dependencies/msgpack/exceptions.py +0 -48
- coinex_api/ccxt/static_dependencies/msgpack/ext.py +0 -168
- coinex_api/ccxt/static_dependencies/msgpack/fallback.py +0 -951
- coinex_api/ccxt/static_dependencies/msgpack/pack.h +0 -89
- coinex_api/ccxt/static_dependencies/msgpack/pack_template.h +0 -820
- coinex_api/ccxt/static_dependencies/msgpack/sysdep.h +0 -194
- coinex_api/ccxt/static_dependencies/msgpack/unpack.h +0 -391
- coinex_api/ccxt/static_dependencies/msgpack/unpack_define.h +0 -95
- coinex_api/ccxt/static_dependencies/msgpack/unpack_template.h +0 -464
- coinex_api/ccxt/static_dependencies/parsimonious/__init__.py +0 -10
- coinex_api/ccxt/static_dependencies/parsimonious/exceptions.py +0 -105
- coinex_api/ccxt/static_dependencies/parsimonious/expressions.py +0 -479
- coinex_api/ccxt/static_dependencies/parsimonious/grammar.py +0 -487
- coinex_api/ccxt/static_dependencies/parsimonious/nodes.py +0 -325
- coinex_api/ccxt/static_dependencies/parsimonious/utils.py +0 -40
- coinex_api/ccxt/static_dependencies/starknet/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starknet/abi/v0/__init__.py +0 -2
- coinex_api/ccxt/static_dependencies/starknet/abi/v0/model.py +0 -44
- coinex_api/ccxt/static_dependencies/starknet/abi/v0/parser.py +0 -216
- coinex_api/ccxt/static_dependencies/starknet/abi/v0/schemas.py +0 -72
- coinex_api/ccxt/static_dependencies/starknet/abi/v0/shape.py +0 -63
- coinex_api/ccxt/static_dependencies/starknet/abi/v1/__init__.py +0 -2
- coinex_api/ccxt/static_dependencies/starknet/abi/v1/core_structures.json +0 -14
- coinex_api/ccxt/static_dependencies/starknet/abi/v1/model.py +0 -39
- coinex_api/ccxt/static_dependencies/starknet/abi/v1/parser.py +0 -220
- coinex_api/ccxt/static_dependencies/starknet/abi/v1/parser_transformer.py +0 -179
- coinex_api/ccxt/static_dependencies/starknet/abi/v1/schemas.py +0 -66
- coinex_api/ccxt/static_dependencies/starknet/abi/v1/shape.py +0 -47
- coinex_api/ccxt/static_dependencies/starknet/abi/v2/__init__.py +0 -2
- coinex_api/ccxt/static_dependencies/starknet/abi/v2/model.py +0 -89
- coinex_api/ccxt/static_dependencies/starknet/abi/v2/parser.py +0 -293
- coinex_api/ccxt/static_dependencies/starknet/abi/v2/parser_transformer.py +0 -192
- coinex_api/ccxt/static_dependencies/starknet/abi/v2/schemas.py +0 -132
- coinex_api/ccxt/static_dependencies/starknet/abi/v2/shape.py +0 -107
- coinex_api/ccxt/static_dependencies/starknet/cairo/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starknet/cairo/data_types.py +0 -123
- coinex_api/ccxt/static_dependencies/starknet/cairo/deprecated_parse/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starknet/cairo/deprecated_parse/cairo_types.py +0 -77
- coinex_api/ccxt/static_dependencies/starknet/cairo/deprecated_parse/parser.py +0 -46
- coinex_api/ccxt/static_dependencies/starknet/cairo/deprecated_parse/parser_transformer.py +0 -138
- coinex_api/ccxt/static_dependencies/starknet/cairo/felt.py +0 -64
- coinex_api/ccxt/static_dependencies/starknet/cairo/type_parser.py +0 -121
- coinex_api/ccxt/static_dependencies/starknet/cairo/v1/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starknet/cairo/v1/type_parser.py +0 -59
- coinex_api/ccxt/static_dependencies/starknet/cairo/v2/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starknet/cairo/v2/type_parser.py +0 -77
- coinex_api/ccxt/static_dependencies/starknet/ccxt_utils.py +0 -7
- coinex_api/ccxt/static_dependencies/starknet/common.py +0 -15
- coinex_api/ccxt/static_dependencies/starknet/constants.py +0 -39
- coinex_api/ccxt/static_dependencies/starknet/hash/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starknet/hash/address.py +0 -79
- coinex_api/ccxt/static_dependencies/starknet/hash/compiled_class_hash_objects.py +0 -111
- coinex_api/ccxt/static_dependencies/starknet/hash/selector.py +0 -16
- coinex_api/ccxt/static_dependencies/starknet/hash/storage.py +0 -12
- coinex_api/ccxt/static_dependencies/starknet/hash/utils.py +0 -78
- coinex_api/ccxt/static_dependencies/starknet/models/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starknet/models/typed_data.py +0 -45
- coinex_api/ccxt/static_dependencies/starknet/serialization/__init__.py +0 -24
- coinex_api/ccxt/static_dependencies/starknet/serialization/_calldata_reader.py +0 -40
- coinex_api/ccxt/static_dependencies/starknet/serialization/_context.py +0 -142
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/__init__.py +0 -10
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/_common.py +0 -82
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/array_serializer.py +0 -43
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/bool_serializer.py +0 -37
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/byte_array_serializer.py +0 -66
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/cairo_data_serializer.py +0 -71
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/enum_serializer.py +0 -71
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/felt_serializer.py +0 -50
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/named_tuple_serializer.py +0 -58
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/option_serializer.py +0 -43
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/output_serializer.py +0 -40
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/payload_serializer.py +0 -72
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/struct_serializer.py +0 -36
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/tuple_serializer.py +0 -36
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/uint256_serializer.py +0 -76
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/uint_serializer.py +0 -100
- coinex_api/ccxt/static_dependencies/starknet/serialization/data_serializers/unit_serializer.py +0 -32
- coinex_api/ccxt/static_dependencies/starknet/serialization/errors.py +0 -10
- coinex_api/ccxt/static_dependencies/starknet/serialization/factory.py +0 -229
- coinex_api/ccxt/static_dependencies/starknet/serialization/function_serialization_adapter.py +0 -110
- coinex_api/ccxt/static_dependencies/starknet/serialization/tuple_dataclass.py +0 -59
- coinex_api/ccxt/static_dependencies/starknet/utils/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starknet/utils/constructor_args_translator.py +0 -86
- coinex_api/ccxt/static_dependencies/starknet/utils/iterable.py +0 -13
- coinex_api/ccxt/static_dependencies/starknet/utils/schema.py +0 -13
- coinex_api/ccxt/static_dependencies/starknet/utils/typed_data.py +0 -182
- coinex_api/ccxt/static_dependencies/starkware/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starkware/crypto/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/starkware/crypto/fast_pedersen_hash.py +0 -50
- coinex_api/ccxt/static_dependencies/starkware/crypto/math_utils.py +0 -78
- coinex_api/ccxt/static_dependencies/starkware/crypto/signature.py +0 -2344
- coinex_api/ccxt/static_dependencies/starkware/crypto/utils.py +0 -63
- coinex_api/ccxt/static_dependencies/sympy/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/sympy/core/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/sympy/core/intfunc.py +0 -35
- coinex_api/ccxt/static_dependencies/sympy/external/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/sympy/external/gmpy.py +0 -345
- coinex_api/ccxt/static_dependencies/sympy/external/importtools.py +0 -187
- coinex_api/ccxt/static_dependencies/sympy/external/ntheory.py +0 -637
- coinex_api/ccxt/static_dependencies/sympy/external/pythonmpq.py +0 -341
- coinex_api/ccxt/static_dependencies/toolz/__init__.py +0 -26
- coinex_api/ccxt/static_dependencies/toolz/_signatures.py +0 -784
- coinex_api/ccxt/static_dependencies/toolz/_version.py +0 -520
- coinex_api/ccxt/static_dependencies/toolz/compatibility.py +0 -30
- coinex_api/ccxt/static_dependencies/toolz/curried/__init__.py +0 -101
- coinex_api/ccxt/static_dependencies/toolz/curried/exceptions.py +0 -22
- coinex_api/ccxt/static_dependencies/toolz/curried/operator.py +0 -22
- coinex_api/ccxt/static_dependencies/toolz/dicttoolz.py +0 -339
- coinex_api/ccxt/static_dependencies/toolz/functoolz.py +0 -1049
- coinex_api/ccxt/static_dependencies/toolz/itertoolz.py +0 -1057
- coinex_api/ccxt/static_dependencies/toolz/recipes.py +0 -46
- coinex_api/ccxt/static_dependencies/toolz/utils.py +0 -9
- coinex_api/ccxt/static_dependencies/typing_inspect/__init__.py +0 -0
- coinex_api/ccxt/static_dependencies/typing_inspect/typing_inspect.py +0 -851
- coinex_api-0.0.6.dist-info/RECORD +0 -288
- {coinex_api-0.0.6.dist-info → coinex_api-0.0.8.dist-info}/WHEEL +0 -0
@@ -1,221 +0,0 @@
|
|
1
|
-
from __future__ import division
|
2
|
-
|
3
|
-
import binascii
|
4
|
-
import base64
|
5
|
-
|
6
|
-
|
7
|
-
class UnexpectedDER(Exception):
|
8
|
-
pass
|
9
|
-
|
10
|
-
|
11
|
-
def encode_constructed(tag, value):
|
12
|
-
return int.to_bytes(0xa0+tag, 1, 'big') + encode_length(len(value)) + value
|
13
|
-
|
14
|
-
|
15
|
-
def encode_integer(r):
|
16
|
-
assert r >= 0 # can't support negative numbers yet
|
17
|
-
h = ("%x" % r).encode()
|
18
|
-
if len(h) % 2:
|
19
|
-
h = b'0' + h
|
20
|
-
s = binascii.unhexlify(h)
|
21
|
-
num = s[0] if isinstance(s[0], int) else ord(s[0])
|
22
|
-
if num <= 0x7f:
|
23
|
-
return b'\x02' + int.to_bytes(len(s), 1, 'big') + s
|
24
|
-
else:
|
25
|
-
# DER integers are two's complement, so if the first byte is
|
26
|
-
# 0x80-0xff then we need an extra 0x00 byte to prevent it from
|
27
|
-
# looking negative.
|
28
|
-
return b'\x02' + int.to_bytes(len(s)+1, 1, 'big') + b'\x00' + s
|
29
|
-
|
30
|
-
|
31
|
-
def encode_bitstring(s):
|
32
|
-
return b'\x03' + encode_length(len(s)) + s
|
33
|
-
|
34
|
-
|
35
|
-
def encode_octet_string(s):
|
36
|
-
return b'\x04' + encode_length(len(s)) + s
|
37
|
-
|
38
|
-
|
39
|
-
def encode_oid(first, second, *pieces):
|
40
|
-
assert first <= 2
|
41
|
-
assert second <= 39
|
42
|
-
encoded_pieces = [int.to_bytes(40*first+second, 1, 'big')] + [encode_number(p)
|
43
|
-
for p in pieces]
|
44
|
-
body = b''.join(encoded_pieces)
|
45
|
-
return b'\x06' + encode_length(len(body)) + body
|
46
|
-
|
47
|
-
|
48
|
-
def encode_sequence(*encoded_pieces):
|
49
|
-
total_len = sum([len(p) for p in encoded_pieces])
|
50
|
-
return b'\x30' + encode_length(total_len) + b''.join(encoded_pieces)
|
51
|
-
|
52
|
-
|
53
|
-
def encode_number(n):
|
54
|
-
b128_digits = []
|
55
|
-
while n:
|
56
|
-
b128_digits.insert(0, (n & 0x7f) | 0x80)
|
57
|
-
n = n >> 7
|
58
|
-
if not b128_digits:
|
59
|
-
b128_digits.append(0)
|
60
|
-
b128_digits[-1] &= 0x7f
|
61
|
-
return b''.join([int.to_bytes(d, 1, 'big') for d in b128_digits])
|
62
|
-
|
63
|
-
|
64
|
-
def remove_constructed(string):
|
65
|
-
s0 = string[0] if isinstance(string[0], int) else ord(string[0])
|
66
|
-
if (s0 & 0xe0) != 0xa0:
|
67
|
-
raise UnexpectedDER("wanted constructed tag (0xa0-0xbf), got 0x%02x"
|
68
|
-
% s0)
|
69
|
-
tag = s0 & 0x1f
|
70
|
-
length, llen = read_length(string[1:])
|
71
|
-
body = string[1+llen:1+llen+length]
|
72
|
-
rest = string[1+llen+length:]
|
73
|
-
return tag, body, rest
|
74
|
-
|
75
|
-
|
76
|
-
def remove_sequence(string):
|
77
|
-
if not string.startswith(b'\x30'):
|
78
|
-
n = string[0] if isinstance(string[0], int) else ord(string[0])
|
79
|
-
raise UnexpectedDER("wanted sequence (0x30), got 0x%02x" % n)
|
80
|
-
length, lengthlength = read_length(string[1:])
|
81
|
-
endseq = 1+lengthlength+length
|
82
|
-
return string[1+lengthlength:endseq], string[endseq:]
|
83
|
-
|
84
|
-
|
85
|
-
def remove_octet_string(string):
|
86
|
-
if not string.startswith(b'\x04'):
|
87
|
-
n = string[0] if isinstance(string[0], int) else ord(string[0])
|
88
|
-
raise UnexpectedDER("wanted octetstring (0x04), got 0x%02x" % n)
|
89
|
-
length, llen = read_length(string[1:])
|
90
|
-
body = string[1+llen:1+llen+length]
|
91
|
-
rest = string[1+llen+length:]
|
92
|
-
return body, rest
|
93
|
-
|
94
|
-
|
95
|
-
def remove_object(string):
|
96
|
-
if not string.startswith(b'\x06'):
|
97
|
-
n = string[0] if isinstance(string[0], int) else ord(string[0])
|
98
|
-
raise UnexpectedDER("wanted object (0x06), got 0x%02x" % n)
|
99
|
-
length, lengthlength = read_length(string[1:])
|
100
|
-
body = string[1+lengthlength:1+lengthlength+length]
|
101
|
-
rest = string[1+lengthlength+length:]
|
102
|
-
numbers = []
|
103
|
-
while body:
|
104
|
-
n, ll = read_number(body)
|
105
|
-
numbers.append(n)
|
106
|
-
body = body[ll:]
|
107
|
-
n0 = numbers.pop(0)
|
108
|
-
first = n0//40
|
109
|
-
second = n0-(40*first)
|
110
|
-
numbers.insert(0, first)
|
111
|
-
numbers.insert(1, second)
|
112
|
-
return tuple(numbers), rest
|
113
|
-
|
114
|
-
|
115
|
-
def remove_integer(string):
|
116
|
-
if not string.startswith(b'\x02'):
|
117
|
-
n = string[0] if isinstance(string[0], int) else ord(string[0])
|
118
|
-
raise UnexpectedDER("wanted integer (0x02), got 0x%02x" % n)
|
119
|
-
length, llen = read_length(string[1:])
|
120
|
-
numberbytes = string[1+llen:1+llen+length]
|
121
|
-
rest = string[1+llen+length:]
|
122
|
-
nbytes = numberbytes[0] if isinstance(numberbytes[0], int) else ord(numberbytes[0])
|
123
|
-
assert nbytes < 0x80 # can't support negative numbers yet
|
124
|
-
return int(binascii.hexlify(numberbytes), 16), rest
|
125
|
-
|
126
|
-
|
127
|
-
def read_number(string):
|
128
|
-
number = 0
|
129
|
-
llen = 0
|
130
|
-
# base-128 big endian, with b7 set in all but the last byte
|
131
|
-
while True:
|
132
|
-
if llen > len(string):
|
133
|
-
raise UnexpectedDER("ran out of length bytes")
|
134
|
-
number = number << 7
|
135
|
-
d = string[llen] if isinstance(string[llen], int) else ord(string[llen])
|
136
|
-
number += (d & 0x7f)
|
137
|
-
llen += 1
|
138
|
-
if not d & 0x80:
|
139
|
-
break
|
140
|
-
return number, llen
|
141
|
-
|
142
|
-
|
143
|
-
def encode_length(l):
|
144
|
-
assert l >= 0
|
145
|
-
if l < 0x80:
|
146
|
-
return int.to_bytes(l, 1, 'big')
|
147
|
-
s = ("%x" % l).encode()
|
148
|
-
if len(s) % 2:
|
149
|
-
s = b'0' + s
|
150
|
-
s = binascii.unhexlify(s)
|
151
|
-
llen = len(s)
|
152
|
-
return int.to_bytes(0x80 | llen, 1, 'big') + s
|
153
|
-
|
154
|
-
|
155
|
-
def read_length(string):
|
156
|
-
num = string[0] if isinstance(string[0], int) else ord(string[0])
|
157
|
-
if not (num & 0x80):
|
158
|
-
# short form
|
159
|
-
return (num & 0x7f), 1
|
160
|
-
# else long-form: b0&0x7f is number of additional base256 length bytes,
|
161
|
-
# big-endian
|
162
|
-
llen = num & 0x7f
|
163
|
-
if llen > len(string)-1:
|
164
|
-
raise UnexpectedDER("ran out of length bytes")
|
165
|
-
return int(binascii.hexlify(string[1:1+llen]), 16), 1+llen
|
166
|
-
|
167
|
-
|
168
|
-
def remove_bitstring(string):
|
169
|
-
num = string[0] if isinstance(string[0], int) else ord(string[0])
|
170
|
-
if not string.startswith(b'\x03'):
|
171
|
-
raise UnexpectedDER("wanted bitstring (0x03), got 0x%02x" % num)
|
172
|
-
length, llen = read_length(string[1:])
|
173
|
-
body = string[1+llen:1+llen+length]
|
174
|
-
rest = string[1+llen+length:]
|
175
|
-
return body, rest
|
176
|
-
|
177
|
-
# SEQUENCE([1, STRING(secexp), cont[0], OBJECT(curvename), cont[1], BINTSTRING)
|
178
|
-
|
179
|
-
|
180
|
-
# signatures: (from RFC3279)
|
181
|
-
# ansi-X9-62 OBJECT IDENTIFIER ::= {
|
182
|
-
# iso(1) member-body(2) us(840) 10045 }
|
183
|
-
#
|
184
|
-
# id-ecSigType OBJECT IDENTIFIER ::= {
|
185
|
-
# ansi-X9-62 signatures(4) }
|
186
|
-
# ecdsa-with-SHA1 OBJECT IDENTIFIER ::= {
|
187
|
-
# id-ecSigType 1 }
|
188
|
-
## so 1,2,840,10045,4,1
|
189
|
-
## so 0x42, .. ..
|
190
|
-
|
191
|
-
# Ecdsa-Sig-Value ::= SEQUENCE {
|
192
|
-
# r INTEGER,
|
193
|
-
# s INTEGER }
|
194
|
-
|
195
|
-
# id-public-key-type OBJECT IDENTIFIER ::= { ansi-X9.62 2 }
|
196
|
-
#
|
197
|
-
# id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 }
|
198
|
-
|
199
|
-
# I think the secp224r1 identifier is (t=06,l=05,v=2b81040021)
|
200
|
-
# secp224r1 OBJECT IDENTIFIER ::= {
|
201
|
-
# iso(1) identified-organization(3) certicom(132) curve(0) 33 }
|
202
|
-
# and the secp384r1 is (t=06,l=05,v=2b81040022)
|
203
|
-
# secp384r1 OBJECT IDENTIFIER ::= {
|
204
|
-
# iso(1) identified-organization(3) certicom(132) curve(0) 34 }
|
205
|
-
|
206
|
-
def unpem(pem):
|
207
|
-
if isinstance(pem, str):
|
208
|
-
pem = pem.encode()
|
209
|
-
|
210
|
-
d = b''.join([l.strip() for l in pem.split(b'\n')
|
211
|
-
if l and not l.startswith(b'-----')])
|
212
|
-
return base64.b64decode(d)
|
213
|
-
|
214
|
-
|
215
|
-
def topem(der, name):
|
216
|
-
b64 = base64.b64encode(der)
|
217
|
-
lines = [("-----BEGIN %s-----\n" % name).encode()]
|
218
|
-
lines.extend([b64[start:start+64]+b'\n'
|
219
|
-
for start in range(0, len(b64), 64)])
|
220
|
-
lines.append(("-----END %s-----\n" % name).encode())
|
221
|
-
return b''.join(lines)
|
@@ -1,310 +0,0 @@
|
|
1
|
-
#! /usr/bin/env python
|
2
|
-
|
3
|
-
"""
|
4
|
-
Implementation of Elliptic-Curve Digital Signatures.
|
5
|
-
|
6
|
-
Classes and methods for elliptic-curve signatures:
|
7
|
-
private keys, public keys, signatures,
|
8
|
-
NIST prime-modulus curves with modulus lengths of
|
9
|
-
192, 224, 256, 384, and 521 bits.
|
10
|
-
|
11
|
-
Example:
|
12
|
-
|
13
|
-
# (In real-life applications, you would probably want to
|
14
|
-
# protect against defects in SystemRandom.)
|
15
|
-
from random import SystemRandom
|
16
|
-
randrange = SystemRandom().randrange
|
17
|
-
|
18
|
-
# Generate a public/private key pair using the NIST Curve P-192:
|
19
|
-
|
20
|
-
g = generator_192
|
21
|
-
n = g.order()
|
22
|
-
secret = randrange( 1, n )
|
23
|
-
pubkey = Public_key( g, g * secret )
|
24
|
-
privkey = Private_key( pubkey, secret )
|
25
|
-
|
26
|
-
# Signing a hash value:
|
27
|
-
|
28
|
-
hash = randrange( 1, n )
|
29
|
-
signature = privkey.sign( hash, randrange( 1, n ) )
|
30
|
-
|
31
|
-
# Verifying a signature for a hash value:
|
32
|
-
|
33
|
-
if pubkey.verifies( hash, signature ):
|
34
|
-
print_("Demo verification succeeded.")
|
35
|
-
else:
|
36
|
-
print_("*** Demo verification failed.")
|
37
|
-
|
38
|
-
# Verification fails if the hash value is modified:
|
39
|
-
|
40
|
-
if pubkey.verifies( hash-1, signature ):
|
41
|
-
print_("**** Demo verification failed to reject tampered hash.")
|
42
|
-
else:
|
43
|
-
print_("Demo verification correctly rejected tampered hash.")
|
44
|
-
|
45
|
-
Version of 2009.05.16.
|
46
|
-
|
47
|
-
Revision history:
|
48
|
-
2005.12.31 - Initial version.
|
49
|
-
2008.11.25 - Substantial revisions introducing new classes.
|
50
|
-
2009.05.16 - Warn against using random.randrange in real applications.
|
51
|
-
2009.05.17 - Use random.SystemRandom by default.
|
52
|
-
|
53
|
-
Written in 2005 by Peter Pearson and placed in the public domain.
|
54
|
-
"""
|
55
|
-
|
56
|
-
from . import ellipticcurve
|
57
|
-
from . import numbertheory
|
58
|
-
|
59
|
-
|
60
|
-
class RSZeroError(RuntimeError):
|
61
|
-
pass
|
62
|
-
|
63
|
-
|
64
|
-
class Signature(object):
|
65
|
-
"""ECDSA signature.
|
66
|
-
"""
|
67
|
-
|
68
|
-
def __init__(self, r, s, recovery_param):
|
69
|
-
self.r = r
|
70
|
-
self.s = s
|
71
|
-
self.recovery_param = recovery_param
|
72
|
-
|
73
|
-
def recover_public_keys(self, hash, generator):
|
74
|
-
"""Returns two public keys for which the signature is valid
|
75
|
-
hash is signed hash
|
76
|
-
generator is the used generator of the signature
|
77
|
-
"""
|
78
|
-
curve = generator.curve()
|
79
|
-
n = generator.order()
|
80
|
-
r = self.r
|
81
|
-
s = self.s
|
82
|
-
e = hash
|
83
|
-
x = r
|
84
|
-
|
85
|
-
# Compute the curve point with x as x-coordinate
|
86
|
-
alpha = (pow(x, 3, curve.p()) + (curve.a() * x) + curve.b()) % curve.p()
|
87
|
-
beta = numbertheory.square_root_mod_prime(alpha, curve.p())
|
88
|
-
y = beta if beta % 2 == 0 else curve.p() - beta
|
89
|
-
|
90
|
-
# Compute the public key
|
91
|
-
R1 = ellipticcurve.Point(curve, x, y, n)
|
92
|
-
Q1 = numbertheory.inverse_mod(r, n) * (s * R1 + (-e % n) * generator)
|
93
|
-
Pk1 = Public_key(generator, Q1)
|
94
|
-
|
95
|
-
# And the second solution
|
96
|
-
R2 = ellipticcurve.Point(curve, x, -y, n)
|
97
|
-
Q2 = numbertheory.inverse_mod(r, n) * (s * R2 + (-e % n) * generator)
|
98
|
-
Pk2 = Public_key(generator, Q2)
|
99
|
-
|
100
|
-
return [Pk1, Pk2]
|
101
|
-
|
102
|
-
|
103
|
-
class Public_key(object):
|
104
|
-
"""Public key for ECDSA.
|
105
|
-
"""
|
106
|
-
|
107
|
-
def __init__(self, generator, point):
|
108
|
-
"""generator is the Point that generates the group,
|
109
|
-
point is the Point that defines the public key.
|
110
|
-
"""
|
111
|
-
|
112
|
-
self.curve = generator.curve()
|
113
|
-
self.generator = generator
|
114
|
-
self.point = point
|
115
|
-
n = generator.order()
|
116
|
-
if not n:
|
117
|
-
raise RuntimeError("Generator point must have order.")
|
118
|
-
if not n * point == ellipticcurve.INFINITY:
|
119
|
-
raise RuntimeError("Generator point order is bad.")
|
120
|
-
if point.x() < 0 or n <= point.x() or point.y() < 0 or n <= point.y():
|
121
|
-
raise RuntimeError("Generator point has x or y out of range.")
|
122
|
-
|
123
|
-
def verifies(self, hash, signature):
|
124
|
-
"""Verify that signature is a valid signature of hash.
|
125
|
-
Return True if the signature is valid.
|
126
|
-
"""
|
127
|
-
|
128
|
-
# From X9.62 J.3.1.
|
129
|
-
|
130
|
-
G = self.generator
|
131
|
-
n = G.order()
|
132
|
-
r = signature.r
|
133
|
-
s = signature.s
|
134
|
-
if r < 1 or r > n - 1:
|
135
|
-
return False
|
136
|
-
if s < 1 or s > n - 1:
|
137
|
-
return False
|
138
|
-
c = numbertheory.inverse_mod(s, n)
|
139
|
-
u1 = (hash * c) % n
|
140
|
-
u2 = (r * c) % n
|
141
|
-
xy = u1 * G + u2 * self.point
|
142
|
-
v = xy.x() % n
|
143
|
-
return v == r
|
144
|
-
|
145
|
-
|
146
|
-
class Private_key(object):
|
147
|
-
"""Private key for ECDSA.
|
148
|
-
"""
|
149
|
-
|
150
|
-
def __init__(self, public_key, secret_multiplier):
|
151
|
-
"""public_key is of class Public_key;
|
152
|
-
secret_multiplier is a large integer.
|
153
|
-
"""
|
154
|
-
|
155
|
-
self.public_key = public_key
|
156
|
-
self.secret_multiplier = secret_multiplier
|
157
|
-
|
158
|
-
def sign(self, hash, random_k):
|
159
|
-
"""Return a signature for the provided hash, using the provided
|
160
|
-
random nonce. It is absolutely vital that random_k be an unpredictable
|
161
|
-
number in the range [1, self.public_key.point.order()-1]. If
|
162
|
-
an attacker can guess random_k, he can compute our private key from a
|
163
|
-
single signature. Also, if an attacker knows a few high-order
|
164
|
-
bits (or a few low-order bits) of random_k, he can compute our private
|
165
|
-
key from many signatures. The generation of nonces with adequate
|
166
|
-
cryptographic strength is very difficult and far beyond the scope
|
167
|
-
of this comment.
|
168
|
-
|
169
|
-
May raise RuntimeError, in which case retrying with a new
|
170
|
-
random value k is in order.
|
171
|
-
"""
|
172
|
-
|
173
|
-
G = self.public_key.generator
|
174
|
-
n = G.order()
|
175
|
-
k = random_k % n
|
176
|
-
p1 = k * G
|
177
|
-
r = p1.x() % n
|
178
|
-
if r == 0:
|
179
|
-
raise RSZeroError("amazingly unlucky random number r")
|
180
|
-
s = (numbertheory.inverse_mod(k, n) *
|
181
|
-
(hash + (self.secret_multiplier * r) % n)) % n
|
182
|
-
if s == 0:
|
183
|
-
raise RSZeroError("amazingly unlucky random number s")
|
184
|
-
recovery_param = p1.y() % 2 or (2 if p1.x() == k else 0)
|
185
|
-
return Signature(r, s, recovery_param)
|
186
|
-
|
187
|
-
|
188
|
-
def int_to_string(x):
|
189
|
-
"""Convert integer x into a string of bytes, as per X9.62."""
|
190
|
-
assert x >= 0
|
191
|
-
if x == 0:
|
192
|
-
return b'\0'
|
193
|
-
result = []
|
194
|
-
while x:
|
195
|
-
ordinal = x & 0xFF
|
196
|
-
result.append(int.to_bytes(ordinal, 1, 'big'))
|
197
|
-
x >>= 8
|
198
|
-
|
199
|
-
result.reverse()
|
200
|
-
return b''.join(result)
|
201
|
-
|
202
|
-
|
203
|
-
def string_to_int(s):
|
204
|
-
"""Convert a string of bytes into an integer, as per X9.62."""
|
205
|
-
result = 0
|
206
|
-
for c in s:
|
207
|
-
if not isinstance(c, int):
|
208
|
-
c = ord(c)
|
209
|
-
result = 256 * result + c
|
210
|
-
return result
|
211
|
-
|
212
|
-
|
213
|
-
def digest_integer(m):
|
214
|
-
"""Convert an integer into a string of bytes, compute
|
215
|
-
its SHA-1 hash, and convert the result to an integer."""
|
216
|
-
#
|
217
|
-
# I don't expect this function to be used much. I wrote
|
218
|
-
# it in order to be able to duplicate the examples
|
219
|
-
# in ECDSAVS.
|
220
|
-
#
|
221
|
-
from hashlib import sha1
|
222
|
-
return string_to_int(sha1(int_to_string(m)).digest())
|
223
|
-
|
224
|
-
|
225
|
-
def point_is_valid(generator, x, y):
|
226
|
-
"""Is (x,y) a valid public key based on the specified generator?"""
|
227
|
-
|
228
|
-
# These are the tests specified in X9.62.
|
229
|
-
|
230
|
-
n = generator.order()
|
231
|
-
curve = generator.curve()
|
232
|
-
if x < 0 or n <= x or y < 0 or n <= y:
|
233
|
-
return False
|
234
|
-
if not curve.contains_point(x, y):
|
235
|
-
return False
|
236
|
-
if not n * ellipticcurve.Point(curve, x, y) == ellipticcurve.INFINITY:
|
237
|
-
return False
|
238
|
-
return True
|
239
|
-
|
240
|
-
|
241
|
-
# NIST Curve P-192:
|
242
|
-
_p = 6277101735386680763835789423207666416083908700390324961279
|
243
|
-
_r = 6277101735386680763835789423176059013767194773182842284081
|
244
|
-
# s = 0x3045ae6fc8422f64ed579528d38120eae12196d5L
|
245
|
-
# c = 0x3099d2bbbfcb2538542dcd5fb078b6ef5f3d6fe2c745de65L
|
246
|
-
_b = 0x64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1
|
247
|
-
_Gx = 0x188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012
|
248
|
-
_Gy = 0x07192b95ffc8da78631011ed6b24cdd573f977a11e794811
|
249
|
-
|
250
|
-
curve_192 = ellipticcurve.CurveFp(_p, -3, _b)
|
251
|
-
generator_192 = ellipticcurve.Point(curve_192, _Gx, _Gy, _r)
|
252
|
-
|
253
|
-
# NIST Curve P-224:
|
254
|
-
_p = 26959946667150639794667015087019630673557916260026308143510066298881
|
255
|
-
_r = 26959946667150639794667015087019625940457807714424391721682722368061
|
256
|
-
# s = 0xbd71344799d5c7fcdc45b59fa3b9ab8f6a948bc5L
|
257
|
-
# c = 0x5b056c7e11dd68f40469ee7f3c7a7d74f7d121116506d031218291fbL
|
258
|
-
_b = 0xb4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4
|
259
|
-
_Gx = 0xb70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21
|
260
|
-
_Gy = 0xbd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34
|
261
|
-
|
262
|
-
curve_224 = ellipticcurve.CurveFp(_p, -3, _b)
|
263
|
-
generator_224 = ellipticcurve.Point(curve_224, _Gx, _Gy, _r)
|
264
|
-
|
265
|
-
# NIST Curve P-256:
|
266
|
-
_p = 115792089210356248762697446949407573530086143415290314195533631308867097853951
|
267
|
-
_r = 115792089210356248762697446949407573529996955224135760342422259061068512044369
|
268
|
-
# s = 0xc49d360886e704936a6678e1139d26b7819f7e90L
|
269
|
-
# c = 0x7efba1662985be9403cb055c75d4f7e0ce8d84a9c5114abcaf3177680104fa0dL
|
270
|
-
_b = 0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b
|
271
|
-
_Gx = 0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296
|
272
|
-
_Gy = 0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5
|
273
|
-
|
274
|
-
curve_256 = ellipticcurve.CurveFp(_p, -3, _b)
|
275
|
-
generator_256 = ellipticcurve.Point(curve_256, _Gx, _Gy, _r)
|
276
|
-
|
277
|
-
# NIST Curve P-384:
|
278
|
-
_p = 39402006196394479212279040100143613805079739270465446667948293404245721771496870329047266088258938001861606973112319
|
279
|
-
_r = 39402006196394479212279040100143613805079739270465446667946905279627659399113263569398956308152294913554433653942643
|
280
|
-
# s = 0xa335926aa319a27a1d00896a6773a4827acdac73L
|
281
|
-
# c = 0x79d1e655f868f02fff48dcdee14151ddb80643c1406d0ca10dfe6fc52009540a495e8042ea5f744f6e184667cc722483L
|
282
|
-
_b = 0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef
|
283
|
-
_Gx = 0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7
|
284
|
-
_Gy = 0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f
|
285
|
-
|
286
|
-
curve_384 = ellipticcurve.CurveFp(_p, -3, _b)
|
287
|
-
generator_384 = ellipticcurve.Point(curve_384, _Gx, _Gy, _r)
|
288
|
-
|
289
|
-
# NIST Curve P-521:
|
290
|
-
_p = 6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151
|
291
|
-
_r = 6864797660130609714981900799081393217269435300143305409394463459185543183397655394245057746333217197532963996371363321113864768612440380340372808892707005449
|
292
|
-
# s = 0xd09e8800291cb85396cc6717393284aaa0da64baL
|
293
|
-
# c = 0x0b48bfa5f420a34949539d2bdfc264eeeeb077688e44fbf0ad8f6d0edb37bd6b533281000518e19f1b9ffbe0fe9ed8a3c2200b8f875e523868c70c1e5bf55bad637L
|
294
|
-
_b = 0x051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00
|
295
|
-
_Gx = 0xc6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66
|
296
|
-
_Gy = 0x11839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650
|
297
|
-
|
298
|
-
curve_521 = ellipticcurve.CurveFp(_p, -3, _b)
|
299
|
-
generator_521 = ellipticcurve.Point(curve_521, _Gx, _Gy, _r)
|
300
|
-
|
301
|
-
# Certicom secp256-k1
|
302
|
-
_a = 0x0000000000000000000000000000000000000000000000000000000000000000
|
303
|
-
_b = 0x0000000000000000000000000000000000000000000000000000000000000007
|
304
|
-
_p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
|
305
|
-
_Gx = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
|
306
|
-
_Gy = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8
|
307
|
-
_r = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
|
308
|
-
|
309
|
-
curve_secp256k1 = ellipticcurve.CurveFp(_p, _a, _b)
|
310
|
-
generator_secp256k1 = ellipticcurve.Point(curve_secp256k1, _Gx, _Gy, _r)
|