models
FQ2_Point
¶
Bases: BaseModel
Source code in src/payment/crypto/models.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |
from_fq2(point)
staticmethod
¶
Convert a py_ecc FQ2 element to serializable form.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
point
|
FQ2
|
FQ2 element from py_ecc. |
required |
Returns:
| Type | Description |
|---|---|
FQ2_Point
|
FQ2_Point with integer coefficients. |
Source code in src/payment/crypto/models.py
39 40 41 42 43 44 45 46 47 48 49 | |
to_fq2()
¶
Convert back to a py_ecc FQ2 element.
Returns:
| Type | Description |
|---|---|
FQ2
|
FQ2 element for use with py_ecc. |
Source code in src/payment/crypto/models.py
51 52 53 54 55 56 57 | |
G1_Point
¶
Bases: BaseModel
Source code in src/payment/crypto/models.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
from_g1(point)
staticmethod
¶
Convert a projective py_ecc G1 point to affine representation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
point
|
Optimized_Point3D[Optimized_Field]
|
Projective G1 point from py_ecc. |
required |
Returns:
| Type | Description |
|---|---|
G1_Point
|
Affine G1_Point. |
Source code in src/payment/crypto/models.py
11 12 13 14 15 16 17 18 19 20 21 22 | |
to_g1()
¶
Convert back to a projective py_ecc G1 point.
Returns:
| Type | Description |
|---|---|
Optimized_Point3D[Optimized_Field]
|
Projective G1 point for use with py_ecc. |
Source code in src/payment/crypto/models.py
24 25 26 27 28 29 30 | |
G2_Point
¶
Bases: BaseModel
Source code in src/payment/crypto/models.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
from_g2(point)
staticmethod
¶
Convert a projective py_ecc G2 point to affine representation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
point
|
Optimized_Point3D[Optimized_Field]
|
Projective G2 point from py_ecc. |
required |
Returns:
| Type | Description |
|---|---|
G2_Point
|
Affine G2_Point. |
Source code in src/payment/crypto/models.py
66 67 68 69 70 71 72 73 74 75 76 77 | |
to_g2()
¶
Convert back to a projective py_ecc G2 point.
Returns:
| Type | Description |
|---|---|
Optimized_Point3D[Optimized_Field]
|
Projective G2 point for use with py_ecc. |
Source code in src/payment/crypto/models.py
79 80 81 82 83 84 85 | |