Skip to content

Prime IR #937

Description

@spitters

https://github.com/fractalyze/prime-ir is an MLIR dialect for cryptography. It is used by a few groups in the ethereum ecosystem.
I have a superset of a subset of it in my lean library that started as a port/bridge of our AUCurves library https://github.com/AU-COBRA/AUCurves. This includes a partial port of the jasmin compiler.

Would there be an interest in having (something like) Prime IR in Veir? If so, what would be the best steps towards that?
Note that for cryptography robust compilation is very important. I have a solution for that in lean, similar to what jasmin does.
And somewhat similar to https://blog.trailofbits.com/2025/12/02/introducing-constant-time-support-for-llvm-to-protect-cryptographic-code/
Do you have plans for adopting such guardrails in VeIR?

My design is inspired by the Com way of structuring dialects from lean-mlir. Do you have plans to expose that abstraction in VeIR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions