Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Convert to the required integral type when multiplying a scalar with a curve point. #294

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

martun
Copy link
Contributor

@martun martun commented Jul 22, 2024

When multiplying an EC curve point to a scalar value, the scalar must be integral_type, not value_type, and it must be of the same bit-length as the group used for EC scalar values. The caller must convert it to the corrent integral type before multiplying.

Yet we have lots of use cases mostly in blueprint where an integral_type number of different field is multiplied by and EC point. In these cases we will convert them in algebra itself, for now. Later we may consider moving this conversions to the callers and deleting this operator*.

@martun martun requested a review from vo-nil July 22, 2024 07:34
@martun martun self-assigned this Jul 22, 2024
@martun martun merged commit 87edbf5 into master Jul 23, 2024
2 checks passed
@martun martun deleted the convert_on_curve_point_scalar_multiplication branch July 23, 2024 07:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants