parent
d8c8778018
commit
a38a594cd0
@ -1,57 +1,55 @@ |
||||
<!DOCTYPE HTML> |
||||
<html> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
||||
<meta http-equiv="Content-Script-Type" content="text/javascript"> |
||||
<meta http-equiv="Content-Style-Type" content="text/css"> |
||||
<title>Two-level Homomorphic Encryption demo</title> |
||||
<link rel="stylesheet" type="text/css" href="style.css"> |
||||
<script type='text/javascript' src="jquery-3.2.1.min.js"></script> |
||||
<script type='text/javascript' src="she_c.js"></script> |
||||
<script type='text/javascript' src="she.js"></script> |
||||
<script type="text/javascript" src="she-demo2.js"></script> |
||||
</head> |
||||
<body> |
||||
<h1>Two-level Homomorphic Encryption demo</h1> |
||||
<div> |
||||
library status <span name="status">initializing...</span> |
||||
</div> |
||||
|
||||
<div id="left"> |
||||
<h2>Client</h2> |
||||
secretKey : <div name="sec" class="hex"></div> |
||||
|
||||
<table border=1 id="client_table" width="100%" summary="client"> |
||||
<tr id="client_header"><th>x<th>y<th class="hex">EncG1(x)<th class="hex">EncG2(y)</tr> |
||||
</table> |
||||
<input type="text" name="append" value="1,1"> |
||||
<button type="button" onclick="append()">1. append "x,y" and encrypt them (multiple times)</button> |
||||
<br> |
||||
<button type="button" onclick="send()">2. send to server</button> |
||||
<div>received ciphertext</div> |
||||
<div name="encSumC" class="hex">0</div> |
||||
<button type="button" onclick="dec()">6. decode ciphertext</button> |
||||
<div name="ret">0</div> |
||||
|
||||
</div> |
||||
|
||||
<div id="middle"> |
||||
</div> |
||||
|
||||
<div id="right"> |
||||
|
||||
<h2>Server</h2> |
||||
publicKey : <div name="pub" class="hex"></div> |
||||
|
||||
<table border=1 id="server_table" width="100%" summary="server"> |
||||
</table> |
||||
<button type="button" onclick="mul()">3. compute EncGT(x * y) := EncG1(x) * EncG2(y) for each row</button><br> |
||||
<button type="button" onclick="sum()">4. sum of all values in EncGT(x * y) column</button> |
||||
<div>result</div> |
||||
<div name="encSumS" class="hex">0</div> |
||||
<button type="button" onclick="recv()">5. return to client</button> |
||||
|
||||
</div> |
||||
|
||||
</body> |
||||
</html> |
||||
<!DOCTYPE html> |
||||
<html lang="ja"> |
||||
<head> |
||||
<meta charset="UTF-8"> |
||||
<title>Two-level Homomorphic Encryption demo</title> |
||||
<link rel="stylesheet" href="style.css"> |
||||
<script src="jquery-3.2.1.min.js"></script> |
||||
<script src="she_c.js"></script> |
||||
<script src="she.js"></script> |
||||
<script src="she-demo2.js"></script> |
||||
</head> |
||||
<body> |
||||
<h1>Two-level Homomorphic Encryption demo</h1> |
||||
<div> |
||||
library status <span name="status">initializing...</span> |
||||
</div> |
||||
|
||||
<div id="left"> |
||||
<h2>Client</h2> |
||||
secretKey : <div name="sec" class="hex"></div> |
||||
|
||||
<table border=1 id="client_table" width="100%" summary="client"> |
||||
<tr id="client_header"><th>x<th>y<th class="hex">EncG1(x)<th class="hex">EncG2(y)</tr> |
||||
</table> |
||||
<input type="text" name="append" value="1,1"> |
||||
<button type="button" onclick="append()">1. append "x,y" and encrypt them (multiple times)</button> |
||||
<br> |
||||
<button type="button" onclick="send()">2. send to server</button> |
||||
<div>received ciphertext</div> |
||||
<div name="encSumC" class="hex">0</div> |
||||
<button type="button" onclick="dec()">6. decode ciphertext</button> |
||||
<div name="ret">0</div> |
||||
|
||||
</div> |
||||
|
||||
<div id="middle"> |
||||
</div> |
||||
|
||||
<div id="right"> |
||||
|
||||
<h2>Server</h2> |
||||
publicKey : <div name="pub" class="hex"></div> |
||||
|
||||
<table border=1 id="server_table" width="100%" summary="server"> |
||||
</table> |
||||
<button type="button" onclick="mul()">3. compute EncGT(x * y) := EncG1(x) * EncG2(y) for each row</button><br> |
||||
<button type="button" onclick="sum()">4. sum of all values in EncGT(x * y) column</button> |
||||
<div>result</div> |
||||
<div name="encSumS" class="hex">0</div> |
||||
<button type="button" onclick="recv()">5. return to client</button> |
||||
|
||||
</div> |
||||
|
||||
</body> |
||||
</html> |
||||
|
Loading…
Reference in new issue