Even faster Edwards curves with IFMA

Creating a bar chart in Google sheets with one differently-coloured bar: among the hardest problems in computer science.

IFMA Instructions

purr programming on the IFMA backend

Adding intrinsics to Rust

// Need this to enable the intrinsic definitions
#![feature(simd_ffi, link_llvm_intrinsics)]
// The original Rust std::simd had typed vectors, which
// moved into the packed_simd crate. I like them better.
use packed_simd::u64x4;

// The `link_name`s below are pulled out of LLVM tablegen, have
// changed in the past, and might change again in the future.
extern "C" {
#[link_name = "llvm.x86.avx512.vpmadd52l.uq.256"]
fn madd52lo(z: u64x4, x: u64x4, y: u64x4) -> u64x4;
#[link_name = "llvm.x86.avx512.vpmadd52h.uq.256"]
fn madd52hi(z: u64x4, x: u64x4, y: u64x4) -> u64x4;

Implementation details

  • The notes on the IFMA backend give an overview of the IFMA instructions, discussion of previous work which uses them for big-integer arithmetic, and an overview of the strategy for using them to implement field arithmetic.
  • The notes on the parent module, the curve25519-dalek vector backend, explain the parallel Edwards strategy in general.

interested in zero-knowledge, privacy, freedom, mathematics, & the number 24

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How Violating The Principle of Least Surprise Can Introduce Subtle Bugs to Your Code

Encapsulation in C++ and C

Programming went wrong, OOPS!

Pairs whose sum is divisible by a given number

AmbientTalk: An Ambient-Oriented Programming Language

Unlocking value creation among API-first companies

Oops, You Have Accidentally Merged Into The Wrong Branch. What Should You Do?

How to undo a pushed merge with git?

AWS On-Demand Capacity Reservation

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Henry de Valence

Henry de Valence

interested in zero-knowledge, privacy, freedom, mathematics, & the number 24

More from Medium

Is this AI? No, it’s just Python being slow.

Containerize CUDA without NVIDIA CUDA image🤔? How?

Part #2: How to read WASM

Working with QR Codes in Embedded Linux and ARM-powered devices using the C++ language