Skip to content

Commit

Permalink
Update Rust crypto and rename certain methods
Browse files Browse the repository at this point in the history
Signed-off-by: lovesh <lovesh.bond@gmail.com>
  • Loading branch information
lovesh committed May 10, 2024
1 parent 6467d51 commit a00910e
Show file tree
Hide file tree
Showing 12 changed files with 121 additions and 121 deletions.
57 changes: 29 additions & 28 deletions Cargo.lock

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

26 changes: 13 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ wasm-bindgen = "= 0.2.86"
dlmalloc = { version = "0.2.6", features = ["global"], optional = true }
serde_with = { version = "1.10.0", default-features = false, features = ["macros"] }

bbs_plus = { version = "0.19.0", default-features = false }
vb_accumulator = { version = "0.23.0", default-features = false }
schnorr_pok = { version = "0.17.0", default-features = false }
proof_system = { version = "0.28.0", default-features = false }
coconut-crypto = { version = "0.8.0", default-features = false }
dock_crypto_utils = { version = "0.17.0", default-features = false }
saver = { version = "0.15.0", default-features = false }
legogroth16 = { version = "0.12.0", default-features = false, features = ["circom", "wasmer-js"] }
secret_sharing_and_dkg = { version = "0.10.0", default-features = false }
oblivious_transfer_protocols = { version = "0.6.0", default-features = false}
bulletproofs_plus_plus = { version = "0.3.0", default-features = false}
smc_range_proof = { version = "0.3.0", default-features = false}
kvac = { version = "0.2.0", default-features = false}
bbs_plus = { version = "0.20.0", default-features = false }
vb_accumulator = { version = "0.24.0", default-features = false }
schnorr_pok = { version = "0.18.0", default-features = false }
proof_system = { version = "0.29.0", default-features = false }
coconut-crypto = { version = "0.9.0", default-features = false }
dock_crypto_utils = { version = "0.18.0", default-features = false }
saver = { version = "0.16.0", default-features = false }
legogroth16 = { version = "0.13.0", default-features = false, features = ["circom", "wasmer-js"] }
secret_sharing_and_dkg = { version = "0.11.0", default-features = false }
oblivious_transfer_protocols = { version = "0.7.0", default-features = false}
bulletproofs_plus_plus = { version = "0.4.0", default-features = false}
smc_range_proof = { version = "0.4.0", default-features = false}
kvac = { version = "0.3.0", default-features = false}

ark-ec = { version = "^0.4.0", default-features = false }
ark-ff = { version = "^0.4.0", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@docknetwork/crypto-wasm",
"version": "0.29.0",
"version": "0.30.0",
"author": "Dock.io",
"license": "Apache-2.0",
"private": false,
Expand Down
28 changes: 0 additions & 28 deletions src/js/delegated_proof_wasm.js

This file was deleted.

28 changes: 28 additions & 0 deletions src/js/keyed_proof_wasm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const {
wasm, requireWasmInitialized
} = require('./init_wasm');

module.exports.getAllKeyedSubproofsFromProof = (proof) => {
requireWasmInitialized();
return wasm.getAllKeyedSubproofsFromProof(proof);
};

module.exports.verifyBDDT16KeyedProof = (proof, secretKey) => {
requireWasmInitialized();
return wasm.verifyBDDT16KeyedProof(proof, secretKey);
};

module.exports.verifyVBAccumMembershipKeyedProof = (proof, secretKey) => {
requireWasmInitialized();
return wasm.verifyVBAccumMembershipKeyedProof(proof, secretKey);
};

module.exports.verifyKBUniAccumMembershipKeyedProof = (proof, secretKey) => {
requireWasmInitialized();
return wasm.verifyKBUniAccumMembershipKeyedProof(proof, secretKey);
};

module.exports.verifyKBUniAccumNonMembershipKeyedProof = (proof, secretKey) => {
requireWasmInitialized();
return wasm.verifyKBUniAccumNonMembershipKeyedProof(proof, secretKey);
};
11 changes: 0 additions & 11 deletions src/js/type_declarations/delegated_proof.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/js/type_declarations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export * from "./ps";
export * from "./frost_dkg";
export * from "./threshold_sig";
export * from "./bdd16_kvac";
export * from "./delegated_proof";
export * from "./keyed_proof";
export * from "./kb_accumulator";


11 changes: 11 additions & 0 deletions src/js/type_declarations/keyed_proof.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {VerifyResult} from "../types";

export function getAllKeyedSubproofsFromProof(proof: Uint8Array): Map<number, [number, Uint8Array]>;

export function verifyBDDT16KeyedProof(proof: Uint8Array, secretKey: Uint8Array): Required<VerifyResult>;

export function verifyVBAccumMembershipKeyedProof(proof: Uint8Array, secretKey: Uint8Array): Required<VerifyResult>;

export function verifyKBUniAccumMembershipKeyedProof(proof: Uint8Array, secretKey: Uint8Array): Required<VerifyResult>;

export function verifyKBUniAccumNonMembershipKeyedProof(proof: Uint8Array, secretKey: Uint8Array): Required<VerifyResult>;
2 changes: 1 addition & 1 deletion src/js/wasm_module.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ module.exports = {
...require('./frost_dkg_wasm'),
...require('./threshold_sig_wasm'),
...require('./bdd16_kvac_wasm'),
...require('./delegated_proof_wasm'),
...require('./keyed_proof_wasm'),
...require('./kb_accumulator_wasm'),
};
Loading

0 comments on commit a00910e

Please sign in to comment.