gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-anastasis] branch master updated (0b93588 -> 252fd0f


From: gnunet
Subject: [GNUnet-SVN] [taler-anastasis] branch master updated (0b93588 -> 252fd0f)
Date: Fri, 13 Sep 2019 23:34:27 +0200

This is an automated email from the git hooks/post-receive script.

dennis-neufeld pushed a change to branch master
in repository anastasis.

    from 0b93588  added db schema
     new 739e092  Added employee api for authentication procedures like video 
identification etc. Http Status is missing yet.
     new dee34a3  Created initial crypto specification file
     new 252fd0f  Added some initial specifications to crypt-anastasis.rst. To 
be continued...

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/api/api-anastasis.rst    | 126 ++++++++++++++++++++++++++++++++++++++++++-
 src/api/crypto-anastasis.rst |  79 +++++++++++++++++++++++++++
 2 files changed, 203 insertions(+), 2 deletions(-)
 create mode 100644 src/api/crypto-anastasis.rst

diff --git a/src/api/api-anastasis.rst b/src/api/api-anastasis.rst
index 3d6f3e1..5e1ba48 100644
--- a/src/api/api-anastasis.rst
+++ b/src/api/api-anastasis.rst
@@ -390,12 +390,12 @@ argument and signature may be optional.
       
       // ground truth, i.e. H(challenge answer),
       // phone number, e-mail address, picture, fingerprint, ...
-      // (Q: as string in base32 encoding?)
+      // base32 encoded
       //
       // The truth MUST NOT be revealed to the user, even
       // after successful authentication (of course the user
       // was originally aware when establishing the truth).
-      truth: byte[];
+      truth: string;
 
       // mime type of truth, i.e. text/ascii, image/jpeg, etc.
       truth_mime: string;
@@ -482,4 +482,126 @@ argument and signature may be optional.
 
     }
 
+--------------
+Employee API
+--------------
+
+This API is used for authentication procedures that require an employee to 
authenticate 
+a client (e.g. video identification). 
+The employee uses an AssignmentRequest_ object to request a job to be 
processed from the server. 
+The server responds accordingly with an AssignmentResponse_ object that 
contains, among other 
+things, the required Truth-Object (for example, a photo that is required for 
video identification). 
+When the employee has processed the job, it sends the corresponding result, an 
 EncryptedVerificationResult_ object, 
+back to the server. The EncryptedVerificationResult-Object must contain an 
AES-GCM tag resulting from the 
+encryption of a VerificationResult_ object. Since the server has all the data 
needed to create the 
+same tag (with result=true), it can compare the tags: If the tags match, the 
verification was 
+successful. If the tags do not match (the employee has set result=false etc.), 
the verification will 
+be considered as failed.
+
+.. http:get:: /employee/assignment/employee_ID
+
+Request:
+Body must contain an AssignmentRequest_ object.
+
+Response:
+Returns an EncryptedAssignmentResponse_ object.
+
+**Details:**
+
+  .. _AssignmentRequest:
+  .. code-block:: tsref
+
+    interface AssignmentRequest {
+      // Binary ECDHE ephemeral public key used to encrypt the gzip compressed 
JSON-encoded AssignmentResponse_
+      employee_pub: EddsaPublickey;
+
+      // Salt included to encrypt the VerificationResult_ for this session
+      employee_salt: string;
+
+    }
+
+  .. _EncryptedAssignmentResponse:
+  .. code-block:: tsref
+
+    interface EncryptedAssignmentResponse {
+      // Authentication tag
+      aes_gcm_tag: byte[32];
+
+      // Variable-size encrypted assignment object with public key obtained 
from AssignmentRequest_. 
+      // After decryption, this contains a gzip compressed JSON-encoded 
`AssignmentResponse`_.
+      // The salt of the HKDF for this encryption must include the
+      // string "EAR" and is obtained from the AssignmentRequest_.
+      encrypted_assignment_response: byte[];
+    
+    }
+
+  .. _AssignmentResponse:
+  .. code-block:: tsref
+
+    interface AssignmentResponse {
+      nonce: string;
+
+      // Binary ECDHE ephemeral public key used to encrypt the gzip compressed 
JSON-encoded VerificationResult_
+      server_pub: EddsaPublickey;
+
+      // Time when this assignment was generated
+      timestamp: Timestamp;
+
+      // Expiration time of the session/assignment
+      deadline: Timestamp;
+
+      // ground truth, i.e. picture,
+      // base32-encoded
+      truth: string;
+
+      // mime type of truth, i.e. text/ascii, image/jpeg, etc.
+      truth_mime: string;
+
+      // UUID of the authentication method
+      uuid: UUID;
+
+    }
+
+.. http:post:: /employee/verification/UUID
+
+**Details**
+
+  .. _EncryptedVerificationResult:
+  .. code-block:: tsref  
+
+    interface EncryptedVerificationResult {
+      // Authentication tag
+      aes_gcm_tag: byte[32];
+
+      // Variable-size encrypted verification object with public key obtained 
from AssignmentResponse_. 
+      // After decryption, this contains a gzip compressed JSON-encoded 
`VerificationResult`_.
+      // The salt of the HKDF for this encryption must include the
+      // string "EVR". The Nonce obtained from AssignmentResponse_ must be 
also included by the HKDF.
+      encrypted_verification_result: byte[];
+    
+    }
+
+  .. _VerificationResult:
+  .. code-block:: tsref
+
+    interface VerificationResult {
+      // result of verification procedure
+      // true -> verification successful
+      result: boolean;
+ 
+      // Time when this assignment was generated
+      timestamp: Timestamp;
+
+      // Expiration time of the session/assignment
+      deadline: Timestamp;
+
+      // ground truth, i.e. picture,
+      // base32-encoded
+      truth: string;
+
+      // mime type of truth, i.e. text/ascii, image/jpeg, etc.
+      truth_mime: string;
 
+      // UUID of the authentication method
+      uuid: UUID;
+    }
\ No newline at end of file
diff --git a/src/api/crypto-anastasis.rst b/src/api/crypto-anastasis.rst
new file mode 100644
index 0000000..7bb7ae1
--- /dev/null
+++ b/src/api/crypto-anastasis.rst
@@ -0,0 +1,79 @@
+..
+  This file is part of GNU TALER.
+  Copyright (C) 2019 Taler Systems SA
+
+  TALER is free software; you can redistribute it and/or modify it under the
+  terms of the GNU General Public License as published by the Free Software
+  Foundation; either version 2.1, or (at your option) any later version.
+
+  TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+  A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more 
details.
+
+  You should have received a copy of the GNU Lesser General Public License 
along with
+  TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
+
+  @author Christian Grothoff
+  @author Dominik Meister
+  @author Dennis Neufeld
+
+
+==========================================
+Specification of Cryptography in Anastasis
+==========================================
+
+----------------
+Common Encodings
+----------------
+This section describes how certain types of values are represented throughout 
the Anastasis API.
+
+Keys
+^^^^
+.. _`tsref-anastasis-type-EddsaPublicKey`:
+.. _`tsref-anastasis-type-EcdhePublicKey`:
+.. _`tsref-anastasis-type-EcdhePrivateKey`:
+.. _`tsref-anastasis-type-EddsaPrivateKey`:
+
+.. code-block:: tsref
+
+   // EdDSA and ECDHE public keys always point on Curve25519
+   // and represented  using the standard 256 bits Ed25519 compact format,
+   // converted to Crockford `Base32`_.
+   type EddsaPublicKey = string;
+   type EddsaPrivateKey = string;
+   type EcdhePublicKey = string;
+   type EcdhePrivateKey = string;
+
+------------------------
+Cryptographic primitives
+------------------------
+
+All elliptic curve operations are on Curve25519. Public and private keys are 
thus 32 bytes, 
+and signatures 64 bytes. For hashing, including HKDFs, Anastasis uses 512-bit 
hash codes (64 bytes).
+
+.. sourcecode:: c
+
+    struct GNUNET_HashCode {
+        uint8_t hash[64];      // usually SHA-512
+    };
+
+.. _employee_pub:
+.. sourcecode:: c
+
+    struct ANASTASIS_EmployeePublicKeyP {
+        uint8_t ecdhe_pub[32];
+    };
+
+.. _server_pub:
+.. sourcecode:: c
+
+    struct ANASTASIS_ServerPublicKeyP {
+        uint8_t ecdhe_pub[32];
+    };
+
+.. _ephemeral_pub:
+.. sourcecode:: c
+
+    struct ANASTASIS_EphemeralPublicKeyP {
+        uint8_t ecdhe_pub[32];
+    };

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]