Skip to content

Commit

Permalink
add ffi c edwards25519
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoXuan40404 committed Sep 20, 2023
1 parent dad9db9 commit 6b6a338
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 21 deletions.
20 changes: 15 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ members = [
"ffi/ffi_c/ffi_c_crypto_binary",
"ffi/ffi_c/ffi_c_fisco_bcos",
"ffi/ffi_c/ffi_c_zkp",
"ffi/ffi_c/ffi_c_ecc_edwards25519",
"ffi/ffi_common",
"ffi/ffi_java/ffi_java_crypto",
"ffi/ffi_java/ffi_java_crypto_binary",
Expand All @@ -34,7 +35,7 @@ members = [
"protos",
"third_party/fisco_bcos",
"third_party/fisco_bcos_java_sdk",
"crypto/ecc/ecc_ed25519",
"crypto/ecc/ffi_java_ecc_ed25519",
"crypto/ecc/ffi_wasm_ecc_ed25519",
"crypto/ecc/ecc_edwards25519",
"ffi/ffi_java/ffi_java_ecc_edwards25519",
"ffi/ffi_wasm/ffi_wasm_ecc_edwards25519",
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "ecc_ed25519"
name = "ecc_edwards25519"
version = "0.1.0"
edition = "2021"

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "ffi_java_ecc_ed25519"
name = "ffi_java_ecc_edwards25519"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
name = "ffi_java_ecc_ed25519"
name = "ffi_java_ecc_edwards25519"
crate-type = [ "cdylib", "staticlib" ]

[dependencies]
jni = "0.13.0"
ecc_ed25519 = { path = "../ecc_ed25519"}
ecc_edwards25519 = { path = "../../../crypto/ecc/ecc_edwards25519" }
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
extern crate jni;

use ecc_ed25519::{
hash_to_curve, point_scalar_multi, random_scalar,
};
use ecc_edwards25519::{hash_to_curve, point_scalar_multi, random_scalar};

use jni::{objects::JClass, sys::jbyteArray, JNIEnv};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "ffi_wasm_ecc_ed25519"
name = "ffi_wasm_ecc_edwards25519"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "ffi_wasm_ecc_ed25519"
name = "ffi_wasm_ecc_edwards25519"
crate-type = ["rlib", "cdylib"]

[dependencies]
wasm-bindgen = "0.2"
getrandom = { version = "0.2", features = ["js"] }
ecc_ed25519 = { path = "../ecc_ed25519"}
ecc_edwards25519 = { path = "../../../crypto/ecc/ecc_edwards25519" }
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
extern crate wasm_bindgen;

use ecc_ed25519::{
hash_to_curve, point_scalar_multi, random_scalar,
};
use ecc_edwards25519::{hash_to_curve, point_scalar_multi, random_scalar};
use wasm_bindgen::prelude::wasm_bindgen;

#[wasm_bindgen]
Expand Down

0 comments on commit 6b6a338

Please sign in to comment.