diff --git a/noir_stdlib/src/grumpkin_scalar.nr b/noir_stdlib/src/grumpkin_scalar.nr index e3cc2a9a8ed..d05158488f4 100644 --- a/noir_stdlib/src/grumpkin_scalar.nr +++ b/noir_stdlib/src/grumpkin_scalar.nr @@ -4,7 +4,7 @@ struct GrumpkinScalar { } impl GrumpkinScalar { - fn new(low: Field, high: Field) -> Self { + pub fn new(low: Field, high: Field) -> Self { // TODO: check that the low and high value fit within the grumpkin modulus GrumpkinScalar { low, high } } @@ -12,10 +12,10 @@ impl GrumpkinScalar { global GRUMPKIN_SCALAR_SERIALIZED_LEN: Field = 2; -fn deserialize_grumpkin_scalar(fields: [Field; GRUMPKIN_SCALAR_SERIALIZED_LEN]) -> GrumpkinScalar { +pub fn deserialize_grumpkin_scalar(fields: [Field; GRUMPKIN_SCALAR_SERIALIZED_LEN]) -> GrumpkinScalar { GrumpkinScalar { low: fields[0], high: fields[1] } } -fn serialize_grumpkin_scalar(scalar: GrumpkinScalar) -> [Field; GRUMPKIN_SCALAR_SERIALIZED_LEN] { +pub fn serialize_grumpkin_scalar(scalar: GrumpkinScalar) -> [Field; GRUMPKIN_SCALAR_SERIALIZED_LEN] { [scalar.low, scalar.high] } diff --git a/noir_stdlib/src/grumpkin_scalar_mul.nr b/noir_stdlib/src/grumpkin_scalar_mul.nr index 0d73b9dd194..06d30d62332 100644 --- a/noir_stdlib/src/grumpkin_scalar_mul.nr +++ b/noir_stdlib/src/grumpkin_scalar_mul.nr @@ -1,7 +1,7 @@ use crate::grumpkin_scalar::GrumpkinScalar; use crate::scalar_mul::fixed_base_embedded_curve; -fn grumpkin_fixed_base(scalar: GrumpkinScalar) -> [Field; 2] { +pub fn grumpkin_fixed_base(scalar: GrumpkinScalar) -> [Field; 2] { // TODO: this should use both the low and high limbs to do the scalar multiplication fixed_base_embedded_curve(scalar.low, scalar.high) }