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

Optimised Neon Arm-v8 #11

Open
mberry opened this issue Aug 23, 2022 · 3 comments
Open

Optimised Neon Arm-v8 #11

mberry opened this issue Aug 23, 2022 · 3 comments

Comments

@mberry
Copy link
Member

mberry commented Aug 23, 2022

[Tracking issue]

There is an optimised C implementation for neon arm-v8 here: https://github.com/cothan/kyber/tree/master/neon

At the moment many of these platform specific intrinsics needed don't exist in core_arch::aarch64 so it's either build the C lib and use that or work on getting them into rust core.

@faern
Copy link
Contributor

faern commented Sep 21, 2022

I'd personally love to see a pure Rust Kyber implementation. So that should IMHO be the goal here. If this is a concrete use case for having those intrinsics, that's a good ground for suggesting to introduce them to core.

@mberry
Copy link
Member Author

mberry commented Sep 21, 2022

Yeah I definitely agree. Still, a build script can be a simple fix for some depending on how long it takes to get them implemented. Had a fair bit of the neon rust code done anyway last year, probably should publish the branch even though it won't build.

Could also just strip out the non-existent intrinsic functions and put them back in as they drop into core_arch. Been a while, think there wasn't too many.

This is the issue covering neon intrinsics and also instructions for code generation:

rust-lang/stdarch#148

There's also a spreadsheet of what's been done, it may or may not be maintained:

https://docs.google.com/spreadsheets/d/1MqW1g8c7tlhdRWQixgdWvR4uJHNZzCYAf4V0oHjZkwA/edit#gid=0

Guess I should make a list of what functions are blocking this here.

@mberry
Copy link
Member Author

mberry commented Mar 14, 2023

To update: moving forward on this, slowly...

Implementing the work by Becker et al.

https://github.com/neon-ntt/neon-ntt

https://eprint.iacr.org/2021/986

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

No branches or pull requests

2 participants