opencompl / opencompl/veir

Prime IR

Open
#937 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Lean
Stars
109
Forks
32
Avg merge
1d 1h
Merged PRs (30d)
155

Description

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?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the linked Prime IR, AUCurves, and Jasmin projects alongside the issue's Lean-library context. The issue asks for a feasibility and design discussion about adopting a cryptography dialect, robust-compilation guardrails, and Com-style abstractions in VeIR; done would be an agreed direction and next steps.

Written by the indexing model from the issue text.

Assessment

Domain
compilers, cryptography
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.