Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified toCL to be able to run add4 ref example and added the add4 ref example #944

Merged

Conversation

JoaoDiogoDuarte
Copy link

@JoaoDiogoDuarte JoaoDiogoDuarte commented Oct 28, 2024

This merge request adds:

  • add4.jazz example with abstract predicates and asserts/assumes that will result in a valid and correct cryptoline file

And does the following to these abstracts predicates:

  • Uncomments pow abstract predicate for algebraic expressions
  • Adds algebraic abstract predicate b2i that converts a boolean to an integer
  • Add algebraic abstract predicate u64i that converts a u64 to an integer
  • Predicate that allows comparing two boolean variables (uses Obeq)

@JoaoDiogoDuarte JoaoDiogoDuarte force-pushed the cryptoline-add-ref-example branch from 87dde18 to 8b38bc2 Compare October 28, 2024 18:13
@JoaoDiogoDuarte JoaoDiogoDuarte changed the title Modified toCL to be able to run add4 example and added the add4 example Modified toCL to be able to run add4 ref example and added the add4 ref example Oct 29, 2024
@tfaoliveira
Copy link
Member

Hey! I have a question regarding the following types of statements:

  • \sum (ii \in 0:4) (pow(2, 64*ii)*u64i(result.0[ii]))

Why isn't it proposed an abstraction to reconstruct an array of limbs into an integer?

I was thinking something like limbs from Cryptoline (page 6 of the tutorial) for an example of what I'm referring to.

If there were an limbs version in Jasmin that would take arrays, the slice of the array to be considered, and the radix, I think it would improve readability.

@JoaoDiogoDuarte
Copy link
Author

Since we support bits natively, we use the statement you mentioned so that we do not have to rely on Cryptoline's internal representation and of limbs.

@lyonel2017 lyonel2017 merged commit e3edff4 into jasmin-lang:cryptoline Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants