Git Product home page Git Product logo

Comments (8)

vbgl avatar vbgl commented on June 30, 2024 1

(also the version information is not particularly helpful)

The installation instruction that you’ve followed suggested to pull the Jasmin source code from the wrong repo…

from libjade.

vbgl avatar vbgl commented on June 30, 2024

You need a bleeding edge version of the Jasmin compiler to compile the development version of libjade: either the head of the release-2022.09 branch (my own recommendation) or the a recent version of the main branch (what the libjade developers do).

from libjade.

dderjoel avatar dderjoel commented on June 30, 2024

I see.
I've done the instructions from Sir Cryptojedi here a couple days ago, which felt like it was pulling from main, but instead I'm getting the version @Version@.

jasminc -version
Jasmin Compiler @VERSION@

using opam install jasmin now, and it compiles with the code in the repo.
(but it wont compile with my altered code anymore, which I find surprising: It fails with

compilation error in function jade_scalarmult_curve25519_amd64_mulx_base:
asmgen: invalid rexpr for oprd (RDI >> RDX)
        invalid rexpr for word
make: *** [../../../../Makefile.common:68: scalarmult.s] Error 1

)
(also the version information is not particularly helpful)

EDIT: both of those may be better tracked in the jasmin-lang repo

from libjade.

vbgl avatar vbgl commented on June 30, 2024

Yes, there is no instruction on x86 that implement that kind of shift. Fortunately, there is one that does RDI >> (RDX & 63).

from libjade.

dderjoel avatar dderjoel commented on June 30, 2024

Yes, there is no instruction on x86 that implement that kind of shift. Fortunately, there is one that does RDI >> (RDX & 63).

Hm, I see shrd r/64, r/64, r32b and shr r/64, cl in the manual. Former needs BMI2.
All shifts only make sense with a one-byte COUNT.

So shouldn't jasminc be able to move p into cl and use shr rzx, cl, or use shrx (Im not sure if ISEs are enabled).
What I'm trying to understand it why does the COUNT need to be ANDed with 63, where this is clearly too big for any shifts.

The installation instruction that you’ve followed suggested to pull the Jasmin source code from the wrong repo…

Fiat, I'll let cryptojedi know, to change jasmin-lang/jasmin to jasmin-lang/jasmin-compiler
However, I still seem to face the issue that jasminc -version responds with @VERSION@. Is that because I've used opam install jasmin rather than cloning from the release-2022.09 branch?

from libjade.

vbgl avatar vbgl commented on June 30, 2024

why does the COUNT need to be ANDed with 63

This is what x86 processors do.

from libjade.

dderjoel avatar dderjoel commented on June 30, 2024

Yes, I'm sorry. Got confused. I my head it was AND'ing with 2^63 (which is too big). All makes sense now. Manual says COUNT AND 3FH and then successive /2s.

from libjade.

tfaoliveira avatar tfaoliveira commented on June 30, 2024

Even though this issue is closed, the following commits, which are related to this discussion, might be of interest to readers:

jasmin-lang/jasmin@678bd31

443ee3c

fecec47

from libjade.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.