readme and some clean

This commit is contained in:
arnaucode
2018-02-09 10:52:43 +01:00
parent 3b65da470d
commit bb7f01ffb5
43 changed files with 111 additions and 61 deletions

View File

@@ -77,8 +77,8 @@ config(['$locationProvider', '$routeProvider', function($locationProvider, $rout
.factory('api', function($http) {
return {
init: function() {
/*$http.defaults.headers.common['X-Access-Token'] = localStorage.getItem('block_webapp_token');
$http.defaults.headers.post['X-Access-Token'] = localStorage.getItem('block_webapp_token');*/
/*$http.defaults.headers.common['X-Access-Token'] = localStorage.getItem('darkID_token');
$http.defaults.headers.post['X-Access-Token'] = localStorage.getItem('darkID_token');*/
}
};
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

After

Width:  |  Height:  |  Size: 457 KiB

View File

@@ -7,11 +7,6 @@
<div class="card">
<div class="card-body">
<h4>ID: {{id.id}}</h4>
<div class="row">
<textarea disabled style="color:#81C784;width:100%;" rows="4"
ng-model="id.publicKey"
></textarea>
</div>
<span class="pull-right">{{id.date | date: "dd.MM.y, HH:mm:ss"}}h</span>
@@ -20,6 +15,13 @@
<span class="badge c_o_orange300" ng-show="!id.unblindedsig">Not signed</span>
<span class="badge c_o_blue300" ng-show="id.unblindedsig">Signed</span>
<span class="badge c_o_deepPurple300" ng-show="id.blockchainref">in Blockchain</span>
<br><br>
<div class="row">
<textarea disabled style="color:#81C784;width:100%;" rows="4"
ng-model="id.publicKey"
></textarea>
</div>
<br>
<div class="row">
<textarea style="color:#000000;width:100%;" rows="4"
ng-model="decryptData.c"
@@ -32,23 +34,25 @@
Proof of decrypt
</div>
<br><br><br><br><br>
<hr>
<h5>Testing only:</h5>
<div class="row">
<textarea style="color:#000000;width:100%;" rows="4"
ng-model="encryptData.m"
placeholder="Enter here the unencrypted..."
></textarea>
</div>
<div class="row">
<textarea style="backgroud:grey;color:#000000;width:100%;" rows="4"
ng-model="encryptData.c"
placeholder="Encrypted data..."
></textarea>
</div>
<div ng-click="encrypt()" ng-show="id.unblindedsig" class="btn btn-raised pull-right c_o_orange300">
Encrypt
<div ng-show="testing">
<br><br><br><br><br>
<hr>
<h5>Testing only:</h5>
<div class="row">
<textarea style="color:#000000;width:100%;" rows="4"
ng-model="encryptData.m"
placeholder="Enter here the unencrypted..."
></textarea>
</div>
<div class="row">
<textarea style="backgroud:grey;color:#000000;width:100%;" rows="4"
ng-model="encryptData.c"
placeholder="Encrypted data..."
></textarea>
</div>
<div ng-click="encrypt()" ng-show="id.unblindedsig" class="btn btn-raised pull-right c_o_orange300">
Encrypt
</div>
</div>
</div>
</div>

View File

@@ -31,7 +31,6 @@ angular.module('app.login', ['ngRoute'])
//
$http({
url: $rootScope.server + 'login',
method: "POST",

View File

@@ -66,7 +66,6 @@ type SignResponse struct {
func BlindAndSendToSign(keyID string) []Key {
//get the key
key := getKeyByKeyID(keyID)
//privK := openPEMKey(key.PrivK)
pubK, err := openPublicPEMKey(keysDir + "/" + key.PubK)
check(err)
@@ -87,7 +86,6 @@ func BlindAndSendToSign(keyID string) []Key {
defer res.Body.Close()
//blind the hashed message
// We do a SHA256 full-domain-hash expanded to 1536 bits (3/4 the key size)
hashed := fdh.Sum(crypto.SHA256, hashize, mB)
blinded, unblinder, err := rsablind.Blind(serverPubK, hashed)
if err != nil {
@@ -109,7 +107,6 @@ func BlindAndSendToSign(keyID string) []Key {
defer res.Body.Close()
sig := signResponse.Sig
//serverPubK := signResponse.PubK
//unblind the signedblind
unblindedSig := rsablind.Unblind(serverPubK, sig, unblinder)

View File

@@ -9,8 +9,6 @@ import (
"github.com/gorilla/mux"
)
//TODO use rsa library instead own rsa functions
func Index(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "clientApp")
}