-
Notifications
You must be signed in to change notification settings - Fork 192
Description
use ed25519_compact::ge_scalarmult_base;
use curve25519_dalek::{constants, Scalar};
// fails
fn derrive_public_key(hashed_private_key_bytes: [u8; 64]) -> [u8; 32] {
let mut input = [0u8; 32];
input.copy_from_slice(&hashed_private_key_bytes[0..32]);
let scalar = Scalar::from_bytes_mod_order(input);
let point = constants::ED25519_BASEPOINT_TABLE * &scalar;
let compressed_point = point.compress();
let public_key_bytes = compressed_point.to_bytes();
public_key_bytes
}
// works
fn derrive_public_key_compact(hashed_private_key_bytes: [u8; 64]) -> [u8; 32] {
let mut input = [0u8; 32];
input.copy_from_slice(&hashed_private_key_bytes[0..32]);
let public_key_bytes = ge_scalarmult_base(&input).to_bytes();
public_key_bytes
}
[package]
name = "ed25519_vanity_kernel"
version = "0.1.0"
edition = "2024"
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
cuda_std = { git = "https://github.com/Rust-GPU/Rust-CUDA.git" }
ed25519-compact = { git = "https://github.com/brandonros/rust-ed25519-compact.git", rev = "7605359ed8508d4cef3b958157ad41108261f8d1", default-features = false, features = ["cuda"] }
sha2 = { version = "0.10.8", default-features = false }
curve25519-dalek = { version = "4.1.3", default-features = false, features = ["alloc", "precomputed-tables"] }
bs58 = { version = "0.5.1", default-features = false }
rand_core = { version = "0.9.3" }
rand_xorshift = { version = "0.4.0", default-features = false }
[build-dependencies]
cuda_builder = { git = "https://github.com/Rust-GPU/Rust-CUDA.git" }
Not sure if this is helpful. Great crate + ecosystem, hope I'm helping trying to "real world use it". Please let me know how I can debug more to provide more meaningful report.
https://github.com/brandonros/ed25519-vanity-rs/tree/no-compact if needed for "full working example"
cc @jorge-ortega let me know if you want to work together on this if you have the cycles
Metadata
Metadata
Assignees
Labels
No labels
Activity
brandonros commentedon Apr 27, 2025
similar to #207 and #203
brandonros commentedon Apr 29, 2025
illegal-address.ptx.zip
LegNeato commentedon May 23, 2025
I don't have a ton of time right now to help you debug, but I wanted to pop in and say thank you for the great bug reports and pointers to the repo. Makes it a lot easier when one of us has time! 🍻
Fix `read_volatile` intrinsic
read_volatile
intrinsic #216Fix `read_volatile` intrinsic
Fix `read_volatile` intrinsic
Fix `read_volatile` intrinsic
Fix `read_volatile` intrinsic
Spill large statics from constant to global memory
Spill large statics from constant to global memory
Spill large statics from constant to global memory
Make constant memory opt-in, spill large statics to global memory (#217)
Fix `read_volatile` intrinsic
Fix `read_volatile` intrinsic
Fix `read_volatile` intrinsic
Make constant memory opt-in, spill large statics to global memory (Ru…