nalgebra icon indicating copy to clipboard operation
nalgebra copied to clipboard

Operations on heterogenous matrices

Open s5bug opened this issue 5 months ago • 0 comments

I'm implementing an algorithm right now that operates on bilinear groups, and the pairing crate splits these into five different types of numbers.

The following operations are of importance to me:

  • G1Projective + G1AffineG1Projective
  • G2Projective + G2AffineG2Projective
  • pairing(G1Affine, G2Affine) → Gt

I want the first two to be available component-wise (i.e. suppling a custom addition function to Matrix +) and the final one to be available as a multiplication operation (i.e. supplying a custom function to Matrix *). Is there a way I can do this?

Another (family of) operation(s) I ran into needing after submitting this issue: multiplying an Matrix<G1Affine, or a Matrix<G2Affine, by a Matrix<Scalar, , for which there is G1Affine * ScalarG1Projective (likewise for G2).

s5bug avatar Aug 11 '25 02:08 s5bug