support pairing

This commit is contained in:
Masato Imai
2022-09-06 11:27:49 +09:00
parent bf6827de10
commit 1f2964e5db
4 changed files with 11 additions and 9 deletions

View File

@ -1,5 +1,7 @@
fn main() {
let a = encrypt(1);
let b = encrypt2(2);
println(decrypt_pair(a * b));
let t: Vec<String> = vec("");
t[0] = "test";
t = push(t, "test2");
println(decrypt(a + b));
println(t[0] + t[1]);
}

BIN
gpsl_conf

Binary file not shown.

View File

@ -1,7 +1,7 @@
use clap::Parser;
use encryptlib::args::Args;
use encryptlib::client::start_client;
use encryptlib::server::start_server;
use encrypt::args::Args;
use encrypt::client::start_client;
use encrypt::server::start_server;
use std::env;
fn main() {

View File

@ -41,7 +41,7 @@ fn main() {
let f = EllipticCurvePoint::weil(pp, pd, r);
let s = U512::from(10u8);
let s = U512::from(10u64);
let sd = U512::from(5u8);
let q = pp * s;
@ -50,8 +50,8 @@ fn main() {
let ra = U512::from_str_radix("20", 10).unwrap();
let rad = U512::from_str_radix("26", 10).unwrap();
let m = U512::from_str_radix("1", 10).unwrap();
let md = U512::from_str_radix("0", 10).unwrap();
let m = U512::from_str_radix("2", 10).unwrap();
let md = U512::from_str_radix("3", 10).unwrap();
let s1 = pp * m + q * ra;
let t1 = pp * ra;