Giter Site home page Giter Site logo

ARM - Aarch64 about mithril HOT 2 OPEN

ragnaroek avatar ragnaroek commented on May 29, 2024
ARM - Aarch64

from mithril.

Comments (2)

Ragnaroek avatar Ragnaroek commented on May 29, 2024

Hi DaanA32,

nice things in your commit!

To be honest, I haven't put much thought into a support for a different architecture. I'm still working on the x86 implementation and this will take some time.
But this is definitely something I want to do in the future. Maybe I would go with the cfg feature of Rust.
Also a pure software based implementation as a fallback would be nice, to support CPUs without the AES extension (like the Raspberry you mentioned).
But this would purely for freedom of mining reasons (everybody with a CPU should be able to mine Monero). I'm currently focusing on performance and I guess this is something not in the near future.

from mithril.

DaanA32 avatar DaanA32 commented on May 29, 2024

I would suggest either using cnf_if for the aes part of m128i
eg:

pub fn aesenc(&self, key: m128i) -> m128i {
    cnf_if {
        if #[cfg(target_feature='crypto')] {
            // HARDWARE IMPL
        } else {
            // SOFTWARE IMPL
        }
    }
}

Or a trait based approach

#[cfg(target_feature='crypto')]
trait Aes for m128i {
    // HARDWARE IMPL
}

#[cfg(not(target_feature='crypto'))]
trait Aes for m128i {
    // SOFTWARE IMPL
}

from mithril.

Related Issues (20)

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.