Summary
NewIdemixMsp and NewIdemixMspAries both hardcode the elliptic curve at construction time —
FP256BN_AMCL for the dlog scheme and BLS12_381_BBS for the Aries scheme. However,
IdemixMSPConfig already carries a curve_id string field (populated by idemixgen --curve)
that is intended to communicate the correct curve to the MSP. Setup never reads this field,
so it is silently ignored.
Impact
- An MSP config generated with
idemixgen --curve BLS12_381 will fail to set up correctly
when loaded through NewIdemixMsp, because the keys are deserialized against FP256BN_AMCL
instead of the curve they were generated with.
- There is no error when the config
Type and the constructor disagree: calling
NewIdemixMsp (dlog) and then Setup with an IDEMIX_ARIES config silently proceeds
rather than rejecting the mismatch.
- Users who want to inject a custom logger must subclass or wrap the MSP; there is no
constructor overload that accepts a Logger.
Expected behaviour
Setup should read conf.CurveId and build the BCCSP with the matching curve and
translator, rather than using a hardcoded value from the constructor.
NewIdemixMsp should only accept configs of type IDEMIX; NewIdemixMspAries should
only accept configs of type IDEMIX_ARIES. A mismatch should be an error.
NewIdemixMspAries should restrict curve_id to BBS curves
(BLS12_381_BBS, BLS12_381_BBS_GURVY) and error on any other value.
- Callers should be able to supply a custom
Logger at construction time without having
to wrap the MSP.
Default / backward-compatibility
- dlog: empty
curve_id → FP256BN_AMCL (preserves current behaviour).
- Aries: empty
curve_id → BLS12_381_BBS (preserves current behaviour).
Summary
NewIdemixMspandNewIdemixMspAriesboth hardcode the elliptic curve at construction time —FP256BN_AMCLfor the dlog scheme andBLS12_381_BBSfor the Aries scheme. However,IdemixMSPConfigalready carries acurve_idstring field (populated byidemixgen --curve)that is intended to communicate the correct curve to the MSP.
Setupnever reads this field,so it is silently ignored.
Impact
idemixgen --curve BLS12_381will fail to set up correctlywhen loaded through
NewIdemixMsp, because the keys are deserialized againstFP256BN_AMCLinstead of the curve they were generated with.
Typeand the constructor disagree: callingNewIdemixMsp(dlog) and thenSetupwith anIDEMIX_ARIESconfig silently proceedsrather than rejecting the mismatch.
constructor overload that accepts a
Logger.Expected behaviour
Setupshould readconf.CurveIdand build the BCCSP with the matching curve andtranslator, rather than using a hardcoded value from the constructor.
NewIdemixMspshould only accept configs of typeIDEMIX;NewIdemixMspAriesshouldonly accept configs of type
IDEMIX_ARIES. A mismatch should be an error.NewIdemixMspAriesshould restrictcurve_idto BBS curves(
BLS12_381_BBS,BLS12_381_BBS_GURVY) and error on any other value.Loggerat construction time without havingto wrap the MSP.
Default / backward-compatibility
curve_id→FP256BN_AMCL(preserves current behaviour).curve_id→BLS12_381_BBS(preserves current behaviour).